@withmarfa/core 0.0.28 → 0.0.30
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 +108 -7
- package/index.js +56 -54
- package/marfa-core.darwin-arm64.node +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -95,12 +95,16 @@ export declare class MarfaCore {
|
|
|
95
95
|
static replaceRefused(path: string, url?: string | undefined | null, key?: string | undefined | null): MarfaCore
|
|
96
96
|
/**
|
|
97
97
|
* Replaces the local copy with the declared types at `tier`, one tier or
|
|
98
|
-
* `all` for both.
|
|
98
|
+
* `all` for both. `["*"]` alone is every type but `system.*`, hydrated in
|
|
99
|
+
* one pass with no need to read the catalog and name its types first;
|
|
100
|
+
* beside `system.*` types it adds them, and beside any other type it is
|
|
101
|
+
* refused `invalid`.
|
|
99
102
|
*/
|
|
100
103
|
hydrate(types: Array<string>, tier: SliceTier, stop?: Stop | undefined | null): Promise<HydrateReport>
|
|
101
104
|
/**
|
|
102
105
|
* A hydration that also holds every edge of `edgeTypes` the key reads,
|
|
103
|
-
* whichever ends the copy holds.
|
|
106
|
+
* whichever ends the copy holds. `types` reads as in `hydrate`, so
|
|
107
|
+
* `["*"]` alone is every type but `system.*`.
|
|
104
108
|
*/
|
|
105
109
|
hydrateWith(types: Array<string>, tier: SliceTier, edgeTypes: Array<string>, stop?: Stop | undefined | null): Promise<HydrateReport>
|
|
106
110
|
/** Holds one row by id whatever the slice says of it, read now. */
|
|
@@ -112,7 +116,7 @@ export declare class MarfaCore {
|
|
|
112
116
|
unpin(id: string): PinReport
|
|
113
117
|
/** Applies every event since the stored cursor. */
|
|
114
118
|
catchUp(stop?: Stop | undefined | null): Promise<CatchUpReport>
|
|
115
|
-
list(filters?: ListFilters | undefined | null, sort?: Sort | undefined | null):
|
|
119
|
+
list(filters?: ListFilters | undefined | null, sort?: Sort | undefined | null): Listing
|
|
116
120
|
get(id: string): Item | null
|
|
117
121
|
edgesFrom(id: string): Array<Edge>
|
|
118
122
|
edgesTo(id: string): Array<Edge>
|
|
@@ -127,7 +131,7 @@ export declare class MarfaCore {
|
|
|
127
131
|
* oldest link first.
|
|
128
132
|
*/
|
|
129
133
|
conflictedCopiesOf(id: string): Array<Item>
|
|
130
|
-
search(query: string, filters?: SearchFilters | undefined | null, limit?: number | undefined | null):
|
|
134
|
+
search(query: string, filters?: SearchFilters | undefined | null, limit?: number | undefined | null): Found
|
|
131
135
|
status(): Status
|
|
132
136
|
/**
|
|
133
137
|
* Declares the types this app saves, each an object with its `id`, its
|
|
@@ -217,9 +221,27 @@ export declare class MarfaCore {
|
|
|
217
221
|
/**
|
|
218
222
|
* Where a blob's bytes are held, fetching them first where this store
|
|
219
223
|
* does not hold them yet. Refused `bytes_absent` where they can be
|
|
220
|
-
* neither read nor fetched.
|
|
224
|
+
* neither read nor fetched. No trim in this process takes the bytes
|
|
225
|
+
* before the promise resolves; after that a trim may, so open the path
|
|
226
|
+
* at once.
|
|
221
227
|
*/
|
|
222
228
|
blob(hash: string): Promise<string>
|
|
229
|
+
/**
|
|
230
|
+
* The cache of fetched files: its setting, the budget in force and the
|
|
231
|
+
* bytes held.
|
|
232
|
+
*/
|
|
233
|
+
fileCache(): FileCache
|
|
234
|
+
/**
|
|
235
|
+
* Chooses the cache's budget, trims to it at once and answers the bytes
|
|
236
|
+
* the trim took. Refused `invalid` for a budget that is not one, keeping
|
|
237
|
+
* the setting, and refused to a reading handle.
|
|
238
|
+
*/
|
|
239
|
+
setFileBudget(budget: FileBudget): number
|
|
240
|
+
/**
|
|
241
|
+
* Trims the cache to its budget now and answers the bytes it took.
|
|
242
|
+
* Refused to a reading handle.
|
|
243
|
+
*/
|
|
244
|
+
trimFiles(): number
|
|
223
245
|
/** Whether a blob's bytes are held beside the store, with no request. */
|
|
224
246
|
blobHeld(hash: string): boolean
|
|
225
247
|
/**
|
|
@@ -270,8 +292,8 @@ export declare class MarfaCore {
|
|
|
270
292
|
/**
|
|
271
293
|
* Raised to end a `hydrate`, `catchUp` or `drain` it was given to, soon
|
|
272
294
|
* after, with an error coded `canceled`. What the call had taken is
|
|
273
|
-
* consistent: a hydration left unfinished
|
|
274
|
-
* the cursor it reached, and a drain leaves what it had not sent queued, and
|
|
295
|
+
* 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
|
|
275
297
|
* an upload or item or edge write it had in flight queued as sent, for the
|
|
276
298
|
* next drain to send again under the same key. A raised `Stop` stays raised, so a call given one
|
|
277
299
|
* afterwards ends at once.
|
|
@@ -361,6 +383,15 @@ export type Change =
|
|
|
361
383
|
| { kind: 'saved'; dataVersion: number; cursor: string }
|
|
362
384
|
| { kind: 'watchFailed'; code: string; reason: string; cursor: string }
|
|
363
385
|
|
|
386
|
+
/**
|
|
387
|
+
* Whether a local list or search was read from a whole copy, or from one a
|
|
388
|
+
* hydration is still filling, which holds only the rows that have arrived.
|
|
389
|
+
*/
|
|
390
|
+
export declare const enum Completeness {
|
|
391
|
+
Complete = 'complete',
|
|
392
|
+
Partial = 'partial',
|
|
393
|
+
}
|
|
394
|
+
|
|
364
395
|
export interface ConfirmedRemoval {
|
|
365
396
|
deleted: number
|
|
366
397
|
moved: number
|
|
@@ -524,6 +555,50 @@ export interface FieldRefusal {
|
|
|
524
555
|
message: string
|
|
525
556
|
}
|
|
526
557
|
|
|
558
|
+
export interface FileBudget {
|
|
559
|
+
kind: FileBudgetKind
|
|
560
|
+
/**
|
|
561
|
+
* The byte count, for `bytes` alone: a whole number from zero to
|
|
562
|
+
* `Number.MAX_SAFE_INTEGER`.
|
|
563
|
+
*/
|
|
564
|
+
bytes?: number
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/** How the cache of fetched files chooses its budget. */
|
|
568
|
+
export declare const enum FileBudgetKind {
|
|
569
|
+
/**
|
|
570
|
+
* The larger of 2 GiB and a tenth of the volume, held to what leaves a
|
|
571
|
+
* twentieth of the volume free and never below 256 MiB.
|
|
572
|
+
*/
|
|
573
|
+
Default = 'default',
|
|
574
|
+
/** `bytes` bytes. */
|
|
575
|
+
Bytes = 'bytes',
|
|
576
|
+
/** No budget: every file fetched stays. */
|
|
577
|
+
KeepAll = 'keep_all',
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/** The cache of fetched files as the state report gives it. */
|
|
581
|
+
export interface FileCache {
|
|
582
|
+
/** What was chosen. */
|
|
583
|
+
setting: FileBudget
|
|
584
|
+
/** The budget in force, in bytes; null while every file fetched is kept. */
|
|
585
|
+
budget?: number
|
|
586
|
+
/**
|
|
587
|
+
* The bytes of the files kept now; null where the cache could not be
|
|
588
|
+
* read.
|
|
589
|
+
*/
|
|
590
|
+
held?: number
|
|
591
|
+
/** Why `held` is unknown; absent when it is known. */
|
|
592
|
+
heldUnreadable?: string
|
|
593
|
+
/** The default budget is 2 GiB because the disk could not be read. */
|
|
594
|
+
volumeUnreadable: boolean
|
|
595
|
+
/**
|
|
596
|
+
* Why the files fetched last could not be kept out of backups; absent
|
|
597
|
+
* once a fetched file is marked.
|
|
598
|
+
*/
|
|
599
|
+
backupMarkFailure?: string
|
|
600
|
+
}
|
|
601
|
+
|
|
527
602
|
export declare const enum FileState {
|
|
528
603
|
InStep = 'in_step',
|
|
529
604
|
Waiting = 'waiting',
|
|
@@ -632,6 +707,15 @@ export type FolderSyncOutcome =
|
|
|
632
707
|
| { kind: 'done'; sync: FolderSync }
|
|
633
708
|
| { kind: 'waiting'; plan: FirstSyncPlan }
|
|
634
709
|
|
|
710
|
+
/**
|
|
711
|
+
* The hits a local search answers, best match first, and whether the copy
|
|
712
|
+
* was whole.
|
|
713
|
+
*/
|
|
714
|
+
export interface Found {
|
|
715
|
+
hits: Array<SearchHit>
|
|
716
|
+
completeness: Completeness
|
|
717
|
+
}
|
|
718
|
+
|
|
635
719
|
/** What a missing grant is on. */
|
|
636
720
|
export declare const enum GrantKind {
|
|
637
721
|
Type = 'type',
|
|
@@ -750,6 +834,12 @@ export interface ListFilters {
|
|
|
750
834
|
offset?: number
|
|
751
835
|
}
|
|
752
836
|
|
|
837
|
+
/** The items a local list answers, and whether the copy was whole. */
|
|
838
|
+
export interface Listing {
|
|
839
|
+
items: Array<Item>
|
|
840
|
+
completeness: Completeness
|
|
841
|
+
}
|
|
842
|
+
|
|
753
843
|
export interface MissingGrant {
|
|
754
844
|
kind: GrantKind
|
|
755
845
|
/** The type or edge type id, or the extension namespace. */
|
|
@@ -917,12 +1007,23 @@ export interface Status {
|
|
|
917
1007
|
eventCursor?: string
|
|
918
1008
|
hydration: Hydration
|
|
919
1009
|
items: number
|
|
1010
|
+
/**
|
|
1011
|
+
* While a hydration fills the copy, how many items its slice held on the
|
|
1012
|
+
* server when it started; absent where the server did not count them.
|
|
1013
|
+
*/
|
|
1014
|
+
itemsExpected?: number
|
|
1015
|
+
/**
|
|
1016
|
+
* While a hydration fills the copy, how many rows its listings have
|
|
1017
|
+
* brought, the figure to set against `items_expected`.
|
|
1018
|
+
*/
|
|
1019
|
+
itemsListed?: number
|
|
920
1020
|
edges: number
|
|
921
1021
|
/**
|
|
922
1022
|
* Moves each time a refresh changes the catalog; absent where the copy
|
|
923
1023
|
* has never held one.
|
|
924
1024
|
*/
|
|
925
1025
|
catalogVersion?: number
|
|
1026
|
+
fileCache: FileCache
|
|
926
1027
|
}
|
|
927
1028
|
|
|
928
1029
|
export type StorageCause =
|
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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30' && 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.30 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.30') {
|
|
665
|
+
throw new Error(`WASI binding package version mismatch, expected 0.0.30 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
wasiBinding = require('@withmarfa/core-wasm32-wasi')
|
|
@@ -783,8 +783,10 @@ module.exports.MarfaCore = nativeBinding.MarfaCore
|
|
|
783
783
|
module.exports.Stop = nativeBinding.Stop
|
|
784
784
|
module.exports.Subscription = nativeBinding.Subscription
|
|
785
785
|
module.exports.BlockedReason = nativeBinding.BlockedReason
|
|
786
|
+
module.exports.Completeness = nativeBinding.Completeness
|
|
786
787
|
module.exports.EdgeEnd = nativeBinding.EdgeEnd
|
|
787
788
|
module.exports.EdgeWrittenAt = nativeBinding.EdgeWrittenAt
|
|
789
|
+
module.exports.FileBudgetKind = nativeBinding.FileBudgetKind
|
|
788
790
|
module.exports.FileState = nativeBinding.FileState
|
|
789
791
|
module.exports.GrantKind = nativeBinding.GrantKind
|
|
790
792
|
module.exports.GrantLevel = nativeBinding.GrantLevel
|
|
Binary file
|