hyoo_sync_client 0.0.550 → 0.0.552
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/node.d.ts +300 -217
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +1726 -1400
- package/node.js.map +1 -1
- package/node.mjs +1726 -1400
- package/node.test.js +1969 -1617
- package/node.test.js.map +1 -1
- package/package.json +19 -16
package/node.d.ts
CHANGED
|
@@ -105,142 +105,13 @@ declare namespace $ {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
declare namespace $ {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
place: unknown;
|
|
113
|
-
message: string;
|
|
114
|
-
} & Fields;
|
|
115
|
-
type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
|
|
116
|
-
let $mol_log3_come: $mol_log3_logger<{}>;
|
|
117
|
-
let $mol_log3_done: $mol_log3_logger<{}>;
|
|
118
|
-
let $mol_log3_fail: $mol_log3_logger<{}>;
|
|
119
|
-
let $mol_log3_warn: $mol_log3_logger<{
|
|
120
|
-
hint: string;
|
|
121
|
-
}>;
|
|
122
|
-
let $mol_log3_rise: $mol_log3_logger<{}>;
|
|
123
|
-
let $mol_log3_area: $mol_log3_logger<{}, () => void>;
|
|
124
|
-
function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
|
|
125
|
-
let $mol_log3_stack: (() => void)[];
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
declare namespace $ {
|
|
129
|
-
class $mol_span extends $mol_object2 {
|
|
130
|
-
readonly uri: string;
|
|
131
|
-
readonly source: string;
|
|
132
|
-
readonly row: number;
|
|
133
|
-
readonly col: number;
|
|
134
|
-
readonly length: number;
|
|
135
|
-
constructor(uri: string, source: string, row: number, col: number, length: number);
|
|
136
|
-
static unknown: $mol_span;
|
|
137
|
-
static begin(uri: string, source?: string): $mol_span;
|
|
138
|
-
static end(uri: string, source: string): $mol_span;
|
|
139
|
-
static entire(uri: string, source: string): $mol_span;
|
|
140
|
-
toString(): string;
|
|
141
|
-
toJSON(): {
|
|
142
|
-
uri: string;
|
|
143
|
-
row: number;
|
|
144
|
-
col: number;
|
|
145
|
-
length: number;
|
|
146
|
-
};
|
|
147
|
-
error(message: string, Class?: ErrorConstructor): Error;
|
|
148
|
-
span(row: number, col: number, length: number): $mol_span;
|
|
149
|
-
after(length?: number): $mol_span;
|
|
150
|
-
slice(begin: number, end?: number): $mol_span;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
declare namespace $ {
|
|
155
|
-
function $mol_tree2_to_string(this: $, tree: $mol_tree2): string;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
declare namespace $ {
|
|
159
|
-
type $mol_tree2_path = Array<string | number | null>;
|
|
160
|
-
type $mol_tree2_hack<Context> = (input: $mol_tree2, belt: $mol_tree2_belt<Context>, context: Context) => readonly $mol_tree2[];
|
|
161
|
-
type $mol_tree2_belt<Context> = Record<string, $mol_tree2_hack<Context>>;
|
|
162
|
-
class $mol_tree2 extends Object {
|
|
163
|
-
readonly type: string;
|
|
164
|
-
readonly value: string;
|
|
165
|
-
readonly kids: readonly $mol_tree2[];
|
|
166
|
-
readonly span: $mol_span;
|
|
167
|
-
constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span);
|
|
168
|
-
static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
169
|
-
list(kids: readonly $mol_tree2[]): $mol_tree2;
|
|
170
|
-
static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
171
|
-
data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2;
|
|
172
|
-
static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
173
|
-
struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2;
|
|
174
|
-
clone(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
175
|
-
text(): string;
|
|
176
|
-
static fromString(str: string, uri?: string): $mol_tree2;
|
|
177
|
-
toString(): string;
|
|
178
|
-
insert(value: $mol_tree2 | null, ...path: $mol_tree2_path): $mol_tree2;
|
|
179
|
-
select(...path: $mol_tree2_path): $mol_tree2;
|
|
180
|
-
filter(path: string[], value?: string): $mol_tree2;
|
|
181
|
-
hack_self<Context extends {
|
|
182
|
-
span?: $mol_span;
|
|
183
|
-
[key: string]: unknown;
|
|
184
|
-
} = {}>(belt: $mol_tree2_belt<Context>, context?: Context): readonly $mol_tree2[];
|
|
185
|
-
hack<Context extends {
|
|
186
|
-
span?: $mol_span;
|
|
187
|
-
[key: string]: unknown;
|
|
188
|
-
} = {}>(belt: $mol_tree2_belt<Context>, context?: Context): $mol_tree2[];
|
|
189
|
-
error(message: string, Class?: ErrorConstructor): Error;
|
|
190
|
-
}
|
|
191
|
-
class $mol_tree2_empty extends $mol_tree2 {
|
|
192
|
-
constructor();
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
declare namespace $ {
|
|
197
|
-
class $mol_error_syntax extends SyntaxError {
|
|
198
|
-
reason: string;
|
|
199
|
-
line: string;
|
|
200
|
-
span: $mol_span;
|
|
201
|
-
constructor(reason: string, line: string, span: $mol_span);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
declare namespace $ {
|
|
206
|
-
function $mol_tree2_from_string(this: $, str: string, uri?: string): $mol_tree2;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
declare namespace $ {
|
|
210
|
-
function $mol_tree2_from_json(json: any, span?: $mol_span): $mol_tree2;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
declare namespace $ {
|
|
214
|
-
class $mol_term_color {
|
|
215
|
-
static reset: (str: string) => string;
|
|
216
|
-
static bold: (str: string) => string;
|
|
217
|
-
static italic: (str: string) => string;
|
|
218
|
-
static underline: (str: string) => string;
|
|
219
|
-
static inverse: (str: string) => string;
|
|
220
|
-
static hidden: (str: string) => string;
|
|
221
|
-
static strike: (str: string) => string;
|
|
222
|
-
static gray: (str: string) => string;
|
|
223
|
-
static red: (str: string) => string;
|
|
224
|
-
static green: (str: string) => string;
|
|
225
|
-
static yellow: (str: string) => string;
|
|
226
|
-
static blue: (str: string) => string;
|
|
227
|
-
static magenta: (str: string) => string;
|
|
228
|
-
static cyan: (str: string) => string;
|
|
229
|
-
static Gray: (str: string) => string;
|
|
230
|
-
static Red: (str: string) => string;
|
|
231
|
-
static Green: (str: string) => string;
|
|
232
|
-
static Yellow: (str: string) => string;
|
|
233
|
-
static Blue: (str: string) => string;
|
|
234
|
-
static Magenta: (str: string) => string;
|
|
235
|
-
static Cyan: (str: string) => string;
|
|
236
|
-
static ansi(open: number, close: number): (str: string) => string;
|
|
108
|
+
namespace $$ { }
|
|
109
|
+
const $mol_object_field: unique symbol;
|
|
110
|
+
class $mol_object extends $mol_object2 {
|
|
111
|
+
static make<This extends typeof $mol_object>(this: This, config: Partial<InstanceType<This>>): InstanceType<This>;
|
|
237
112
|
}
|
|
238
113
|
}
|
|
239
114
|
|
|
240
|
-
declare namespace $ {
|
|
241
|
-
function $mol_log3_node_make(level: keyof Console, output: 'stdout' | 'stderr', type: string, color: (str: string) => string): (this: $, event: $mol_log3_event<{}>) => () => void;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
115
|
declare namespace $ {
|
|
245
116
|
function $mol_env(): Record<string, string | undefined>;
|
|
246
117
|
}
|
|
@@ -398,6 +269,143 @@ declare namespace $ {
|
|
|
398
269
|
function $mol_compare_deep<Value>(left: Value, right: Value): boolean;
|
|
399
270
|
}
|
|
400
271
|
|
|
272
|
+
declare namespace $ {
|
|
273
|
+
type $mol_log3_event<Fields> = {
|
|
274
|
+
[key in string]: unknown;
|
|
275
|
+
} & {
|
|
276
|
+
time?: string;
|
|
277
|
+
place: unknown;
|
|
278
|
+
message: string;
|
|
279
|
+
} & Fields;
|
|
280
|
+
type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
|
|
281
|
+
let $mol_log3_come: $mol_log3_logger<{}>;
|
|
282
|
+
let $mol_log3_done: $mol_log3_logger<{}>;
|
|
283
|
+
let $mol_log3_fail: $mol_log3_logger<{}>;
|
|
284
|
+
let $mol_log3_warn: $mol_log3_logger<{
|
|
285
|
+
hint: string;
|
|
286
|
+
}>;
|
|
287
|
+
let $mol_log3_rise: $mol_log3_logger<{}>;
|
|
288
|
+
let $mol_log3_area: $mol_log3_logger<{}, () => void>;
|
|
289
|
+
function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
|
|
290
|
+
let $mol_log3_stack: (() => void)[];
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
declare namespace $ {
|
|
294
|
+
class $mol_span extends $mol_object2 {
|
|
295
|
+
readonly uri: string;
|
|
296
|
+
readonly source: string;
|
|
297
|
+
readonly row: number;
|
|
298
|
+
readonly col: number;
|
|
299
|
+
readonly length: number;
|
|
300
|
+
constructor(uri: string, source: string, row: number, col: number, length: number);
|
|
301
|
+
static unknown: $mol_span;
|
|
302
|
+
static begin(uri: string, source?: string): $mol_span;
|
|
303
|
+
static end(uri: string, source: string): $mol_span;
|
|
304
|
+
static entire(uri: string, source: string): $mol_span;
|
|
305
|
+
toString(): string;
|
|
306
|
+
toJSON(): {
|
|
307
|
+
uri: string;
|
|
308
|
+
row: number;
|
|
309
|
+
col: number;
|
|
310
|
+
length: number;
|
|
311
|
+
};
|
|
312
|
+
error(message: string, Class?: ErrorConstructor): Error;
|
|
313
|
+
span(row: number, col: number, length: number): $mol_span;
|
|
314
|
+
after(length?: number): $mol_span;
|
|
315
|
+
slice(begin: number, end?: number): $mol_span;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
declare namespace $ {
|
|
320
|
+
function $mol_tree2_to_string(this: $, tree: $mol_tree2): string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
declare namespace $ {
|
|
324
|
+
type $mol_tree2_path = Array<string | number | null>;
|
|
325
|
+
type $mol_tree2_hack<Context> = (input: $mol_tree2, belt: $mol_tree2_belt<Context>, context: Context) => readonly $mol_tree2[];
|
|
326
|
+
type $mol_tree2_belt<Context> = Record<string, $mol_tree2_hack<Context>>;
|
|
327
|
+
class $mol_tree2 extends Object {
|
|
328
|
+
readonly type: string;
|
|
329
|
+
readonly value: string;
|
|
330
|
+
readonly kids: readonly $mol_tree2[];
|
|
331
|
+
readonly span: $mol_span;
|
|
332
|
+
constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span);
|
|
333
|
+
static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
334
|
+
list(kids: readonly $mol_tree2[]): $mol_tree2;
|
|
335
|
+
static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
336
|
+
data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2;
|
|
337
|
+
static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
338
|
+
struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2;
|
|
339
|
+
clone(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
340
|
+
text(): string;
|
|
341
|
+
static fromString(str: string, uri?: string): $mol_tree2;
|
|
342
|
+
toString(): string;
|
|
343
|
+
insert(value: $mol_tree2 | null, ...path: $mol_tree2_path): $mol_tree2;
|
|
344
|
+
select(...path: $mol_tree2_path): $mol_tree2;
|
|
345
|
+
filter(path: string[], value?: string): $mol_tree2;
|
|
346
|
+
hack_self<Context extends {
|
|
347
|
+
span?: $mol_span;
|
|
348
|
+
[key: string]: unknown;
|
|
349
|
+
} = {}>(belt: $mol_tree2_belt<Context>, context?: Context): readonly $mol_tree2[];
|
|
350
|
+
hack<Context extends {
|
|
351
|
+
span?: $mol_span;
|
|
352
|
+
[key: string]: unknown;
|
|
353
|
+
} = {}>(belt: $mol_tree2_belt<Context>, context?: Context): $mol_tree2[];
|
|
354
|
+
error(message: string, Class?: ErrorConstructor): Error;
|
|
355
|
+
}
|
|
356
|
+
class $mol_tree2_empty extends $mol_tree2 {
|
|
357
|
+
constructor();
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
declare namespace $ {
|
|
362
|
+
class $mol_error_syntax extends SyntaxError {
|
|
363
|
+
reason: string;
|
|
364
|
+
line: string;
|
|
365
|
+
span: $mol_span;
|
|
366
|
+
constructor(reason: string, line: string, span: $mol_span);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
declare namespace $ {
|
|
371
|
+
function $mol_tree2_from_string(this: $, str: string, uri?: string): $mol_tree2;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
declare namespace $ {
|
|
375
|
+
function $mol_tree2_from_json(json: any, span?: $mol_span): $mol_tree2;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
declare namespace $ {
|
|
379
|
+
class $mol_term_color {
|
|
380
|
+
static reset: (str: string) => string;
|
|
381
|
+
static bold: (str: string) => string;
|
|
382
|
+
static italic: (str: string) => string;
|
|
383
|
+
static underline: (str: string) => string;
|
|
384
|
+
static inverse: (str: string) => string;
|
|
385
|
+
static hidden: (str: string) => string;
|
|
386
|
+
static strike: (str: string) => string;
|
|
387
|
+
static gray: (str: string) => string;
|
|
388
|
+
static red: (str: string) => string;
|
|
389
|
+
static green: (str: string) => string;
|
|
390
|
+
static yellow: (str: string) => string;
|
|
391
|
+
static blue: (str: string) => string;
|
|
392
|
+
static magenta: (str: string) => string;
|
|
393
|
+
static cyan: (str: string) => string;
|
|
394
|
+
static Gray: (str: string) => string;
|
|
395
|
+
static Red: (str: string) => string;
|
|
396
|
+
static Green: (str: string) => string;
|
|
397
|
+
static Yellow: (str: string) => string;
|
|
398
|
+
static Blue: (str: string) => string;
|
|
399
|
+
static Magenta: (str: string) => string;
|
|
400
|
+
static Cyan: (str: string) => string;
|
|
401
|
+
static ansi(open: number, close: number): (str: string) => string;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare namespace $ {
|
|
406
|
+
function $mol_log3_node_make(level: keyof Console, output: 'stdout' | 'stderr', type: string, color: (str: string) => string): (this: $, event: $mol_log3_event<{}>) => () => void;
|
|
407
|
+
}
|
|
408
|
+
|
|
401
409
|
declare namespace $ {
|
|
402
410
|
class $mol_wire_task<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
|
|
403
411
|
static getter<Host, Args extends readonly unknown[], Result>(task: (this: Host, ...args: Args) => Result): (host: Host, args: Args) => $mol_wire_task<Host, Args, Result>;
|
|
@@ -421,32 +429,40 @@ declare namespace $ {
|
|
|
421
429
|
declare namespace $ {
|
|
422
430
|
type $mol_run_error_context = {
|
|
423
431
|
pid?: number;
|
|
424
|
-
stdout: Buffer;
|
|
425
|
-
stderr: Buffer;
|
|
426
|
-
status?: number | null;
|
|
427
|
-
signal: NodeJS.Signals | null;
|
|
432
|
+
stdout: Buffer | string;
|
|
433
|
+
stderr: Buffer | string;
|
|
428
434
|
};
|
|
429
435
|
class $mol_run_error extends $mol_error_mix<{
|
|
430
|
-
|
|
436
|
+
timeout_kill?: boolean;
|
|
437
|
+
pid?: number;
|
|
431
438
|
signal?: NodeJS.Signals | null;
|
|
439
|
+
status?: number | null;
|
|
440
|
+
command: string;
|
|
441
|
+
dir: string;
|
|
432
442
|
}> {
|
|
433
443
|
}
|
|
434
|
-
const $mol_run_spawn:
|
|
435
|
-
const $mol_run_spawn_sync:
|
|
444
|
+
const $mol_run_spawn: (command: string, args: readonly string[], options: import("child_process").SpawnOptions) => import("child_process").ChildProcess;
|
|
445
|
+
const $mol_run_spawn_sync: (command: string, args?: readonly string[] | undefined, options?: import("child_process").SpawnSyncOptions | undefined) => import("child_process").SpawnSyncReturns<string | Buffer<ArrayBufferLike>>;
|
|
436
446
|
type $mol_run_options = {
|
|
437
447
|
command: readonly string[] | string;
|
|
438
448
|
dir: string;
|
|
439
449
|
timeout?: number;
|
|
440
450
|
env?: Record<string, string | undefined>;
|
|
441
451
|
};
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
452
|
+
class $mol_run extends $mol_object {
|
|
453
|
+
static async_enabled(): boolean;
|
|
454
|
+
static spawn(options: $mol_run_options): import("child_process").SpawnSyncReturns<string | Buffer<ArrayBufferLike>> | $mol_run_error_context;
|
|
455
|
+
static spawn_async({ dir, sync, timeout, command, env }: $mol_run_options & {
|
|
456
|
+
sync?: boolean;
|
|
457
|
+
}): import("child_process").SpawnSyncReturns<string | Buffer<ArrayBufferLike>> | (Promise<$mol_run_error_context> & {
|
|
458
|
+
destructor: () => void;
|
|
459
|
+
});
|
|
460
|
+
static error_message(res?: $mol_run_error_context): string;
|
|
461
|
+
}
|
|
446
462
|
}
|
|
447
463
|
|
|
448
464
|
declare namespace $ {
|
|
449
|
-
function $mol_exec(this: $, dir: string, command: string, ...args: readonly string[]):
|
|
465
|
+
function $mol_exec(this: $, dir: string, command: string, ...args: readonly string[]): import("child_process").SpawnSyncReturns<string | Buffer<ArrayBufferLike>> | $mol_run_error_context;
|
|
450
466
|
}
|
|
451
467
|
|
|
452
468
|
declare namespace $ {
|
|
@@ -716,14 +732,6 @@ declare namespace $ {
|
|
|
716
732
|
let $mol_mem_key: typeof $mol_wire_plex;
|
|
717
733
|
}
|
|
718
734
|
|
|
719
|
-
declare namespace $ {
|
|
720
|
-
namespace $$ { }
|
|
721
|
-
const $mol_object_field: unique symbol;
|
|
722
|
-
class $mol_object extends $mol_object2 {
|
|
723
|
-
static make<This extends typeof $mol_object>(this: This, config: Partial<InstanceType<This>>): InstanceType<This>;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
735
|
declare namespace $ {
|
|
728
736
|
var $mol_dom_context: typeof globalThis;
|
|
729
737
|
}
|
|
@@ -772,27 +780,117 @@ declare namespace $ {
|
|
|
772
780
|
}
|
|
773
781
|
|
|
774
782
|
declare namespace $ {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
783
|
+
function $mol_const<Value>(value: Value): {
|
|
784
|
+
(): Value;
|
|
785
|
+
'()': Value;
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
declare namespace $ {
|
|
790
|
+
let $mol_action: typeof $mol_wire_method;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
declare namespace $ {
|
|
794
|
+
export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
|
|
795
|
+
type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
|
|
796
|
+
type MethodsResultPromisify<Host extends Object> = {
|
|
797
|
+
[K in keyof Host]: FunctionResultPromisify<Host[K]>;
|
|
798
|
+
};
|
|
799
|
+
type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
|
|
800
|
+
export {};
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
declare namespace $ {
|
|
804
|
+
class $mol_lock extends $mol_object {
|
|
805
|
+
protected promise: null | Promise<void>;
|
|
806
|
+
wait(): Promise<() => void>;
|
|
807
|
+
grab(): () => void;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
declare namespace $ {
|
|
812
|
+
function $mol_compare_array<Value extends ArrayLike<unknown>>(a: Value, b: Value): boolean;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
declare namespace $ {
|
|
816
|
+
type $mol_file_transaction_mode = 'create' | 'exists_truncate' | 'exists_fail' | 'read_only' | 'write_only' | 'read_write' | 'append';
|
|
817
|
+
type $mol_file_transaction_buffer = ArrayBufferView;
|
|
818
|
+
class $mol_file_transaction extends $mol_object {
|
|
819
|
+
path(): string;
|
|
820
|
+
modes(): readonly $mol_file_transaction_mode[];
|
|
821
|
+
write(options: {
|
|
822
|
+
buffer: ArrayBufferView | string | readonly ArrayBufferView[];
|
|
823
|
+
offset?: number | null;
|
|
824
|
+
length?: number | null;
|
|
825
|
+
position?: number | null;
|
|
826
|
+
}): number;
|
|
827
|
+
read(): Uint8Array<ArrayBuffer>;
|
|
828
|
+
truncate(size: number): void;
|
|
829
|
+
close(): void;
|
|
830
|
+
destructor(): void;
|
|
782
831
|
}
|
|
783
|
-
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
declare namespace $ {
|
|
835
|
+
class $mol_file_transaction_node extends $mol_file_transaction {
|
|
836
|
+
protected descr(): number;
|
|
837
|
+
write({ buffer, offset, length, position }: {
|
|
838
|
+
buffer: ArrayBufferView | string | readonly ArrayBufferView[];
|
|
839
|
+
offset?: number | null;
|
|
840
|
+
length?: number | null;
|
|
841
|
+
position?: number | null;
|
|
842
|
+
}): number;
|
|
843
|
+
truncate(size: number): void;
|
|
844
|
+
read(): Uint8Array<ArrayBuffer>;
|
|
845
|
+
close(): void;
|
|
784
846
|
}
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
declare namespace $ {
|
|
850
|
+
class $mol_file_base extends $mol_object {
|
|
851
|
+
static absolute<This extends typeof $mol_file_base>(this: This, path: string): InstanceType<This>;
|
|
852
|
+
static relative<This extends typeof $mol_file_base>(this: This, path: string): InstanceType<This>;
|
|
788
853
|
static base: string;
|
|
789
854
|
path(): string;
|
|
790
|
-
parent():
|
|
791
|
-
|
|
855
|
+
parent(): this;
|
|
856
|
+
exists_cut(): boolean;
|
|
857
|
+
protected root(): boolean;
|
|
858
|
+
protected stat(next?: $mol_file_stat | null, virt?: 'virt'): $mol_file_stat | null;
|
|
859
|
+
protected static changed: Set<$mol_file_base>;
|
|
860
|
+
protected static frame: null | $mol_after_timeout;
|
|
861
|
+
protected static changed_add(type: 'change' | 'rename', path: string): void;
|
|
862
|
+
static watch_debounce(): number;
|
|
863
|
+
static flush(): void;
|
|
864
|
+
protected static watching: boolean;
|
|
865
|
+
protected static lock: $mol_lock;
|
|
866
|
+
protected static watch_off(path: string): void;
|
|
867
|
+
static unwatched<Result>(side_effect: () => Result, affected_dir: string): Result;
|
|
792
868
|
reset(): void;
|
|
869
|
+
modified(): Date | null;
|
|
793
870
|
version(): string;
|
|
794
|
-
|
|
795
|
-
|
|
871
|
+
protected info(path: string): null | $mol_file_stat;
|
|
872
|
+
protected ensure(): void;
|
|
873
|
+
protected drop(): void;
|
|
874
|
+
protected copy(to: string): void;
|
|
875
|
+
protected read(): Uint8Array<ArrayBuffer>;
|
|
876
|
+
protected write(buffer: Uint8Array<ArrayBuffer>): void;
|
|
877
|
+
protected kids(): readonly this[];
|
|
878
|
+
readable(opts: {
|
|
879
|
+
start?: number;
|
|
880
|
+
end?: number;
|
|
881
|
+
}): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
882
|
+
writable(opts: {
|
|
883
|
+
start?: number;
|
|
884
|
+
}): WritableStream<Uint8Array<ArrayBuffer>>;
|
|
885
|
+
buffer(next?: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
886
|
+
stat_make(size: number): {
|
|
887
|
+
readonly type: "file";
|
|
888
|
+
readonly size: number;
|
|
889
|
+
readonly atime: Date;
|
|
890
|
+
readonly mtime: Date;
|
|
891
|
+
readonly ctime: Date;
|
|
892
|
+
};
|
|
893
|
+
clone(to: string): this | null;
|
|
796
894
|
watcher(): {
|
|
797
895
|
destructor(): void;
|
|
798
896
|
};
|
|
@@ -800,59 +898,54 @@ declare namespace $ {
|
|
|
800
898
|
type(): "" | $mol_file_type;
|
|
801
899
|
name(): string;
|
|
802
900
|
ext(): string;
|
|
803
|
-
abstract buffer(next?: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
804
901
|
text(next?: string, virt?: 'virt'): string;
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
find(include?: RegExp, exclude?: RegExp):
|
|
902
|
+
text_int(next?: string, virt?: 'virt'): string;
|
|
903
|
+
sub(reset?: null): this[];
|
|
904
|
+
resolve(path: string): this;
|
|
905
|
+
relate(base?: $mol_file_base): string;
|
|
906
|
+
find(include?: RegExp, exclude?: RegExp): this[];
|
|
810
907
|
size(): number;
|
|
811
|
-
open(...modes: readonly ('create' | 'exists_truncate' | 'exists_fail' | 'read_only' | 'write_only' | 'read_write' | 'append')[]): number;
|
|
812
908
|
toJSON(): string;
|
|
909
|
+
open(...modes: readonly $mol_file_transaction_mode[]): $mol_file_transaction;
|
|
813
910
|
}
|
|
814
911
|
}
|
|
815
912
|
|
|
816
913
|
declare namespace $ {
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
declare namespace $ {
|
|
828
|
-
function $mol_compare_array<Value extends ArrayLike<unknown>>(a: Value, b: Value): boolean;
|
|
914
|
+
type $mol_file_type = 'file' | 'dir' | 'link';
|
|
915
|
+
interface $mol_file_stat {
|
|
916
|
+
type: $mol_file_type;
|
|
917
|
+
size: number;
|
|
918
|
+
atime: Date;
|
|
919
|
+
mtime: Date;
|
|
920
|
+
ctime: Date;
|
|
921
|
+
}
|
|
922
|
+
class $mol_file extends $mol_file_base {
|
|
923
|
+
}
|
|
829
924
|
}
|
|
830
925
|
|
|
831
926
|
declare namespace $ {
|
|
832
|
-
|
|
833
|
-
create,
|
|
834
|
-
exists_truncate,
|
|
835
|
-
exists_fail,
|
|
836
|
-
read_only,
|
|
837
|
-
write_only,
|
|
838
|
-
read_write,
|
|
839
|
-
append
|
|
840
|
-
}
|
|
927
|
+
function $mol_file_node_buffer_normalize(buf: Buffer<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
841
928
|
class $mol_file_node extends $mol_file {
|
|
842
|
-
static
|
|
843
|
-
|
|
844
|
-
watcher(): {
|
|
929
|
+
static relative<This extends typeof $mol_file>(this: This, path: string): InstanceType<This>;
|
|
930
|
+
watcher(reset?: null): {
|
|
845
931
|
destructor(): void;
|
|
846
932
|
};
|
|
847
|
-
|
|
848
|
-
ensure():
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
933
|
+
protected info(path: string): $mol_file_stat | null;
|
|
934
|
+
protected ensure(): null | undefined;
|
|
935
|
+
protected copy(to: string): void;
|
|
936
|
+
protected drop(): void;
|
|
937
|
+
protected read(): Uint8Array<ArrayBuffer>;
|
|
938
|
+
protected write(buffer: Uint8Array): undefined;
|
|
939
|
+
protected kids(): this[];
|
|
940
|
+
resolve(path: string): this;
|
|
853
941
|
relate(base?: $mol_file): string;
|
|
854
|
-
|
|
855
|
-
|
|
942
|
+
readable(opts: {
|
|
943
|
+
start?: number;
|
|
944
|
+
end?: number;
|
|
945
|
+
}): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
946
|
+
writable(opts?: {
|
|
947
|
+
start?: number;
|
|
948
|
+
}): WritableStream<Uint8Array<ArrayBuffer>>;
|
|
856
949
|
}
|
|
857
950
|
}
|
|
858
951
|
|
|
@@ -1083,16 +1176,6 @@ declare namespace $ {
|
|
|
1083
1176
|
let $hyoo_sync_masters: string[];
|
|
1084
1177
|
}
|
|
1085
1178
|
|
|
1086
|
-
declare namespace $ {
|
|
1087
|
-
export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
|
|
1088
|
-
type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
|
|
1089
|
-
type MethodsResultPromisify<Host extends Object> = {
|
|
1090
|
-
[K in keyof Host]: FunctionResultPromisify<Host[K]>;
|
|
1091
|
-
};
|
|
1092
|
-
type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
|
|
1093
|
-
export {};
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
1179
|
declare namespace $ {
|
|
1097
1180
|
class $hyoo_sync_yard<Line> extends $mol_object2 {
|
|
1098
1181
|
db_unit_persisted: WeakSet<$hyoo_crowd_unit>;
|