@withmarfa/core 0.0.13 → 0.0.15
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 +189 -6
- package/index.js +56 -54
- package/marfa-core.darwin-arm64.node +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -9,6 +9,23 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const __napiBindingTarget: 'native' | 'wasm32-wasi' | 'wasm32-wasip1'
|
|
11
11
|
|
|
12
|
+
export declare class Folders {
|
|
13
|
+
constructor(url?: string | undefined | null, key?: string | undefined | null)
|
|
14
|
+
add(dir: string, folder: string): Promise<AddedFolder>
|
|
15
|
+
list(): Promise<Array<ListedFolder>>
|
|
16
|
+
status(dir: string): Promise<FolderStatus>
|
|
17
|
+
sync(dir: string): Promise<FolderSyncOutcome>
|
|
18
|
+
confirmFirstSync(dir: string): Promise<boolean>
|
|
19
|
+
confirm(dir: string): Promise<ConfirmedRemoval>
|
|
20
|
+
restore(dir: string): Promise<RestoredRemoval>
|
|
21
|
+
remove(dir: string): Promise<void>
|
|
22
|
+
/**
|
|
23
|
+
* The callbacks share one event-loop queue, so the end follows every event.
|
|
24
|
+
* A callback that throws stops the watch and ends it with `listener_threw`.
|
|
25
|
+
*/
|
|
26
|
+
watch(dir: string, onEvent: (event: FolderEvent) => void, onEnd: (error: (Error & { code: string }) | null) => void): Subscription
|
|
27
|
+
}
|
|
28
|
+
|
|
12
29
|
/** A local copy of a slice of one server. */
|
|
13
30
|
export declare class MarfaCore {
|
|
14
31
|
/**
|
|
@@ -28,8 +45,12 @@ export declare class MarfaCore {
|
|
|
28
45
|
* Each time it tells `serverReachable` with work queued for a drain, it
|
|
29
46
|
* drains once, after any drain under way, and tells `queueDrained` or
|
|
30
47
|
* `queueNotDrained`; `onEnd` follows that drain's end.
|
|
48
|
+
*
|
|
49
|
+
* `toldUnreachable` says the caller was last told `serverUnreachable` by
|
|
50
|
+
* an earlier follow: this one tells `serverReachable` when it has its
|
|
51
|
+
* first stream, and does not tell `serverUnreachable` again before.
|
|
31
52
|
*/
|
|
32
|
-
follow(onChange: (change: Change) => void, onEnd: (error: (Error & { code: string }) | null) => void): Subscription
|
|
53
|
+
follow(onChange: (change: Change) => void, onEnd: (error: (Error & { code: string }) | null) => void, toldUnreachable?: boolean): Subscription
|
|
33
54
|
/**
|
|
34
55
|
* Adds a listener to this store's watch, and starts it if it was idle.
|
|
35
56
|
* However many listeners there are, one source runs: a writer with a
|
|
@@ -51,8 +72,12 @@ export declare class MarfaCore {
|
|
|
51
72
|
* drain is told as `follow` tells it. An `onChange` that throws ends its
|
|
52
73
|
* listener, and `onEnd` is given an error whose `code` is
|
|
53
74
|
* `listener_threw`. Throws `no_server` for a writer with no server.
|
|
75
|
+
*
|
|
76
|
+
* `toldUnreachable` says the listener was last told `serverUnreachable`
|
|
77
|
+
* by an earlier watch: it is told `serverReachable` once the server is
|
|
78
|
+
* reached, and not `serverUnreachable` again before.
|
|
54
79
|
*/
|
|
55
|
-
watch(onChange: (change: Change) => void, onEnd: (error: (Error & { code: string }) | null) => void): Subscription
|
|
80
|
+
watch(onChange: (change: Change) => void, onEnd: (error: (Error & { code: string }) | null) => void, toldUnreachable?: boolean): Subscription
|
|
56
81
|
/**
|
|
57
82
|
* Opens the file at `path`, creating it when absent. `url` and `key` go
|
|
58
83
|
* together; without them only local reads work.
|
|
@@ -207,9 +232,10 @@ export declare class MarfaCore {
|
|
|
207
232
|
* Takes a write blocked `ancestor_unavailable` or `conflict_unresolved`
|
|
208
233
|
* out of the queue, and puts the copy back to what the server holds;
|
|
209
234
|
* each write held for it is refused unsent. Answers whether the row was
|
|
210
|
-
* one a withdraw takes.
|
|
235
|
+
* one a withdraw takes. Off the JavaScript thread, because it reads each
|
|
236
|
+
* row it puts back from the server.
|
|
211
237
|
*/
|
|
212
|
-
withdraw(id: string): boolean
|
|
238
|
+
withdraw(id: string): Promise<boolean>
|
|
213
239
|
/**
|
|
214
240
|
* Clears the writes the server has answered, and says how many went. A
|
|
215
241
|
* refused write that carried content stays until it is discarded.
|
|
@@ -228,9 +254,9 @@ export declare class MarfaCore {
|
|
|
228
254
|
* write still waiting on it, or a create refused onto a row its natural
|
|
229
255
|
* key names that no read has found, whose waiting writes it refuses
|
|
230
256
|
* unsent. A create's discard first waits for a drain already running to
|
|
231
|
-
* end.
|
|
257
|
+
* end, which is why it is off the JavaScript thread.
|
|
232
258
|
*/
|
|
233
|
-
discard(id: string): boolean
|
|
259
|
+
discard(id: string): Promise<boolean>
|
|
234
260
|
}
|
|
235
261
|
|
|
236
262
|
/**
|
|
@@ -256,6 +282,12 @@ export declare class Subscription {
|
|
|
256
282
|
stop(): void
|
|
257
283
|
}
|
|
258
284
|
|
|
285
|
+
export interface AddedFolder {
|
|
286
|
+
dir: string
|
|
287
|
+
folder: string
|
|
288
|
+
storage?: StorageCause
|
|
289
|
+
}
|
|
290
|
+
|
|
259
291
|
/**
|
|
260
292
|
* The three writes an attachment is, in the order they go out, and the
|
|
261
293
|
* text that embeds the file in the item's body.
|
|
@@ -316,6 +348,13 @@ export type Change =
|
|
|
316
348
|
| { kind: 'saved'; dataVersion: number; cursor: string }
|
|
317
349
|
| { kind: 'watchFailed'; code: string; reason: string; cursor: string }
|
|
318
350
|
|
|
351
|
+
export interface ConfirmedRemoval {
|
|
352
|
+
deleted: number
|
|
353
|
+
moved: number
|
|
354
|
+
removed: number
|
|
355
|
+
unsure: Array<UnsureFile>
|
|
356
|
+
}
|
|
357
|
+
|
|
319
358
|
/** A create, before it is queued. */
|
|
320
359
|
export interface Draft {
|
|
321
360
|
type: string
|
|
@@ -472,6 +511,112 @@ export interface FieldRefusal {
|
|
|
472
511
|
message: string
|
|
473
512
|
}
|
|
474
513
|
|
|
514
|
+
export declare const enum FileState {
|
|
515
|
+
InStep = 'in_step',
|
|
516
|
+
Waiting = 'waiting',
|
|
517
|
+
Held = 'held',
|
|
518
|
+
Unmatched = 'unmatched',
|
|
519
|
+
Unreached = 'unreached',
|
|
520
|
+
Outside = 'outside',
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export interface FileStatus {
|
|
524
|
+
path: string
|
|
525
|
+
itemId?: string
|
|
526
|
+
state: FileState
|
|
527
|
+
waits: Array<string>
|
|
528
|
+
flag?: string
|
|
529
|
+
reason?: string
|
|
530
|
+
warning?: string
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export interface FirstSyncPlan {
|
|
534
|
+
write: number
|
|
535
|
+
send: number
|
|
536
|
+
beside: number
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export interface FlaggedFile {
|
|
540
|
+
path: string
|
|
541
|
+
flag: string
|
|
542
|
+
reason: string
|
|
543
|
+
item?: string
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export type FolderEvent =
|
|
547
|
+
| { kind: 'watching'; dir: string; storage?: StorageCause }
|
|
548
|
+
| { kind: 'watcherFailed'; message: string }
|
|
549
|
+
| { kind: 'retrying'; error: any; waitMs: number }
|
|
550
|
+
| { kind: 'unreachable'; reason: string }
|
|
551
|
+
| { kind: 'reachable' }
|
|
552
|
+
| { kind: 'waiting'; reason: string }
|
|
553
|
+
| { kind: 'passed'; pass: FolderPass }
|
|
554
|
+
| { kind: 'handedOver' }
|
|
555
|
+
| { kind: 'heldElsewhere' }
|
|
556
|
+
| { kind: 'takenBack' }
|
|
557
|
+
| { kind: 'removed' }
|
|
558
|
+
| { kind: 'unlisted' }
|
|
559
|
+
|
|
560
|
+
export interface FolderPass {
|
|
561
|
+
settings: SettingsFileOutcome
|
|
562
|
+
scan: FolderScan
|
|
563
|
+
drain: DrainReport
|
|
564
|
+
rebased: number
|
|
565
|
+
gaveWay: number
|
|
566
|
+
pull?: FolderPull
|
|
567
|
+
flagged: Array<FlaggedFile>
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export interface FolderPull {
|
|
571
|
+
written: number
|
|
572
|
+
rewritten: number
|
|
573
|
+
moved: number
|
|
574
|
+
unchanged: number
|
|
575
|
+
skipped: number
|
|
576
|
+
removed: number
|
|
577
|
+
purged: number
|
|
578
|
+
kept: number
|
|
579
|
+
unwritten: number
|
|
580
|
+
absent: number
|
|
581
|
+
unplaced: number
|
|
582
|
+
unmatched: number
|
|
583
|
+
paused: number
|
|
584
|
+
rootGone?: string
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export interface FolderScan {
|
|
588
|
+
created: number
|
|
589
|
+
updated: number
|
|
590
|
+
renamed: number
|
|
591
|
+
unchanged: number
|
|
592
|
+
missing: number
|
|
593
|
+
deleted: number
|
|
594
|
+
skipped: number
|
|
595
|
+
movedAway: number
|
|
596
|
+
paused: number
|
|
597
|
+
trashed: Array<string>
|
|
598
|
+
secrets: Array<string>
|
|
599
|
+
warnings: Array<FlaggedFile>
|
|
600
|
+
rootGone?: string
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export interface FolderStatus {
|
|
604
|
+
directories: Array<FlaggedFile>
|
|
605
|
+
files: Array<FileStatus>
|
|
606
|
+
paused: PausedRemoval
|
|
607
|
+
firstSync?: WaitingFirstSync
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export interface FolderSync {
|
|
611
|
+
hydrated?: HydrateReport
|
|
612
|
+
catchUpError?: any
|
|
613
|
+
pass: FolderPass
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export type FolderSyncOutcome =
|
|
617
|
+
| { kind: 'done'; sync: FolderSync }
|
|
618
|
+
| { kind: 'waiting'; plan: FirstSyncPlan }
|
|
619
|
+
|
|
475
620
|
/** What a missing grant is on. */
|
|
476
621
|
export declare const enum GrantKind {
|
|
477
622
|
Type = 'type',
|
|
@@ -549,6 +694,11 @@ export interface ItemType {
|
|
|
549
694
|
compatibleWith: Array<string>
|
|
550
695
|
}
|
|
551
696
|
|
|
697
|
+
export interface ListedFolder {
|
|
698
|
+
dir: string
|
|
699
|
+
folder: string
|
|
700
|
+
}
|
|
701
|
+
|
|
552
702
|
/**
|
|
553
703
|
* Narrowing for a list. Leaving `state` unset answers the active state, as
|
|
554
704
|
* the server does; `allStates` lifts that, and a named state wins.
|
|
@@ -583,6 +733,11 @@ export interface MissingGrant {
|
|
|
583
733
|
level: GrantLevel
|
|
584
734
|
}
|
|
585
735
|
|
|
736
|
+
export interface PausedRemoval {
|
|
737
|
+
disk: number
|
|
738
|
+
pull: number
|
|
739
|
+
}
|
|
740
|
+
|
|
586
741
|
/** What a pin or an unpin answers. */
|
|
587
742
|
export interface PinReport {
|
|
588
743
|
/** Whether the row is pinned now. */
|
|
@@ -648,6 +803,12 @@ export interface Refusal {
|
|
|
648
803
|
grant?: MissingGrant
|
|
649
804
|
}
|
|
650
805
|
|
|
806
|
+
export interface RestoredRemoval {
|
|
807
|
+
putBack: number
|
|
808
|
+
restored: number
|
|
809
|
+
pull: FolderPull
|
|
810
|
+
}
|
|
811
|
+
|
|
651
812
|
/**
|
|
652
813
|
* Narrowing for a search: the state rule a list takes, a type with its
|
|
653
814
|
* subtree, tags, a listing-grammar expression and `beneath`, each read as
|
|
@@ -687,6 +848,13 @@ export interface ServerCatalog {
|
|
|
687
848
|
edgeTypes: Array<EdgeType>
|
|
688
849
|
}
|
|
689
850
|
|
|
851
|
+
export interface SettingsFileOutcome {
|
|
852
|
+
sent: boolean
|
|
853
|
+
written: boolean
|
|
854
|
+
flagged?: string
|
|
855
|
+
unwritten?: string
|
|
856
|
+
}
|
|
857
|
+
|
|
690
858
|
/** The tiers a slice holds: one, or `all` for both. */
|
|
691
859
|
export declare const enum SliceTier {
|
|
692
860
|
Library = 'library',
|
|
@@ -729,6 +897,12 @@ export interface Status {
|
|
|
729
897
|
catalogVersion?: number
|
|
730
898
|
}
|
|
731
899
|
|
|
900
|
+
export type StorageCause =
|
|
901
|
+
| { cause: 'iCloudDrive' }
|
|
902
|
+
| { cause: 'cloudService' }
|
|
903
|
+
| { cause: 'cloudSynced' }
|
|
904
|
+
| { cause: 'networkFileSystem'; kind: string }
|
|
905
|
+
|
|
732
906
|
/** An item's thumbnail: the image's type and its bytes. */
|
|
733
907
|
export interface Thumbnail {
|
|
734
908
|
mimeType: string
|
|
@@ -764,6 +938,11 @@ export interface UnregisteredType {
|
|
|
764
938
|
message: string
|
|
765
939
|
}
|
|
766
940
|
|
|
941
|
+
export interface UnsureFile {
|
|
942
|
+
path: string
|
|
943
|
+
reason: string
|
|
944
|
+
}
|
|
945
|
+
|
|
767
946
|
/**
|
|
768
947
|
* What the server made of a write: one of six, and absent while the write
|
|
769
948
|
* is unanswered.
|
|
@@ -776,6 +955,10 @@ export type Verdict =
|
|
|
776
955
|
| { verdict: 'blocked'; reason: BlockedReason; refusal?: Refusal }
|
|
777
956
|
| { verdict: 'dead' }
|
|
778
957
|
|
|
958
|
+
export interface WaitingFirstSync {
|
|
959
|
+
plan?: FirstSyncPlan
|
|
960
|
+
}
|
|
961
|
+
|
|
779
962
|
/** The kinds of write a queue holds. */
|
|
780
963
|
export declare const enum WriteKind {
|
|
781
964
|
CreateItem = 'create_item',
|
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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15' && 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.15 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.15') {
|
|
665
|
+
throw new Error(`WASI binding package version mismatch, expected 0.0.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
wasiBinding = require('@withmarfa/core-wasm32-wasi')
|
|
@@ -778,12 +778,14 @@ function __napiStampBindingTarget(exportsObject, target) {
|
|
|
778
778
|
// linked import resolves to `undefined`.
|
|
779
779
|
module.exports.__napiBindingTarget = __napiStampBindingTarget(nativeBinding, __napiLoadedBindingTarget)
|
|
780
780
|
module.exports = nativeBinding
|
|
781
|
+
module.exports.Folders = nativeBinding.Folders
|
|
781
782
|
module.exports.MarfaCore = nativeBinding.MarfaCore
|
|
782
783
|
module.exports.Stop = nativeBinding.Stop
|
|
783
784
|
module.exports.Subscription = nativeBinding.Subscription
|
|
784
785
|
module.exports.BlockedReason = nativeBinding.BlockedReason
|
|
785
786
|
module.exports.EdgeEnd = nativeBinding.EdgeEnd
|
|
786
787
|
module.exports.EdgeWrittenAt = nativeBinding.EdgeWrittenAt
|
|
788
|
+
module.exports.FileState = nativeBinding.FileState
|
|
787
789
|
module.exports.GrantKind = nativeBinding.GrantKind
|
|
788
790
|
module.exports.GrantLevel = nativeBinding.GrantLevel
|
|
789
791
|
module.exports.Handle = nativeBinding.Handle
|
|
Binary file
|