@withmarfa/core 0.0.30 → 0.0.31
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 +134 -1
- 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 refuses writes, a catch-up keeps the cursor it reached, and a drain leaves what it had not sent queued, and
|
|
317
|
+
* partial and refuses 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',
|
|
@@ -597,6 +633,12 @@ export interface FileCache {
|
|
|
597
633
|
* once a fetched file is marked.
|
|
598
634
|
*/
|
|
599
635
|
backupMarkFailure?: string
|
|
636
|
+
/**
|
|
637
|
+
* The files attached to items the copy holds, which stay on the device
|
|
638
|
+
* outside the budget; absent from the start of a hydration until one
|
|
639
|
+
* completes, for a folder's copy, and where the cache could not be read.
|
|
640
|
+
*/
|
|
641
|
+
attachments?: Attachments
|
|
600
642
|
}
|
|
601
643
|
|
|
602
644
|
export declare const enum FileState {
|
|
@@ -740,7 +782,26 @@ export interface HydrateReport {
|
|
|
740
782
|
edgeTypes: Array<string>
|
|
741
783
|
items: number
|
|
742
784
|
edges: number
|
|
785
|
+
/**
|
|
786
|
+
* The listing pages this call read, those of a walk it then started
|
|
787
|
+
* again from the first page included.
|
|
788
|
+
*/
|
|
743
789
|
pages: number
|
|
790
|
+
/**
|
|
791
|
+
* The listing pages the hydration read in all, those of the interrupted
|
|
792
|
+
* calls it resumed included.
|
|
793
|
+
*/
|
|
794
|
+
pagesTotal: number
|
|
795
|
+
/**
|
|
796
|
+
* Whether this call carried on from the page an interrupted hydration
|
|
797
|
+
* of the same slice had reached.
|
|
798
|
+
*/
|
|
799
|
+
resumed: boolean
|
|
800
|
+
/**
|
|
801
|
+
* Why an interrupted hydration was filled again from the first page
|
|
802
|
+
* rather than resumed, such as `slice_changed` or `head_aged_out`.
|
|
803
|
+
*/
|
|
804
|
+
restarted?: string
|
|
744
805
|
cursor: string
|
|
745
806
|
/** Types the app declared that the instance did not hold and now does. */
|
|
746
807
|
registeredTypes: Array<string>
|
|
@@ -793,6 +854,18 @@ export interface ItemType {
|
|
|
793
854
|
compatibleWith: Array<string>
|
|
794
855
|
}
|
|
795
856
|
|
|
857
|
+
/** What a fetch of the attachments did. */
|
|
858
|
+
export interface KeptFetch {
|
|
859
|
+
/**
|
|
860
|
+
* The files whose bytes it fetched, counted once for files that share
|
|
861
|
+
* them.
|
|
862
|
+
*/
|
|
863
|
+
fetched: number
|
|
864
|
+
fetchedBytes: number
|
|
865
|
+
/** The attachments after it, as the state report gives them. */
|
|
866
|
+
attachments?: Attachments
|
|
867
|
+
}
|
|
868
|
+
|
|
796
869
|
/**
|
|
797
870
|
* What a write met that was no answer to it: the HTTP status, absent where
|
|
798
871
|
* nothing answered, and the start of the answer's body when it is text.
|
|
@@ -847,6 +920,43 @@ export interface MissingGrant {
|
|
|
847
920
|
level: GrantLevel
|
|
848
921
|
}
|
|
849
922
|
|
|
923
|
+
/** The attachments not held for one reason. */
|
|
924
|
+
export interface NotHeld {
|
|
925
|
+
reason: NotHeldReason
|
|
926
|
+
attachments: number
|
|
927
|
+
/** The bytes they state, counted once for files that share them. */
|
|
928
|
+
bytes: number
|
|
929
|
+
/** How many of them state no size, so add nothing to `bytes`. */
|
|
930
|
+
unstated: number
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/** Why an attachment's bytes are not held. */
|
|
934
|
+
export declare const enum NotHeldReason {
|
|
935
|
+
/** No fetch of them has been asked for since they became an attachment. */
|
|
936
|
+
NotFetched = 'not_fetched',
|
|
937
|
+
/**
|
|
938
|
+
* The volume had no room for them, or for an attachment before them in
|
|
939
|
+
* the same fetch.
|
|
940
|
+
*/
|
|
941
|
+
NoRoom = 'no_room',
|
|
942
|
+
/**
|
|
943
|
+
* The server, or the link it gave, could not be reached, or the link
|
|
944
|
+
* stopped sending part way.
|
|
945
|
+
*/
|
|
946
|
+
Unreachable = 'unreachable',
|
|
947
|
+
/**
|
|
948
|
+
* The server asked for a wait longer than a fetch of attachments
|
|
949
|
+
* makes, before them or an attachment before them in the same fetch.
|
|
950
|
+
*/
|
|
951
|
+
RateLimited = 'rate_limited',
|
|
952
|
+
/** The server holds no bytes by that hash. */
|
|
953
|
+
Absent = 'absent',
|
|
954
|
+
/** The fetch failed otherwise. */
|
|
955
|
+
Failed = 'failed',
|
|
956
|
+
/** The edge is held but its file item is not. */
|
|
957
|
+
NotInCopy = 'not_in_copy',
|
|
958
|
+
}
|
|
959
|
+
|
|
850
960
|
export interface PausedRemoval {
|
|
851
961
|
disk: number
|
|
852
962
|
pull: number
|
|
@@ -1084,6 +1194,29 @@ export type Verdict =
|
|
|
1084
1194
|
| { verdict: 'blocked'; reason: BlockedReason; refusal?: Refusal }
|
|
1085
1195
|
| { verdict: 'dead' }
|
|
1086
1196
|
|
|
1197
|
+
export interface ViewGroup {
|
|
1198
|
+
key: string | number | boolean | null
|
|
1199
|
+
count: number
|
|
1200
|
+
sum?: number
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
export interface ViewGroups {
|
|
1204
|
+
groups: Array<ViewGroup>
|
|
1205
|
+
completeness: Completeness
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
export interface ViewRow {
|
|
1209
|
+
id: string
|
|
1210
|
+
version: number
|
|
1211
|
+
state: ItemState
|
|
1212
|
+
settings: Record<string, unknown>
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
export interface Views {
|
|
1216
|
+
views: Array<ViewRow>
|
|
1217
|
+
completeness: Completeness
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1087
1220
|
export interface WaitingFirstSync {
|
|
1088
1221
|
plan?: FirstSyncPlan
|
|
1089
1222
|
}
|
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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31' && 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.31 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.31') {
|
|
665
|
+
throw new Error(`WASI binding package version mismatch, expected 0.0.31 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
|