@hypen-space/core 0.4.13 → 0.4.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/dist/app.js +8 -82
- package/dist/app.js.map +2 -2
- package/dist/components/builtin.js +8 -82
- package/dist/components/builtin.js.map +2 -2
- package/dist/context.js +8 -3
- package/dist/context.js.map +2 -2
- package/dist/discovery.js +249 -249
- package/dist/discovery.js.map +4 -4
- package/dist/disposable.js +8 -3
- package/dist/disposable.js.map +2 -2
- package/dist/engine.browser.js +167 -131
- package/dist/engine.browser.js.map +2 -2
- package/dist/engine.js +1 -1
- package/dist/engine.js.map +1 -1
- package/dist/events.js +8 -3
- package/dist/events.js.map +2 -2
- package/dist/index.browser.js +278 -154
- package/dist/index.browser.js.map +6 -5
- package/dist/index.js +426 -433
- package/dist/index.js.map +9 -9
- package/dist/loader.js +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/logger.js +8 -3
- package/dist/logger.js.map +2 -2
- package/dist/plugin.js +350 -5
- package/dist/plugin.js.map +4 -3
- package/dist/remote/client.js +8 -93
- package/dist/remote/client.js.map +2 -2
- package/dist/remote/index.js +480 -341
- package/dist/remote/index.js.map +6 -5
- package/dist/remote/server.js +480 -330
- package/dist/remote/server.js.map +6 -5
- package/dist/renderer.js +8 -3
- package/dist/renderer.js.map +2 -2
- package/dist/resolver.js +350 -5
- package/dist/resolver.js.map +4 -3
- package/dist/router.js +8 -3
- package/dist/router.js.map +2 -2
- package/dist/state.js +8 -3
- package/dist/state.js.map +2 -2
- package/package.json +1 -1
- package/wasm-browser/hypen_engine_bg.wasm +0 -0
- package/wasm-browser/package.json +1 -1
- package/wasm-node/hypen_engine_bg.wasm +0 -0
- package/wasm-node/package.json +1 -1
package/dist/index.browser.js
CHANGED
|
@@ -1,99 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
constructor(actionName, cause) {
|
|
25
|
-
super("ACTION_ERROR", `Action handler "${actionName}" failed: ${cause instanceof Error ? cause.message : String(cause)}`, {
|
|
26
|
-
context: { actionName },
|
|
27
|
-
cause: cause instanceof Error ? cause : undefined
|
|
28
|
-
});
|
|
29
|
-
this.name = "ActionError";
|
|
30
|
-
this.actionName = actionName;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
class ConnectionError extends HypenError {
|
|
35
|
-
url;
|
|
36
|
-
attempt;
|
|
37
|
-
constructor(url, cause, attempt) {
|
|
38
|
-
super("CONNECTION_ERROR", `Connection to "${url}" failed${attempt ? ` (attempt ${attempt})` : ""}: ${cause instanceof Error ? cause.message : String(cause)}`, {
|
|
39
|
-
context: { url, attempt },
|
|
40
|
-
cause: cause instanceof Error ? cause : undefined
|
|
41
|
-
});
|
|
42
|
-
this.name = "ConnectionError";
|
|
43
|
-
this.url = url;
|
|
44
|
-
this.attempt = attempt;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
class StateError extends HypenError {
|
|
49
|
-
path;
|
|
50
|
-
constructor(message, path, cause) {
|
|
51
|
-
super("STATE_ERROR", message, {
|
|
52
|
-
context: { path },
|
|
53
|
-
cause: cause instanceof Error ? cause : undefined
|
|
54
|
-
});
|
|
55
|
-
this.name = "StateError";
|
|
56
|
-
this.path = path;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
class ParseError extends HypenError {
|
|
61
|
-
source;
|
|
62
|
-
constructor(message, source, cause) {
|
|
63
|
-
super("PARSE_ERROR", message, {
|
|
64
|
-
context: { source },
|
|
65
|
-
cause: cause instanceof Error ? cause : undefined
|
|
66
|
-
});
|
|
67
|
-
this.name = "ParseError";
|
|
68
|
-
this.source = source;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
class RenderError extends HypenError {
|
|
73
|
-
constructor(message, cause) {
|
|
74
|
-
super("RENDER_ERROR", message, {
|
|
75
|
-
cause: cause instanceof Error ? cause : undefined
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
+
for (let key of __getOwnPropNames(mod))
|
|
10
|
+
if (!__hasOwnProp.call(to, key))
|
|
11
|
+
__defProp(to, key, {
|
|
12
|
+
get: () => mod[key],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __export = (target, all) => {
|
|
18
|
+
for (var name in all)
|
|
19
|
+
__defProp(target, name, {
|
|
20
|
+
get: all[name],
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
set: (newValue) => all[name] = () => newValue
|
|
76
24
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return new StateError(message);
|
|
87
|
-
}
|
|
88
|
-
if (message.startsWith("Parent node not found:")) {
|
|
89
|
-
return new RenderError(message);
|
|
90
|
-
}
|
|
91
|
-
return new RenderError(message);
|
|
92
|
-
}
|
|
25
|
+
};
|
|
26
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
27
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
28
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
29
|
+
}) : x)(function(x) {
|
|
30
|
+
if (typeof require !== "undefined")
|
|
31
|
+
return require.apply(this, arguments);
|
|
32
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
33
|
+
});
|
|
93
34
|
|
|
94
35
|
// src/state.ts
|
|
95
|
-
var IS_PROXY = Symbol.for("hypen.isProxy");
|
|
96
|
-
var RAW_TARGET = Symbol.for("hypen.rawTarget");
|
|
97
36
|
function deepClone(obj) {
|
|
98
37
|
if (obj === null || typeof obj !== "object") {
|
|
99
38
|
return obj;
|
|
@@ -326,33 +265,28 @@ function getStateSnapshot(state) {
|
|
|
326
265
|
}
|
|
327
266
|
return deepClone(state);
|
|
328
267
|
}
|
|
268
|
+
function isStateProxy(value) {
|
|
269
|
+
return value !== null && typeof value === "object" && value[IS_PROXY] === true;
|
|
270
|
+
}
|
|
271
|
+
function unwrapProxy(value) {
|
|
272
|
+
if (value !== null && typeof value === "object" && value[IS_PROXY]) {
|
|
273
|
+
return value[RAW_TARGET];
|
|
274
|
+
}
|
|
275
|
+
return value;
|
|
276
|
+
}
|
|
277
|
+
var IS_PROXY, RAW_TARGET;
|
|
278
|
+
var init_state = __esm(() => {
|
|
279
|
+
IS_PROXY = Symbol.for("hypen.isProxy");
|
|
280
|
+
RAW_TARGET = Symbol.for("hypen.rawTarget");
|
|
281
|
+
});
|
|
329
282
|
|
|
330
283
|
// src/logger.ts
|
|
331
|
-
var LOG_LEVEL_ORDER = {
|
|
332
|
-
debug: 0,
|
|
333
|
-
info: 1,
|
|
334
|
-
warn: 2,
|
|
335
|
-
error: 3,
|
|
336
|
-
none: 4
|
|
337
|
-
};
|
|
338
|
-
var LOG_LEVEL_COLORS = {
|
|
339
|
-
debug: "\x1B[36m",
|
|
340
|
-
info: "\x1B[32m",
|
|
341
|
-
warn: "\x1B[33m",
|
|
342
|
-
error: "\x1B[31m"
|
|
343
|
-
};
|
|
344
|
-
var RESET_COLOR = "\x1B[0m";
|
|
345
284
|
function isProduction() {
|
|
346
285
|
if (typeof process !== "undefined" && process.env) {
|
|
347
286
|
return false;
|
|
348
287
|
}
|
|
349
288
|
return false;
|
|
350
289
|
}
|
|
351
|
-
var config = {
|
|
352
|
-
level: isProduction() ? "error" : "debug",
|
|
353
|
-
colors: true,
|
|
354
|
-
timestamps: false
|
|
355
|
-
};
|
|
356
290
|
function setLogLevel(level) {
|
|
357
291
|
config.level = level;
|
|
358
292
|
}
|
|
@@ -483,49 +417,167 @@ class Logger {
|
|
|
483
417
|
function createLogger(tag) {
|
|
484
418
|
return new Logger(tag);
|
|
485
419
|
}
|
|
486
|
-
var
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
420
|
+
var LOG_LEVEL_ORDER, LOG_LEVEL_COLORS, RESET_COLOR = "\x1B[0m", config, logger, log, frameworkLoggers;
|
|
421
|
+
var init_logger = __esm(() => {
|
|
422
|
+
LOG_LEVEL_ORDER = {
|
|
423
|
+
debug: 0,
|
|
424
|
+
info: 1,
|
|
425
|
+
warn: 2,
|
|
426
|
+
error: 3,
|
|
427
|
+
none: 4
|
|
428
|
+
};
|
|
429
|
+
LOG_LEVEL_COLORS = {
|
|
430
|
+
debug: "\x1B[36m",
|
|
431
|
+
info: "\x1B[32m",
|
|
432
|
+
warn: "\x1B[33m",
|
|
433
|
+
error: "\x1B[31m"
|
|
434
|
+
};
|
|
435
|
+
config = {
|
|
436
|
+
level: isProduction() ? "error" : "debug",
|
|
437
|
+
colors: true,
|
|
438
|
+
timestamps: false
|
|
439
|
+
};
|
|
440
|
+
logger = createLogger("Hypen");
|
|
441
|
+
log = {
|
|
442
|
+
debug: (tag, ...args) => {
|
|
443
|
+
if (!shouldLog("debug"))
|
|
444
|
+
return;
|
|
445
|
+
console.log(formatTag(tag, "debug"), ...args);
|
|
446
|
+
},
|
|
447
|
+
info: (tag, ...args) => {
|
|
448
|
+
if (!shouldLog("info"))
|
|
449
|
+
return;
|
|
450
|
+
console.info(formatTag(tag, "info"), ...args);
|
|
451
|
+
},
|
|
452
|
+
warn: (tag, ...args) => {
|
|
453
|
+
if (!shouldLog("warn"))
|
|
454
|
+
return;
|
|
455
|
+
console.warn(formatTag(tag, "warn"), ...args);
|
|
456
|
+
},
|
|
457
|
+
error: (tag, ...args) => {
|
|
458
|
+
if (!shouldLog("error"))
|
|
459
|
+
return;
|
|
460
|
+
console.error(formatTag(tag, "error"), ...args);
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
frameworkLoggers = {
|
|
464
|
+
hypen: createLogger("Hypen"),
|
|
465
|
+
engine: createLogger("Engine"),
|
|
466
|
+
router: createLogger("Router"),
|
|
467
|
+
state: createLogger("State"),
|
|
468
|
+
events: createLogger("Events"),
|
|
469
|
+
remote: createLogger("Remote"),
|
|
470
|
+
renderer: createLogger("Renderer"),
|
|
471
|
+
module: createLogger("Module"),
|
|
472
|
+
lifecycle: createLogger("Lifecycle"),
|
|
473
|
+
loader: createLogger("Loader"),
|
|
474
|
+
context: createLogger("Context"),
|
|
475
|
+
discovery: createLogger("Discovery"),
|
|
476
|
+
plugin: createLogger("Plugin"),
|
|
477
|
+
canvas: createLogger("Canvas"),
|
|
478
|
+
debug: createLogger("Debug")
|
|
479
|
+
};
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
// src/result.ts
|
|
483
|
+
function Ok(value) {
|
|
484
|
+
return { ok: true, value };
|
|
485
|
+
}
|
|
486
|
+
function Err(error) {
|
|
487
|
+
return { ok: false, error };
|
|
488
|
+
}
|
|
489
|
+
function classifyEngineError(err) {
|
|
490
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
491
|
+
if (message.startsWith("Parse error:")) {
|
|
492
|
+
return new ParseError(message);
|
|
507
493
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
494
|
+
if (message.startsWith("Invalid state:") || message.startsWith("Invalid state patch:")) {
|
|
495
|
+
return new StateError(message);
|
|
496
|
+
}
|
|
497
|
+
if (message.startsWith("Parent node not found:")) {
|
|
498
|
+
return new RenderError(message);
|
|
499
|
+
}
|
|
500
|
+
return new RenderError(message);
|
|
501
|
+
}
|
|
502
|
+
var HypenError, ActionError, ConnectionError, StateError, ParseError, RenderError;
|
|
503
|
+
var init_result = __esm(() => {
|
|
504
|
+
HypenError = class HypenError extends Error {
|
|
505
|
+
code;
|
|
506
|
+
context;
|
|
507
|
+
cause;
|
|
508
|
+
constructor(code, message, options) {
|
|
509
|
+
super(message);
|
|
510
|
+
this.name = "HypenError";
|
|
511
|
+
this.code = code;
|
|
512
|
+
this.context = options?.context;
|
|
513
|
+
this.cause = options?.cause;
|
|
514
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
ActionError = class ActionError extends HypenError {
|
|
518
|
+
actionName;
|
|
519
|
+
constructor(actionName, cause) {
|
|
520
|
+
super("ACTION_ERROR", `Action handler "${actionName}" failed: ${cause instanceof Error ? cause.message : String(cause)}`, {
|
|
521
|
+
context: { actionName },
|
|
522
|
+
cause: cause instanceof Error ? cause : undefined
|
|
523
|
+
});
|
|
524
|
+
this.name = "ActionError";
|
|
525
|
+
this.actionName = actionName;
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
ConnectionError = class ConnectionError extends HypenError {
|
|
529
|
+
url;
|
|
530
|
+
attempt;
|
|
531
|
+
constructor(url, cause, attempt) {
|
|
532
|
+
super("CONNECTION_ERROR", `Connection to "${url}" failed${attempt ? ` (attempt ${attempt})` : ""}: ${cause instanceof Error ? cause.message : String(cause)}`, {
|
|
533
|
+
context: { url, attempt },
|
|
534
|
+
cause: cause instanceof Error ? cause : undefined
|
|
535
|
+
});
|
|
536
|
+
this.name = "ConnectionError";
|
|
537
|
+
this.url = url;
|
|
538
|
+
this.attempt = attempt;
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
StateError = class StateError extends HypenError {
|
|
542
|
+
path;
|
|
543
|
+
constructor(message, path, cause) {
|
|
544
|
+
super("STATE_ERROR", message, {
|
|
545
|
+
context: { path },
|
|
546
|
+
cause: cause instanceof Error ? cause : undefined
|
|
547
|
+
});
|
|
548
|
+
this.name = "StateError";
|
|
549
|
+
this.path = path;
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
ParseError = class ParseError extends HypenError {
|
|
553
|
+
source;
|
|
554
|
+
constructor(message, source, cause) {
|
|
555
|
+
super("PARSE_ERROR", message, {
|
|
556
|
+
context: { source },
|
|
557
|
+
cause: cause instanceof Error ? cause : undefined
|
|
558
|
+
});
|
|
559
|
+
this.name = "ParseError";
|
|
560
|
+
this.source = source;
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
RenderError = class RenderError extends HypenError {
|
|
564
|
+
constructor(message, cause) {
|
|
565
|
+
super("RENDER_ERROR", message, {
|
|
566
|
+
cause: cause instanceof Error ? cause : undefined
|
|
567
|
+
});
|
|
568
|
+
this.name = "RenderError";
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
});
|
|
526
572
|
|
|
527
573
|
// src/app.ts
|
|
528
|
-
var
|
|
574
|
+
var exports_app = {};
|
|
575
|
+
__export(exports_app, {
|
|
576
|
+
app: () => app,
|
|
577
|
+
HypenModuleInstance: () => HypenModuleInstance,
|
|
578
|
+
HypenAppBuilder: () => HypenAppBuilder,
|
|
579
|
+
HypenApp: () => HypenApp
|
|
580
|
+
});
|
|
529
581
|
|
|
530
582
|
class HypenAppBuilder {
|
|
531
583
|
initialState;
|
|
@@ -638,7 +690,6 @@ class HypenApp {
|
|
|
638
690
|
this._registry.clear();
|
|
639
691
|
}
|
|
640
692
|
}
|
|
641
|
-
var app = new HypenApp;
|
|
642
693
|
|
|
643
694
|
class HypenModuleInstance {
|
|
644
695
|
engine;
|
|
@@ -810,7 +861,17 @@ class HypenModuleInstance {
|
|
|
810
861
|
Object.assign(this.state, patch);
|
|
811
862
|
}
|
|
812
863
|
}
|
|
864
|
+
var log2, app;
|
|
865
|
+
var init_app = __esm(() => {
|
|
866
|
+
init_result();
|
|
867
|
+
init_state();
|
|
868
|
+
init_logger();
|
|
869
|
+
log2 = createLogger("ModuleInstance");
|
|
870
|
+
app = new HypenApp;
|
|
871
|
+
});
|
|
872
|
+
|
|
813
873
|
// src/renderer.ts
|
|
874
|
+
init_logger();
|
|
814
875
|
var log3 = frameworkLoggers.renderer;
|
|
815
876
|
|
|
816
877
|
class BaseRenderer {
|
|
@@ -860,7 +921,10 @@ class ConsoleRenderer {
|
|
|
860
921
|
console.groupEnd();
|
|
861
922
|
}
|
|
862
923
|
}
|
|
924
|
+
|
|
863
925
|
// src/router.ts
|
|
926
|
+
init_state();
|
|
927
|
+
init_logger();
|
|
864
928
|
var log4 = frameworkLoggers.router;
|
|
865
929
|
|
|
866
930
|
class HypenRouter {
|
|
@@ -1057,7 +1121,9 @@ class HypenRouter {
|
|
|
1057
1121
|
return `${path}?${queryString}`;
|
|
1058
1122
|
}
|
|
1059
1123
|
}
|
|
1124
|
+
|
|
1060
1125
|
// src/events.ts
|
|
1126
|
+
init_logger();
|
|
1061
1127
|
var log5 = frameworkLoggers.events;
|
|
1062
1128
|
|
|
1063
1129
|
class TypedEventEmitter {
|
|
@@ -1121,7 +1187,9 @@ class TypedEventEmitter {
|
|
|
1121
1187
|
function createEventEmitter() {
|
|
1122
1188
|
return new TypedEventEmitter;
|
|
1123
1189
|
}
|
|
1190
|
+
|
|
1124
1191
|
// src/context.ts
|
|
1192
|
+
init_logger();
|
|
1125
1193
|
var log6 = frameworkLoggers.context;
|
|
1126
1194
|
|
|
1127
1195
|
class HypenGlobalContext {
|
|
@@ -1225,8 +1293,14 @@ class HypenGlobalContext {
|
|
|
1225
1293
|
};
|
|
1226
1294
|
}
|
|
1227
1295
|
}
|
|
1296
|
+
|
|
1228
1297
|
// src/disposable.ts
|
|
1298
|
+
init_logger();
|
|
1229
1299
|
var log7 = frameworkLoggers.lifecycle;
|
|
1300
|
+
function isDisposable(obj) {
|
|
1301
|
+
return obj !== null && typeof obj === "object" && "dispose" in obj && typeof obj.dispose === "function";
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1230
1304
|
class DisposableStack {
|
|
1231
1305
|
stack = [];
|
|
1232
1306
|
disposed = false;
|
|
@@ -1315,6 +1389,17 @@ function getElementDisposables(element) {
|
|
|
1315
1389
|
element[ELEMENT_DISPOSABLES] = stack;
|
|
1316
1390
|
return stack;
|
|
1317
1391
|
}
|
|
1392
|
+
function disposeElement(element) {
|
|
1393
|
+
const stack = element[ELEMENT_DISPOSABLES];
|
|
1394
|
+
if (stack instanceof DisposableStack) {
|
|
1395
|
+
stack.dispose();
|
|
1396
|
+
delete element[ELEMENT_DISPOSABLES];
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
function hasElementDisposables(element) {
|
|
1400
|
+
return element[ELEMENT_DISPOSABLES] instanceof DisposableStack;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1318
1403
|
class DisposableMixin {
|
|
1319
1404
|
disposables = new DisposableStack;
|
|
1320
1405
|
track(disposable) {
|
|
@@ -1327,8 +1412,41 @@ class DisposableMixin {
|
|
|
1327
1412
|
this.disposables.dispose();
|
|
1328
1413
|
}
|
|
1329
1414
|
}
|
|
1415
|
+
function compositeDisposable(...disposables) {
|
|
1416
|
+
return {
|
|
1417
|
+
dispose: () => {
|
|
1418
|
+
for (const d of disposables) {
|
|
1419
|
+
try {
|
|
1420
|
+
d.dispose();
|
|
1421
|
+
} catch (error) {
|
|
1422
|
+
log7.error("Error during dispose:", error);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
}
|
|
1428
|
+
async function using(resource, fn) {
|
|
1429
|
+
const r = typeof resource === "function" ? resource() : resource;
|
|
1430
|
+
try {
|
|
1431
|
+
return await fn(r);
|
|
1432
|
+
} finally {
|
|
1433
|
+
r.dispose();
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
function usingSync(resource, fn) {
|
|
1437
|
+
const r = typeof resource === "function" ? resource() : resource;
|
|
1438
|
+
try {
|
|
1439
|
+
return fn(r);
|
|
1440
|
+
} finally {
|
|
1441
|
+
r.dispose();
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
// src/remote/client.ts
|
|
1446
|
+
init_result();
|
|
1330
1447
|
|
|
1331
1448
|
// src/retry.ts
|
|
1449
|
+
init_result();
|
|
1332
1450
|
var DEFAULT_OPTIONS = {
|
|
1333
1451
|
maxAttempts: 3,
|
|
1334
1452
|
delayMs: 1000,
|
|
@@ -1443,6 +1561,7 @@ var RetryPresets = {
|
|
|
1443
1561
|
};
|
|
1444
1562
|
|
|
1445
1563
|
// src/remote/client.ts
|
|
1564
|
+
init_logger();
|
|
1446
1565
|
var log8 = frameworkLoggers.remote;
|
|
1447
1566
|
|
|
1448
1567
|
class RemoteEngine {
|
|
@@ -1688,6 +1807,11 @@ class RemoteEngine {
|
|
|
1688
1807
|
}, this.options.reconnectInterval);
|
|
1689
1808
|
}
|
|
1690
1809
|
}
|
|
1810
|
+
|
|
1811
|
+
// src/index.browser.ts
|
|
1812
|
+
init_app();
|
|
1813
|
+
init_state();
|
|
1814
|
+
init_logger();
|
|
1691
1815
|
export {
|
|
1692
1816
|
setLogLevel,
|
|
1693
1817
|
setDebugMode,
|
|
@@ -1725,4 +1849,4 @@ export {
|
|
|
1725
1849
|
BaseRenderer
|
|
1726
1850
|
};
|
|
1727
1851
|
|
|
1728
|
-
//# debugId=
|
|
1852
|
+
//# debugId=006453AE9711F57364756E2164756E21
|