mol_db 0.0.1724 → 0.0.1726
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 +486 -0
- package/node.d.ts.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +124 -0
- package/web.d.ts.map +1 -1
package/node.d.ts
CHANGED
|
@@ -18,6 +18,489 @@ declare namespace $ {
|
|
|
18
18
|
var $mol_dom_context: typeof globalThis;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
declare namespace $ {
|
|
22
|
+
function $node_internal_check(name: string): boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare namespace $ {
|
|
26
|
+
function $mol_promise_like(val: any): val is Promise<any>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare namespace $ {
|
|
30
|
+
function $mol_fail(error: any): never;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare namespace $ {
|
|
34
|
+
function $mol_fail_hidden(error: any): never;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare namespace $ {
|
|
38
|
+
function $mol_fail_catch(error: unknown): boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare namespace $ {
|
|
42
|
+
function $mol_try<Result>(handler: () => Result): Result | Error;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare namespace $ {
|
|
46
|
+
function $mol_fail_log(error: unknown): boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare namespace $ {
|
|
50
|
+
function $node_autoinstall(this: typeof $, name: string): void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface $node {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}
|
|
56
|
+
declare var $node: $node;
|
|
57
|
+
|
|
58
|
+
declare namespace $ {
|
|
59
|
+
function $mol_func_name(this: $, func: Function): string;
|
|
60
|
+
function $mol_func_name_from<Target extends Function>(target: Target, source: Function): Target;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare namespace $ {
|
|
64
|
+
class $mol_error_mix<Cause extends {} = {}> extends AggregateError {
|
|
65
|
+
readonly cause: Cause;
|
|
66
|
+
name: string;
|
|
67
|
+
constructor(message: string, cause?: Cause, ...errors: readonly Error[]);
|
|
68
|
+
static [Symbol.toPrimitive](): string;
|
|
69
|
+
static toString(): string;
|
|
70
|
+
static make(...params: ConstructorParameters<typeof $mol_error_mix>): $mol_error_mix<{}>;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare namespace $ {
|
|
75
|
+
const $mol_ambient_ref: unique symbol;
|
|
76
|
+
type $mol_ambient_context = $;
|
|
77
|
+
function $mol_ambient(this: $ | void, overrides: Partial<$>): $;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare namespace $ {
|
|
81
|
+
function $mol_delegate<Value extends object>(proto: Value, target: () => Value): Value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
declare namespace $ {
|
|
85
|
+
const $mol_owning_map: WeakMap<any, any>;
|
|
86
|
+
function $mol_owning_allow<Having>(having: Having): having is Having & {
|
|
87
|
+
destructor(): void;
|
|
88
|
+
};
|
|
89
|
+
function $mol_owning_get<Having, Owner extends object>(having: Having, Owner?: {
|
|
90
|
+
new (): Owner;
|
|
91
|
+
}): Owner | null;
|
|
92
|
+
function $mol_owning_check<Owner, Having>(owner: Owner, having: Having): having is Having & {
|
|
93
|
+
destructor(): void;
|
|
94
|
+
};
|
|
95
|
+
function $mol_owning_catch<Owner, Having>(owner: Owner, having: Having): boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare namespace $ {
|
|
99
|
+
type $mol_type_writable<T> = {
|
|
100
|
+
-readonly [P in keyof T]: T[P];
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare namespace $ {
|
|
105
|
+
const $mol_key_handle: unique symbol;
|
|
106
|
+
const $mol_key_store: WeakMap<object, string>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
declare namespace $ {
|
|
110
|
+
class $mol_object2 {
|
|
111
|
+
static $: $;
|
|
112
|
+
[Symbol.toStringTag]: string;
|
|
113
|
+
[$mol_ambient_ref]: $;
|
|
114
|
+
get $(): $;
|
|
115
|
+
set $(next: $);
|
|
116
|
+
static create<Instance>(this: new (init?: (instance: any) => void) => Instance, init?: (instance: $mol_type_writable<Instance>) => void): Instance;
|
|
117
|
+
static [Symbol.toPrimitive](): any;
|
|
118
|
+
static toString(): any;
|
|
119
|
+
static toJSON(): any;
|
|
120
|
+
static [$mol_key_handle](): any;
|
|
121
|
+
destructor(): void;
|
|
122
|
+
static destructor(): void;
|
|
123
|
+
[Symbol.dispose](): void;
|
|
124
|
+
toString(): string;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare namespace $ {
|
|
129
|
+
namespace $$ { }
|
|
130
|
+
const $mol_object_field: unique symbol;
|
|
131
|
+
class $mol_object extends $mol_object2 {
|
|
132
|
+
static make<This extends typeof $mol_object>(this: This, config: Partial<InstanceType<This>>): InstanceType<This>;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare namespace $ {
|
|
137
|
+
function $mol_env(): Record<string, string | undefined>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
declare namespace $ {
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare namespace $ {
|
|
144
|
+
function $mol_guid(length?: number, exists?: (id: string) => boolean): string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare namespace $ {
|
|
148
|
+
enum $mol_wire_cursor {
|
|
149
|
+
stale = -1,
|
|
150
|
+
doubt = -2,
|
|
151
|
+
fresh = -3,
|
|
152
|
+
final = -4
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare namespace $ {
|
|
157
|
+
class $mol_wire_pub extends Object {
|
|
158
|
+
constructor(id?: string);
|
|
159
|
+
[Symbol.toStringTag]: string;
|
|
160
|
+
data: unknown[];
|
|
161
|
+
static get [Symbol.species](): ArrayConstructor;
|
|
162
|
+
protected sub_from: number;
|
|
163
|
+
get sub_list(): readonly $mol_wire_sub[];
|
|
164
|
+
get sub_empty(): boolean;
|
|
165
|
+
sub_on(sub: $mol_wire_pub, pub_pos: number): number;
|
|
166
|
+
sub_off(sub_pos: number): void;
|
|
167
|
+
reap(): void;
|
|
168
|
+
promote(): void;
|
|
169
|
+
fresh(): void;
|
|
170
|
+
complete(): void;
|
|
171
|
+
get incompleted(): boolean;
|
|
172
|
+
emit(quant?: $mol_wire_cursor): void;
|
|
173
|
+
peer_move(from_pos: number, to_pos: number): void;
|
|
174
|
+
peer_repos(peer_pos: number, self_pos: number): void;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
declare namespace $ {
|
|
179
|
+
interface $mol_wire_sub extends $mol_wire_pub {
|
|
180
|
+
temp: boolean;
|
|
181
|
+
pub_list: $mol_wire_pub[];
|
|
182
|
+
track_on(): $mol_wire_sub | null;
|
|
183
|
+
track_next(pub?: $mol_wire_pub): $mol_wire_pub | null;
|
|
184
|
+
pub_off(pub_pos: number): void;
|
|
185
|
+
track_cut(sub: $mol_wire_pub | null): void;
|
|
186
|
+
track_off(sub: $mol_wire_pub | null): void;
|
|
187
|
+
absorb(quant: $mol_wire_cursor, pos: number): void;
|
|
188
|
+
destructor(): void;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare namespace $ {
|
|
193
|
+
let $mol_wire_auto_sub: $mol_wire_sub | null;
|
|
194
|
+
function $mol_wire_auto(next?: $mol_wire_sub | null): $mol_wire_sub | null;
|
|
195
|
+
const $mol_wire_affected: ($mol_wire_sub | number)[];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare namespace $ {
|
|
199
|
+
function $mol_dev_format_register(config: {
|
|
200
|
+
header: (val: any, config: any) => any;
|
|
201
|
+
hasBody: (val: any, config: any) => false;
|
|
202
|
+
} | {
|
|
203
|
+
header: (val: any, config: any) => any;
|
|
204
|
+
hasBody: (val: any, config: any) => boolean;
|
|
205
|
+
body: (val: any, config: any) => any;
|
|
206
|
+
}): void;
|
|
207
|
+
const $mol_dev_format_head: unique symbol;
|
|
208
|
+
const $mol_dev_format_body: unique symbol;
|
|
209
|
+
function $mol_dev_format_native(obj: any): any[];
|
|
210
|
+
function $mol_dev_format_auto(obj: any): any[];
|
|
211
|
+
function $mol_dev_format_element(element: string, style: object, ...content: any[]): any[];
|
|
212
|
+
let $mol_dev_format_span: (style: object, ...content: any[]) => any[];
|
|
213
|
+
let $mol_dev_format_div: (style: object, ...content: any[]) => any[];
|
|
214
|
+
let $mol_dev_format_ol: (style: object, ...content: any[]) => any[];
|
|
215
|
+
let $mol_dev_format_li: (style: object, ...content: any[]) => any[];
|
|
216
|
+
let $mol_dev_format_table: (style: object, ...content: any[]) => any[];
|
|
217
|
+
let $mol_dev_format_tr: (style: object, ...content: any[]) => any[];
|
|
218
|
+
let $mol_dev_format_td: (style: object, ...content: any[]) => any[];
|
|
219
|
+
let $mol_dev_format_accent: (...args: any[]) => any[];
|
|
220
|
+
let $mol_dev_format_strong: (...args: any[]) => any[];
|
|
221
|
+
let $mol_dev_format_string: (...args: any[]) => any[];
|
|
222
|
+
let $mol_dev_format_shade: (...args: any[]) => any[];
|
|
223
|
+
let $mol_dev_format_indent: (...args: any[]) => any[];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare namespace $ {
|
|
227
|
+
class $mol_wire_pub_sub extends $mol_wire_pub implements $mol_wire_sub {
|
|
228
|
+
protected pub_from: number;
|
|
229
|
+
protected cursor: $mol_wire_cursor;
|
|
230
|
+
get temp(): boolean;
|
|
231
|
+
get pub_list(): $mol_wire_pub[];
|
|
232
|
+
track_on(): $mol_wire_sub | null;
|
|
233
|
+
promote(): void;
|
|
234
|
+
track_next(pub?: $mol_wire_pub): $mol_wire_pub | null;
|
|
235
|
+
track_off(sub: $mol_wire_sub | null): void;
|
|
236
|
+
pub_off(sub_pos: number): void;
|
|
237
|
+
destructor(): void;
|
|
238
|
+
track_cut(): void;
|
|
239
|
+
complete(): void;
|
|
240
|
+
complete_pubs(): void;
|
|
241
|
+
absorb(quant?: $mol_wire_cursor, pos?: number): void;
|
|
242
|
+
[$mol_dev_format_head](): any[];
|
|
243
|
+
get pub_empty(): boolean;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
declare namespace $ {
|
|
248
|
+
class $mol_after_tick extends $mol_object2 {
|
|
249
|
+
task: () => void;
|
|
250
|
+
static promise: Promise<void> | null;
|
|
251
|
+
cancelled: boolean;
|
|
252
|
+
constructor(task: () => void);
|
|
253
|
+
destructor(): void;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare namespace $ {
|
|
258
|
+
abstract class $mol_wire_fiber<Host, Args extends readonly unknown[], Result> extends $mol_wire_pub_sub {
|
|
259
|
+
readonly task: (this: Host, ...args: Args) => Result;
|
|
260
|
+
readonly host?: Host | undefined;
|
|
261
|
+
static warm: boolean;
|
|
262
|
+
static planning: Set<$mol_wire_fiber<any, any, any>>;
|
|
263
|
+
static reaping: Set<$mol_wire_fiber<any, any, any>>;
|
|
264
|
+
static plan_task: $mol_after_tick | null;
|
|
265
|
+
static plan(): void;
|
|
266
|
+
static sync(): void;
|
|
267
|
+
cache: Result | Error | Promise<Result | Error>;
|
|
268
|
+
get args(): Args;
|
|
269
|
+
result(): Result | undefined;
|
|
270
|
+
get incompleted(): boolean;
|
|
271
|
+
field(): string;
|
|
272
|
+
constructor(id: string, task: (this: Host, ...args: Args) => Result, host?: Host | undefined, args?: Args);
|
|
273
|
+
plan(): this;
|
|
274
|
+
reap(): void;
|
|
275
|
+
toString(): string;
|
|
276
|
+
toJSON(): string;
|
|
277
|
+
[$mol_dev_format_head](): any[];
|
|
278
|
+
[$mol_dev_format_body](): null;
|
|
279
|
+
get $(): any;
|
|
280
|
+
emit(quant?: $mol_wire_cursor): void;
|
|
281
|
+
fresh(): this | undefined;
|
|
282
|
+
refresh(): void;
|
|
283
|
+
abstract put(next: Result | Error | Promise<Result | Error>): Result | Error | Promise<Result | Error>;
|
|
284
|
+
sync(): Awaited<Result>;
|
|
285
|
+
async_raw(): Promise<Result>;
|
|
286
|
+
async(): Promise<Result> & {
|
|
287
|
+
destructor(): void;
|
|
288
|
+
};
|
|
289
|
+
step(): Promise<null>;
|
|
290
|
+
destructor(): void;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
declare namespace $ {
|
|
295
|
+
let $mol_compare_deep_cache: WeakMap<any, WeakMap<any, boolean>>;
|
|
296
|
+
function $mol_compare_deep<Value>(left: Value, right: Value): boolean;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
declare namespace $ {
|
|
300
|
+
type $mol_log3_event<Fields> = {
|
|
301
|
+
[key in string]: unknown;
|
|
302
|
+
} & {
|
|
303
|
+
time?: string;
|
|
304
|
+
place: unknown;
|
|
305
|
+
message: string;
|
|
306
|
+
} & Fields;
|
|
307
|
+
type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
|
|
308
|
+
let $mol_log3_come: $mol_log3_logger<{}>;
|
|
309
|
+
let $mol_log3_done: $mol_log3_logger<{}>;
|
|
310
|
+
let $mol_log3_fail: $mol_log3_logger<{}>;
|
|
311
|
+
let $mol_log3_warn: $mol_log3_logger<{
|
|
312
|
+
hint: string;
|
|
313
|
+
}>;
|
|
314
|
+
let $mol_log3_rise: $mol_log3_logger<{}>;
|
|
315
|
+
let $mol_log3_area: $mol_log3_logger<{}, () => void>;
|
|
316
|
+
function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
|
|
317
|
+
let $mol_log3_stack: (() => void)[];
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare namespace $ {
|
|
321
|
+
class $mol_span extends $mol_object2 {
|
|
322
|
+
readonly uri: string;
|
|
323
|
+
readonly source: string;
|
|
324
|
+
readonly row: number;
|
|
325
|
+
readonly col: number;
|
|
326
|
+
readonly length: number;
|
|
327
|
+
constructor(uri: string, source: string, row: number, col: number, length: number);
|
|
328
|
+
static unknown: $mol_span;
|
|
329
|
+
static begin(uri: string, source?: string): $mol_span;
|
|
330
|
+
static end(uri: string, source: string): $mol_span;
|
|
331
|
+
static entire(uri: string, source: string): $mol_span;
|
|
332
|
+
toString(): string;
|
|
333
|
+
toJSON(): {
|
|
334
|
+
uri: string;
|
|
335
|
+
row: number;
|
|
336
|
+
col: number;
|
|
337
|
+
length: number;
|
|
338
|
+
};
|
|
339
|
+
error(message: string, Class?: ErrorConstructor): Error;
|
|
340
|
+
span(row: number, col: number, length: number): $mol_span;
|
|
341
|
+
after(length?: number): $mol_span;
|
|
342
|
+
slice(begin: number, end?: number): $mol_span;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
declare namespace $ {
|
|
347
|
+
function $mol_tree2_to_string(this: $, tree: $mol_tree2): string;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
declare namespace $ {
|
|
351
|
+
function $mol_maybe<Value>(value: Value | null | undefined): Value[];
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
declare namespace $ {
|
|
355
|
+
type $mol_tree2_path = Array<string | number | null>;
|
|
356
|
+
type $mol_tree2_hack<Context> = (input: $mol_tree2, belt: $mol_tree2_belt<Context>, context: Context) => readonly $mol_tree2[];
|
|
357
|
+
type $mol_tree2_belt<Context> = Record<string, $mol_tree2_hack<Context>>;
|
|
358
|
+
class $mol_tree2 extends Object {
|
|
359
|
+
readonly type: string;
|
|
360
|
+
readonly value: string;
|
|
361
|
+
readonly kids: readonly $mol_tree2[];
|
|
362
|
+
readonly span: $mol_span;
|
|
363
|
+
constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span);
|
|
364
|
+
static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
365
|
+
list(kids: readonly $mol_tree2[]): $mol_tree2;
|
|
366
|
+
static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
367
|
+
data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2;
|
|
368
|
+
static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
369
|
+
struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2;
|
|
370
|
+
clone(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
371
|
+
text(): string;
|
|
372
|
+
static fromString(str: string, uri?: string): $mol_tree2;
|
|
373
|
+
toString(): string;
|
|
374
|
+
insert(value: $mol_tree2 | null, ...path: $mol_tree2_path): $mol_tree2;
|
|
375
|
+
update(value: readonly $mol_tree2[], ...path: $mol_tree2_path): readonly $mol_tree2[];
|
|
376
|
+
select(...path: $mol_tree2_path): $mol_tree2;
|
|
377
|
+
filter(path: string[], value?: string): $mol_tree2;
|
|
378
|
+
hack_self<Context extends {
|
|
379
|
+
span?: $mol_span;
|
|
380
|
+
[key: string]: unknown;
|
|
381
|
+
} = {}>(belt: $mol_tree2_belt<Context>, context?: Context): readonly $mol_tree2[];
|
|
382
|
+
hack<Context extends {
|
|
383
|
+
span?: $mol_span;
|
|
384
|
+
[key: string]: unknown;
|
|
385
|
+
} = {}>(belt: $mol_tree2_belt<Context>, context?: Context): $mol_tree2[];
|
|
386
|
+
error(message: string, Class?: ErrorConstructor): Error;
|
|
387
|
+
}
|
|
388
|
+
class $mol_tree2_empty extends $mol_tree2 {
|
|
389
|
+
constructor();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
declare namespace $ {
|
|
394
|
+
class $mol_error_syntax extends SyntaxError {
|
|
395
|
+
reason: string;
|
|
396
|
+
line: string;
|
|
397
|
+
span: $mol_span;
|
|
398
|
+
constructor(reason: string, line: string, span: $mol_span);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
declare namespace $ {
|
|
403
|
+
function $mol_tree2_from_string(this: $, str: string, uri?: string): $mol_tree2;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
declare namespace $ {
|
|
407
|
+
function $mol_array_chunks<Item>(array: readonly Item[], rule: number | ((item: Item, index: number) => boolean)): Item[][];
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
declare namespace $ {
|
|
411
|
+
function $mol_tree2_from_json(json: any, span?: $mol_span): $mol_tree2;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
declare namespace $ {
|
|
415
|
+
class $mol_term_color {
|
|
416
|
+
static reset: (str: string) => string;
|
|
417
|
+
static bold: (str: string) => string;
|
|
418
|
+
static italic: (str: string) => string;
|
|
419
|
+
static underline: (str: string) => string;
|
|
420
|
+
static inverse: (str: string) => string;
|
|
421
|
+
static hidden: (str: string) => string;
|
|
422
|
+
static strike: (str: string) => string;
|
|
423
|
+
static gray: (str: string) => string;
|
|
424
|
+
static red: (str: string) => string;
|
|
425
|
+
static green: (str: string) => string;
|
|
426
|
+
static yellow: (str: string) => string;
|
|
427
|
+
static blue: (str: string) => string;
|
|
428
|
+
static magenta: (str: string) => string;
|
|
429
|
+
static cyan: (str: string) => string;
|
|
430
|
+
static Gray: (str: string) => string;
|
|
431
|
+
static Red: (str: string) => string;
|
|
432
|
+
static Green: (str: string) => string;
|
|
433
|
+
static Yellow: (str: string) => string;
|
|
434
|
+
static Blue: (str: string) => string;
|
|
435
|
+
static Magenta: (str: string) => string;
|
|
436
|
+
static Cyan: (str: string) => string;
|
|
437
|
+
static ansi(open: number, close: number): (str: string) => string;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
declare namespace $ {
|
|
442
|
+
function $mol_log3_node_make(level: keyof Console, output: 'stdout' | 'stderr', type: string, color: (str: string) => string): (this: $, event: $mol_log3_event<{}>) => () => void;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
declare namespace $ {
|
|
446
|
+
class $mol_wire_task<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
|
|
447
|
+
static getter<Host, Args extends readonly unknown[], Result>(task: (this: Host, ...args: Args) => Result): (host: Host, args: Args) => $mol_wire_task<Host, Args, Result>;
|
|
448
|
+
get temp(): boolean;
|
|
449
|
+
complete(): void;
|
|
450
|
+
put(next: Result | Error | Promise<Result | Error>): Error | Result | Promise<Error | Result>;
|
|
451
|
+
destructor(): void;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
declare namespace $ {
|
|
456
|
+
export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
|
|
457
|
+
type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
|
|
458
|
+
type ConstructorResultAwaited<Some> = Some extends new (...args: infer Args) => infer Res ? new (...args: Args) => Res : {};
|
|
459
|
+
type MethodsResultAwaited<Host extends Object> = {
|
|
460
|
+
[K in keyof Host]: FunctionResultAwaited<Host[K]>;
|
|
461
|
+
};
|
|
462
|
+
type ObjectOrFunctionResultAwaited<Some> = (Some extends (...args: any) => unknown ? FunctionResultAwaited<Some> : {}) & (Some extends Object ? MethodsResultAwaited<Some> & ConstructorResultAwaited<Some> : Some);
|
|
463
|
+
export {};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
declare namespace $ {
|
|
467
|
+
type $mol_run_error_context = {
|
|
468
|
+
pid?: number;
|
|
469
|
+
stdout: Buffer | string;
|
|
470
|
+
stderr: Buffer | string;
|
|
471
|
+
};
|
|
472
|
+
class $mol_run_error extends $mol_error_mix<{
|
|
473
|
+
timeout_kill?: boolean;
|
|
474
|
+
pid?: number;
|
|
475
|
+
signal?: NodeJS.Signals | null;
|
|
476
|
+
status?: number | null;
|
|
477
|
+
command: string;
|
|
478
|
+
dir: string;
|
|
479
|
+
}> {
|
|
480
|
+
}
|
|
481
|
+
const $mol_run_spawn: (...args: Parameters<(typeof $node)["child_process"]["spawn"]>) => import("node:child_process").ChildProcess;
|
|
482
|
+
const $mol_run_spawn_sync: (...args: Parameters<(typeof $node)["child_process"]["spawnSync"]>) => import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer>;
|
|
483
|
+
type $mol_run_options = {
|
|
484
|
+
command: readonly string[] | string;
|
|
485
|
+
dir: string;
|
|
486
|
+
timeout?: number;
|
|
487
|
+
env?: Record<string, string | undefined>;
|
|
488
|
+
};
|
|
489
|
+
class $mol_run extends $mol_object {
|
|
490
|
+
static async_enabled(): boolean;
|
|
491
|
+
static spawn(options: $mol_run_options): import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer> | $mol_run_error_context;
|
|
492
|
+
static spawn_async({ dir, sync, timeout, command, env }: $mol_run_options & {
|
|
493
|
+
sync?: boolean;
|
|
494
|
+
}): import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer> | (Promise<$mol_run_error_context> & {
|
|
495
|
+
destructor: () => void;
|
|
496
|
+
});
|
|
497
|
+
static error_message(res?: $mol_run_error_context): string;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
declare namespace $ {
|
|
502
|
+
}
|
|
503
|
+
|
|
21
504
|
declare namespace $ {
|
|
22
505
|
function $mol_db_response<Result>(request: IDBRequest<Result>): Promise<Result>;
|
|
23
506
|
}
|
|
@@ -86,6 +569,9 @@ declare namespace $ {
|
|
|
86
569
|
};
|
|
87
570
|
}
|
|
88
571
|
|
|
572
|
+
declare namespace $ {
|
|
573
|
+
}
|
|
574
|
+
|
|
89
575
|
declare namespace $ {
|
|
90
576
|
type $mol_db_schema = Record<string, $mol_db_store_schema>;
|
|
91
577
|
}
|
package/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../mam.d.ts","../../dom/context/context.d.ts","../response/response.d.ts","../db.d.ts","../store/store.d.ts","../store/store_schema.d.ts","../../dom/dom.d.ts","../index/index.d.ts","../index/index_schema.d.ts","../db_schema.d.ts","../database/database.d.ts","../transaction/transaction.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null]}
|
|
1
|
+
{"version":3,"sources":["../../../mam.d.ts","../../dom/context/context.d.ts","../../../node/internal/check/check.node.d.ts","../../promise/like/like.d.ts","../../fail/fail.d.ts","../../fail/hidden/hidden.d.ts","../../fail/catch/catch.d.ts","../../try/try.d.ts","../../fail/log/log.d.ts","../../../node/autoinstall/autoinstall.node.d.ts","../../../node/node.node.d.ts","../../func/name/name.d.ts","../../error/mix/mix.d.ts","../../ambient/ambient.d.ts","../../delegate/delegate.d.ts","../../owning/owning.d.ts","../../type/writable/writable.d.ts","../../key/key.d.ts","../../object2/object2.d.ts","../../object/object.d.ts","../../env/env.d.ts","../../env/env.node.d.ts","../../guid/guid.d.ts","../../wire/cursor/cursor.d.ts","../../wire/pub/pub.d.ts","../../wire/sub/sub.d.ts","../../wire/wire.d.ts","../../dev/format/format.d.ts","../../wire/pub/sub/sub.d.ts","../../after/tick/tick.d.ts","../../wire/fiber/fiber.d.ts","../../compare/deep/deep.d.ts","../../log3/log3.d.ts","../../span/span.d.ts","../../tree2/to/string/string.d.ts","../../maybe/maybe.d.ts","../../tree2/tree2.d.ts","../../error/syntax/syntax.d.ts","../../tree2/from/string/string.d.ts","../../array/chunks/chunks.d.ts","../../tree2/from/json/json.d.ts","../../term/color/color.d.ts","../../log3/log3.node.d.ts","../../wire/task/task.d.ts","../../wire/sync/sync.d.ts","../../run/run.node.d.ts","../../dom/context/context.node.d.ts","../response/response.d.ts","../db.d.ts","../store/store.d.ts","../store/store_schema.d.ts","../../dom/dom.d.ts","../index/index.d.ts","../index/index_schema.d.ts","../db.node.d.ts","../db_schema.d.ts","../database/database.d.ts","../transaction/transaction.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;ACHA;AACA;AACA;ACFA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpCA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzBA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1BA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClCA;AACA;AACA;ACFA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;ACFA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]}
|
package/package.json
CHANGED
package/web.d.ts
CHANGED
|
@@ -1,3 +1,127 @@
|
|
|
1
|
+
declare let _$_: {
|
|
2
|
+
new (): {};
|
|
3
|
+
} & typeof globalThis;
|
|
4
|
+
declare class $ extends _$_ {
|
|
5
|
+
}
|
|
6
|
+
declare namespace $ {
|
|
7
|
+
export type $ = typeof $$;
|
|
8
|
+
export class $$ extends $ {
|
|
9
|
+
static $: $;
|
|
10
|
+
}
|
|
11
|
+
namespace $$ {
|
|
12
|
+
type $$ = $;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare namespace $ {
|
|
18
|
+
var $mol_dom_context: typeof globalThis;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare namespace $ {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare namespace $ {
|
|
25
|
+
function $mol_db_response<Result>(request: IDBRequest<Result>): Promise<Result>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare namespace $ {
|
|
29
|
+
class $mol_db_store<Schema extends $mol_db_store_schema> {
|
|
30
|
+
readonly native: IDBObjectStore;
|
|
31
|
+
constructor(native: IDBObjectStore);
|
|
32
|
+
get name(): string;
|
|
33
|
+
get path(): string | string[] | null;
|
|
34
|
+
get incremental(): boolean;
|
|
35
|
+
get indexes(): { [Name in keyof Schema["Indexes"]]: $mol_db_index<{
|
|
36
|
+
Key: Schema["Indexes"][Name];
|
|
37
|
+
Doc: Schema["Doc"];
|
|
38
|
+
}>; };
|
|
39
|
+
index_make(name: string, path?: string[], unique?: boolean, multiEntry?: boolean): IDBIndex;
|
|
40
|
+
index_drop(name: string): this;
|
|
41
|
+
get transaction(): $mol_db_transaction<$mol_db_schema>;
|
|
42
|
+
get db(): $mol_db_database<$mol_db_schema>;
|
|
43
|
+
clear(): Promise<undefined>;
|
|
44
|
+
count(keys?: Schema['Key'] | IDBKeyRange): Promise<number>;
|
|
45
|
+
put(doc: Schema['Doc'], key?: Schema['Key']): Promise<IDBValidKey>;
|
|
46
|
+
get(key: Schema['Key']): Promise<Schema["Doc"] | undefined>;
|
|
47
|
+
select(key?: Schema['Key'] | IDBKeyRange | null, count?: number): Promise<Schema["Doc"][]>;
|
|
48
|
+
drop(keys: Schema['Key'] | IDBKeyRange): Promise<undefined>;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare namespace $ {
|
|
53
|
+
type $mol_db_store_schema = {
|
|
54
|
+
Key: IDBValidKey;
|
|
55
|
+
Doc: unknown;
|
|
56
|
+
Indexes: Record<string, IDBValidKey[]>;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare namespace $ {
|
|
61
|
+
var $mol_dom: typeof globalThis;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare namespace $ {
|
|
65
|
+
class $mol_db_index<Schema extends $mol_db_index_schema> {
|
|
66
|
+
readonly native: IDBIndex;
|
|
67
|
+
constructor(native: IDBIndex);
|
|
68
|
+
get name(): string;
|
|
69
|
+
get paths(): string[];
|
|
70
|
+
get unique(): boolean;
|
|
71
|
+
get multiple(): boolean;
|
|
72
|
+
get store(): $mol_db_store<$mol_db_store_schema>;
|
|
73
|
+
get transaction(): $mol_db_transaction<$mol_db_schema>;
|
|
74
|
+
get db(): $mol_db_database<$mol_db_schema>;
|
|
75
|
+
count(keys?: Schema['Key'] | IDBKeyRange): Promise<number>;
|
|
76
|
+
get(key: Schema['Key']): Promise<Schema["Doc"] | undefined>;
|
|
77
|
+
select(key?: Schema['Key'] | IDBKeyRange | null, count?: number): Promise<Schema["Doc"][]>;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare namespace $ {
|
|
82
|
+
type $mol_db_index_schema = {
|
|
83
|
+
Key: IDBValidKey[];
|
|
84
|
+
Doc: unknown;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
declare namespace $ {
|
|
89
|
+
function $mol_db<Schema extends $mol_db_schema>(this: $, name: string, ...migrations: ((transaction: $mol_db_transaction<$mol_db_schema>) => void)[]): Promise<$mol_db_database<Schema>>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare namespace $ {
|
|
93
|
+
type $mol_db_schema = Record<string, $mol_db_store_schema>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare namespace $ {
|
|
97
|
+
class $mol_db_database<Schema extends $mol_db_schema> {
|
|
98
|
+
readonly native: IDBDatabase;
|
|
99
|
+
constructor(native: IDBDatabase);
|
|
100
|
+
get name(): string;
|
|
101
|
+
get version(): number;
|
|
102
|
+
get stores(): (keyof Schema)[];
|
|
103
|
+
read<Names extends Exclude<keyof Schema, symbol | number>>(...names: Names[]): Pick<Schema, Names> extends infer T extends $mol_db_schema ? { [Name in keyof T]: $mol_db_store<T[Name]>; } : never;
|
|
104
|
+
change<Names extends Exclude<keyof Schema, symbol | number>>(...names: Names[]): $mol_db_transaction<Pick<Schema, Names>>;
|
|
105
|
+
kill(): Promise<IDBDatabase>;
|
|
106
|
+
destructor(): void;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface IDBTransaction {
|
|
111
|
+
commit(): void;
|
|
112
|
+
}
|
|
113
|
+
declare namespace $ {
|
|
114
|
+
class $mol_db_transaction<Schema extends $mol_db_schema> {
|
|
115
|
+
readonly native: IDBTransaction;
|
|
116
|
+
constructor(native: IDBTransaction);
|
|
117
|
+
get stores(): { [Name in keyof Schema]: $mol_db_store<Schema[Name]>; };
|
|
118
|
+
store_make(name: string): IDBObjectStore;
|
|
119
|
+
store_drop(name: string): this;
|
|
120
|
+
abort(): void;
|
|
121
|
+
commit(): Promise<void>;
|
|
122
|
+
get db(): $mol_db_database<$mol_db_schema>;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
1
125
|
|
|
2
126
|
export = $;
|
|
3
127
|
//# sourceMappingURL=web.d.ts.map
|
package/web.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
1
|
+
{"version":3,"sources":["../../../mam.d.ts","../../dom/context/context.d.ts","../../dom/context/context.web.d.ts","../response/response.d.ts","../store/store.d.ts","../store/store_schema.d.ts","../../dom/dom.d.ts","../index/index.d.ts","../index/index_schema.d.ts","../db.d.ts","../db_schema.d.ts","../database/database.d.ts","../transaction/transaction.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;ACHA;AACA;AACA;ACFA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null]}
|