@noxfly/noxus 3.0.0-dev.10 → 3.0.0-dev.11
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/child.d.mts +1 -1
- package/dist/child.d.ts +1 -1
- package/dist/child.js +36 -36
- package/dist/child.js.map +1 -1
- package/dist/child.mjs +36 -36
- package/dist/child.mjs.map +1 -1
- package/dist/main.d.mts +7 -7
- package/dist/main.d.ts +7 -7
- package/dist/main.js +146 -85
- package/dist/main.js.map +1 -1
- package/dist/main.mjs +147 -85
- package/dist/main.mjs.map +1 -1
- package/dist/renderer.js +31 -15
- package/dist/renderer.js.map +1 -1
- package/dist/renderer.mjs +31 -15
- package/dist/renderer.mjs.map +1 -1
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
* @license MIT
|
|
4
4
|
* @author NoxFly
|
|
5
5
|
*/
|
|
6
|
+
var __create = Object.create;
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
7
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
9
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
|
|
12
|
+
var __typeError = (msg) => {
|
|
13
|
+
throw TypeError(msg);
|
|
14
|
+
};
|
|
15
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
16
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
11
17
|
var __esm = (fn, res) => function __init() {
|
|
12
18
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
@@ -24,14 +30,45 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
30
|
return to;
|
|
25
31
|
};
|
|
26
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
|
|
34
|
+
var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
|
|
35
|
+
var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
|
|
36
|
+
var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
|
|
37
|
+
var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
|
|
38
|
+
var __runInitializers = (array, flags, self, value) => {
|
|
39
|
+
for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
|
|
40
|
+
return value;
|
|
41
|
+
};
|
|
42
|
+
var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
43
|
+
var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
|
|
44
|
+
var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
|
|
45
|
+
var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
|
|
46
|
+
var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
|
|
47
|
+
return __privateGet(this, extra);
|
|
48
|
+
}, set [name](x) {
|
|
49
|
+
return __privateSet(this, extra, x);
|
|
50
|
+
} }, name));
|
|
51
|
+
k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
|
|
52
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
53
|
+
ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
|
|
54
|
+
if (k) {
|
|
55
|
+
ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
|
|
56
|
+
if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
|
|
57
|
+
if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
|
|
58
|
+
}
|
|
59
|
+
it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
|
|
60
|
+
if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
|
|
61
|
+
else if (typeof it !== "object" || it === null) __typeError("Object expected");
|
|
62
|
+
else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
|
|
63
|
+
}
|
|
64
|
+
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
34
65
|
};
|
|
66
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
67
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
68
|
+
var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
|
|
69
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
70
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
71
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
35
72
|
|
|
36
73
|
// src/utils/forward-ref.ts
|
|
37
74
|
function forwardRef(fn) {
|
|
@@ -63,6 +100,7 @@ var init_token = __esm({
|
|
|
63
100
|
_Token = class _Token {
|
|
64
101
|
constructor(target) {
|
|
65
102
|
this.target = target;
|
|
103
|
+
__publicField(this, "description");
|
|
66
104
|
this.description = typeof target === "string" ? target : target.name;
|
|
67
105
|
}
|
|
68
106
|
toString() {
|
|
@@ -455,11 +493,11 @@ var init_injector_explorer = __esm({
|
|
|
455
493
|
}
|
|
456
494
|
};
|
|
457
495
|
__name(_InjectorExplorer, "InjectorExplorer");
|
|
458
|
-
_InjectorExplorer
|
|
459
|
-
_InjectorExplorer
|
|
460
|
-
_InjectorExplorer
|
|
461
|
-
_InjectorExplorer
|
|
462
|
-
_InjectorExplorer
|
|
496
|
+
__publicField(_InjectorExplorer, "pending", []);
|
|
497
|
+
__publicField(_InjectorExplorer, "processed", false);
|
|
498
|
+
__publicField(_InjectorExplorer, "accumulating", false);
|
|
499
|
+
__publicField(_InjectorExplorer, "loadingLock", Promise.resolve());
|
|
500
|
+
__publicField(_InjectorExplorer, "controllerRegistrar", null);
|
|
463
501
|
InjectorExplorer = _InjectorExplorer;
|
|
464
502
|
}
|
|
465
503
|
});
|
|
@@ -488,9 +526,9 @@ var init_app_injector = __esm({
|
|
|
488
526
|
_AppInjector = class _AppInjector {
|
|
489
527
|
constructor(name = null) {
|
|
490
528
|
this.name = name;
|
|
491
|
-
this
|
|
492
|
-
this
|
|
493
|
-
this
|
|
529
|
+
__publicField(this, "bindings", /* @__PURE__ */ new Map());
|
|
530
|
+
__publicField(this, "singletons", /* @__PURE__ */ new Map());
|
|
531
|
+
__publicField(this, "scoped", /* @__PURE__ */ new Map());
|
|
494
532
|
}
|
|
495
533
|
/**
|
|
496
534
|
* Creates a child scope for per-request lifetime resolution.
|
|
@@ -589,7 +627,7 @@ init_token();
|
|
|
589
627
|
init_injector_explorer();
|
|
590
628
|
var controllerMetaMap = /* @__PURE__ */ new WeakMap();
|
|
591
629
|
function Controller(options = {}) {
|
|
592
|
-
return (target) => {
|
|
630
|
+
return (target, _context) => {
|
|
593
631
|
const meta = {
|
|
594
632
|
deps: options.deps ?? []
|
|
595
633
|
};
|
|
@@ -614,10 +652,7 @@ init_injector_explorer();
|
|
|
614
652
|
init_token();
|
|
615
653
|
function Injectable(options = {}) {
|
|
616
654
|
const { lifetime = "scope", deps = [] } = options;
|
|
617
|
-
return (target) => {
|
|
618
|
-
if (typeof target !== "function" || !target.prototype) {
|
|
619
|
-
throw new Error(`@Injectable can only be applied to classes, not ${typeof target}`);
|
|
620
|
-
}
|
|
655
|
+
return (target, _context) => {
|
|
621
656
|
const key = target;
|
|
622
657
|
InjectorExplorer.enqueue({
|
|
623
658
|
key,
|
|
@@ -636,26 +671,34 @@ function isAtomicHttpMethod(m) {
|
|
|
636
671
|
return typeof m === "string" && ATOMIC_METHODS.has(m);
|
|
637
672
|
}
|
|
638
673
|
__name(isAtomicHttpMethod, "isAtomicHttpMethod");
|
|
639
|
-
var
|
|
674
|
+
var methodMeta = /* @__PURE__ */ new WeakMap();
|
|
640
675
|
function createRouteDecorator(verb) {
|
|
641
676
|
return (path2, options = {}) => {
|
|
642
|
-
return (
|
|
643
|
-
|
|
644
|
-
const existing = routeMetaMap.get(ctor) ?? [];
|
|
645
|
-
existing.push({
|
|
677
|
+
return (value, context) => {
|
|
678
|
+
methodMeta.set(value, {
|
|
646
679
|
method: verb,
|
|
647
680
|
path: (path2 ?? "").trim().replace(/^\/|\/$/g, ""),
|
|
648
|
-
handler:
|
|
681
|
+
handler: context.name,
|
|
649
682
|
guards: options.guards ?? [],
|
|
650
683
|
middlewares: options.middlewares ?? []
|
|
651
684
|
});
|
|
652
|
-
routeMetaMap.set(ctor, existing);
|
|
653
685
|
};
|
|
654
686
|
};
|
|
655
687
|
}
|
|
656
688
|
__name(createRouteDecorator, "createRouteDecorator");
|
|
657
689
|
function getRouteMetadata(target) {
|
|
658
|
-
|
|
690
|
+
const routes = [];
|
|
691
|
+
const proto = target.prototype;
|
|
692
|
+
for (const key of Object.getOwnPropertyNames(proto)) {
|
|
693
|
+
const fn = proto[key];
|
|
694
|
+
if (typeof fn === "function" && methodMeta.has(fn)) {
|
|
695
|
+
const meta = methodMeta.get(fn);
|
|
696
|
+
if (meta) {
|
|
697
|
+
routes.push(meta);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return routes;
|
|
659
702
|
}
|
|
660
703
|
__name(getRouteMetadata, "getRouteMetadata");
|
|
661
704
|
var Get = createRouteDecorator("GET");
|
|
@@ -675,7 +718,11 @@ var _RadixNode = class _RadixNode {
|
|
|
675
718
|
* @param segment - The segment of the path this node represents.
|
|
676
719
|
*/
|
|
677
720
|
constructor(segment) {
|
|
678
|
-
this
|
|
721
|
+
__publicField(this, "segment");
|
|
722
|
+
__publicField(this, "children", []);
|
|
723
|
+
__publicField(this, "value");
|
|
724
|
+
__publicField(this, "isParam");
|
|
725
|
+
__publicField(this, "paramName");
|
|
679
726
|
this.segment = segment;
|
|
680
727
|
this.isParam = segment.startsWith(":");
|
|
681
728
|
if (this.isParam) {
|
|
@@ -717,7 +764,7 @@ __name(_RadixNode, "RadixNode");
|
|
|
717
764
|
var RadixNode = _RadixNode;
|
|
718
765
|
var _RadixTree = class _RadixTree {
|
|
719
766
|
constructor() {
|
|
720
|
-
this
|
|
767
|
+
__publicField(this, "root", new RadixNode(""));
|
|
721
768
|
}
|
|
722
769
|
/**
|
|
723
770
|
* Inserts a path and its associated value into the Radix Tree.
|
|
@@ -850,7 +897,7 @@ var _ResponseException = class _ResponseException extends Error {
|
|
|
850
897
|
message = statusOrMessage;
|
|
851
898
|
}
|
|
852
899
|
super(message ?? "");
|
|
853
|
-
this
|
|
900
|
+
__publicField(this, "status", 0);
|
|
854
901
|
if (statusCode !== void 0) {
|
|
855
902
|
this.status = statusCode;
|
|
856
903
|
}
|
|
@@ -862,7 +909,7 @@ var ResponseException = _ResponseException;
|
|
|
862
909
|
var _BadRequestException = class _BadRequestException extends ResponseException {
|
|
863
910
|
constructor() {
|
|
864
911
|
super(...arguments);
|
|
865
|
-
this
|
|
912
|
+
__publicField(this, "status", 400);
|
|
866
913
|
}
|
|
867
914
|
};
|
|
868
915
|
__name(_BadRequestException, "BadRequestException");
|
|
@@ -870,7 +917,7 @@ var BadRequestException = _BadRequestException;
|
|
|
870
917
|
var _UnauthorizedException = class _UnauthorizedException extends ResponseException {
|
|
871
918
|
constructor() {
|
|
872
919
|
super(...arguments);
|
|
873
|
-
this
|
|
920
|
+
__publicField(this, "status", 401);
|
|
874
921
|
}
|
|
875
922
|
};
|
|
876
923
|
__name(_UnauthorizedException, "UnauthorizedException");
|
|
@@ -878,7 +925,7 @@ var UnauthorizedException = _UnauthorizedException;
|
|
|
878
925
|
var _PaymentRequiredException = class _PaymentRequiredException extends ResponseException {
|
|
879
926
|
constructor() {
|
|
880
927
|
super(...arguments);
|
|
881
|
-
this
|
|
928
|
+
__publicField(this, "status", 402);
|
|
882
929
|
}
|
|
883
930
|
};
|
|
884
931
|
__name(_PaymentRequiredException, "PaymentRequiredException");
|
|
@@ -886,7 +933,7 @@ var PaymentRequiredException = _PaymentRequiredException;
|
|
|
886
933
|
var _ForbiddenException = class _ForbiddenException extends ResponseException {
|
|
887
934
|
constructor() {
|
|
888
935
|
super(...arguments);
|
|
889
|
-
this
|
|
936
|
+
__publicField(this, "status", 403);
|
|
890
937
|
}
|
|
891
938
|
};
|
|
892
939
|
__name(_ForbiddenException, "ForbiddenException");
|
|
@@ -894,7 +941,7 @@ var ForbiddenException = _ForbiddenException;
|
|
|
894
941
|
var _NotFoundException = class _NotFoundException extends ResponseException {
|
|
895
942
|
constructor() {
|
|
896
943
|
super(...arguments);
|
|
897
|
-
this
|
|
944
|
+
__publicField(this, "status", 404);
|
|
898
945
|
}
|
|
899
946
|
};
|
|
900
947
|
__name(_NotFoundException, "NotFoundException");
|
|
@@ -902,7 +949,7 @@ var NotFoundException = _NotFoundException;
|
|
|
902
949
|
var _MethodNotAllowedException = class _MethodNotAllowedException extends ResponseException {
|
|
903
950
|
constructor() {
|
|
904
951
|
super(...arguments);
|
|
905
|
-
this
|
|
952
|
+
__publicField(this, "status", 405);
|
|
906
953
|
}
|
|
907
954
|
};
|
|
908
955
|
__name(_MethodNotAllowedException, "MethodNotAllowedException");
|
|
@@ -910,7 +957,7 @@ var MethodNotAllowedException = _MethodNotAllowedException;
|
|
|
910
957
|
var _NotAcceptableException = class _NotAcceptableException extends ResponseException {
|
|
911
958
|
constructor() {
|
|
912
959
|
super(...arguments);
|
|
913
|
-
this
|
|
960
|
+
__publicField(this, "status", 406);
|
|
914
961
|
}
|
|
915
962
|
};
|
|
916
963
|
__name(_NotAcceptableException, "NotAcceptableException");
|
|
@@ -918,7 +965,7 @@ var NotAcceptableException = _NotAcceptableException;
|
|
|
918
965
|
var _RequestTimeoutException = class _RequestTimeoutException extends ResponseException {
|
|
919
966
|
constructor() {
|
|
920
967
|
super(...arguments);
|
|
921
|
-
this
|
|
968
|
+
__publicField(this, "status", 408);
|
|
922
969
|
}
|
|
923
970
|
};
|
|
924
971
|
__name(_RequestTimeoutException, "RequestTimeoutException");
|
|
@@ -926,7 +973,7 @@ var RequestTimeoutException = _RequestTimeoutException;
|
|
|
926
973
|
var _ConflictException = class _ConflictException extends ResponseException {
|
|
927
974
|
constructor() {
|
|
928
975
|
super(...arguments);
|
|
929
|
-
this
|
|
976
|
+
__publicField(this, "status", 409);
|
|
930
977
|
}
|
|
931
978
|
};
|
|
932
979
|
__name(_ConflictException, "ConflictException");
|
|
@@ -934,7 +981,7 @@ var ConflictException = _ConflictException;
|
|
|
934
981
|
var _UpgradeRequiredException = class _UpgradeRequiredException extends ResponseException {
|
|
935
982
|
constructor() {
|
|
936
983
|
super(...arguments);
|
|
937
|
-
this
|
|
984
|
+
__publicField(this, "status", 426);
|
|
938
985
|
}
|
|
939
986
|
};
|
|
940
987
|
__name(_UpgradeRequiredException, "UpgradeRequiredException");
|
|
@@ -942,7 +989,7 @@ var UpgradeRequiredException = _UpgradeRequiredException;
|
|
|
942
989
|
var _TooManyRequestsException = class _TooManyRequestsException extends ResponseException {
|
|
943
990
|
constructor() {
|
|
944
991
|
super(...arguments);
|
|
945
|
-
this
|
|
992
|
+
__publicField(this, "status", 429);
|
|
946
993
|
}
|
|
947
994
|
};
|
|
948
995
|
__name(_TooManyRequestsException, "TooManyRequestsException");
|
|
@@ -950,7 +997,7 @@ var TooManyRequestsException = _TooManyRequestsException;
|
|
|
950
997
|
var _InternalServerException = class _InternalServerException extends ResponseException {
|
|
951
998
|
constructor() {
|
|
952
999
|
super(...arguments);
|
|
953
|
-
this
|
|
1000
|
+
__publicField(this, "status", 500);
|
|
954
1001
|
}
|
|
955
1002
|
};
|
|
956
1003
|
__name(_InternalServerException, "InternalServerException");
|
|
@@ -958,7 +1005,7 @@ var InternalServerException = _InternalServerException;
|
|
|
958
1005
|
var _NotImplementedException = class _NotImplementedException extends ResponseException {
|
|
959
1006
|
constructor() {
|
|
960
1007
|
super(...arguments);
|
|
961
|
-
this
|
|
1008
|
+
__publicField(this, "status", 501);
|
|
962
1009
|
}
|
|
963
1010
|
};
|
|
964
1011
|
__name(_NotImplementedException, "NotImplementedException");
|
|
@@ -966,7 +1013,7 @@ var NotImplementedException = _NotImplementedException;
|
|
|
966
1013
|
var _BadGatewayException = class _BadGatewayException extends ResponseException {
|
|
967
1014
|
constructor() {
|
|
968
1015
|
super(...arguments);
|
|
969
|
-
this
|
|
1016
|
+
__publicField(this, "status", 502);
|
|
970
1017
|
}
|
|
971
1018
|
};
|
|
972
1019
|
__name(_BadGatewayException, "BadGatewayException");
|
|
@@ -974,7 +1021,7 @@ var BadGatewayException = _BadGatewayException;
|
|
|
974
1021
|
var _ServiceUnavailableException = class _ServiceUnavailableException extends ResponseException {
|
|
975
1022
|
constructor() {
|
|
976
1023
|
super(...arguments);
|
|
977
|
-
this
|
|
1024
|
+
__publicField(this, "status", 503);
|
|
978
1025
|
}
|
|
979
1026
|
};
|
|
980
1027
|
__name(_ServiceUnavailableException, "ServiceUnavailableException");
|
|
@@ -982,7 +1029,7 @@ var ServiceUnavailableException = _ServiceUnavailableException;
|
|
|
982
1029
|
var _GatewayTimeoutException = class _GatewayTimeoutException extends ResponseException {
|
|
983
1030
|
constructor() {
|
|
984
1031
|
super(...arguments);
|
|
985
|
-
this
|
|
1032
|
+
__publicField(this, "status", 504);
|
|
986
1033
|
}
|
|
987
1034
|
};
|
|
988
1035
|
__name(_GatewayTimeoutException, "GatewayTimeoutException");
|
|
@@ -990,7 +1037,7 @@ var GatewayTimeoutException = _GatewayTimeoutException;
|
|
|
990
1037
|
var _HttpVersionNotSupportedException = class _HttpVersionNotSupportedException extends ResponseException {
|
|
991
1038
|
constructor() {
|
|
992
1039
|
super(...arguments);
|
|
993
|
-
this
|
|
1040
|
+
__publicField(this, "status", 505);
|
|
994
1041
|
}
|
|
995
1042
|
};
|
|
996
1043
|
__name(_HttpVersionNotSupportedException, "HttpVersionNotSupportedException");
|
|
@@ -998,7 +1045,7 @@ var HttpVersionNotSupportedException = _HttpVersionNotSupportedException;
|
|
|
998
1045
|
var _VariantAlsoNegotiatesException = class _VariantAlsoNegotiatesException extends ResponseException {
|
|
999
1046
|
constructor() {
|
|
1000
1047
|
super(...arguments);
|
|
1001
|
-
this
|
|
1048
|
+
__publicField(this, "status", 506);
|
|
1002
1049
|
}
|
|
1003
1050
|
};
|
|
1004
1051
|
__name(_VariantAlsoNegotiatesException, "VariantAlsoNegotiatesException");
|
|
@@ -1006,7 +1053,7 @@ var VariantAlsoNegotiatesException = _VariantAlsoNegotiatesException;
|
|
|
1006
1053
|
var _InsufficientStorageException = class _InsufficientStorageException extends ResponseException {
|
|
1007
1054
|
constructor() {
|
|
1008
1055
|
super(...arguments);
|
|
1009
|
-
this
|
|
1056
|
+
__publicField(this, "status", 507);
|
|
1010
1057
|
}
|
|
1011
1058
|
};
|
|
1012
1059
|
__name(_InsufficientStorageException, "InsufficientStorageException");
|
|
@@ -1014,7 +1061,7 @@ var InsufficientStorageException = _InsufficientStorageException;
|
|
|
1014
1061
|
var _LoopDetectedException = class _LoopDetectedException extends ResponseException {
|
|
1015
1062
|
constructor() {
|
|
1016
1063
|
super(...arguments);
|
|
1017
|
-
this
|
|
1064
|
+
__publicField(this, "status", 508);
|
|
1018
1065
|
}
|
|
1019
1066
|
};
|
|
1020
1067
|
__name(_LoopDetectedException, "LoopDetectedException");
|
|
@@ -1022,7 +1069,7 @@ var LoopDetectedException = _LoopDetectedException;
|
|
|
1022
1069
|
var _NotExtendedException = class _NotExtendedException extends ResponseException {
|
|
1023
1070
|
constructor() {
|
|
1024
1071
|
super(...arguments);
|
|
1025
|
-
this
|
|
1072
|
+
__publicField(this, "status", 510);
|
|
1026
1073
|
}
|
|
1027
1074
|
};
|
|
1028
1075
|
__name(_NotExtendedException, "NotExtendedException");
|
|
@@ -1030,7 +1077,7 @@ var NotExtendedException = _NotExtendedException;
|
|
|
1030
1077
|
var _NetworkAuthenticationRequiredException = class _NetworkAuthenticationRequiredException extends ResponseException {
|
|
1031
1078
|
constructor() {
|
|
1032
1079
|
super(...arguments);
|
|
1033
|
-
this
|
|
1080
|
+
__publicField(this, "status", 511);
|
|
1034
1081
|
}
|
|
1035
1082
|
};
|
|
1036
1083
|
__name(_NetworkAuthenticationRequiredException, "NetworkAuthenticationRequiredException");
|
|
@@ -1038,7 +1085,7 @@ var NetworkAuthenticationRequiredException = _NetworkAuthenticationRequiredExcep
|
|
|
1038
1085
|
var _NetworkConnectTimeoutException = class _NetworkConnectTimeoutException extends ResponseException {
|
|
1039
1086
|
constructor() {
|
|
1040
1087
|
super(...arguments);
|
|
1041
|
-
this
|
|
1088
|
+
__publicField(this, "status", 599);
|
|
1042
1089
|
}
|
|
1043
1090
|
};
|
|
1044
1091
|
__name(_NetworkConnectTimeoutException, "NetworkConnectTimeoutException");
|
|
@@ -1054,8 +1101,9 @@ var _Request = class _Request {
|
|
|
1054
1101
|
this.method = method;
|
|
1055
1102
|
this.path = path2;
|
|
1056
1103
|
this.body = body;
|
|
1057
|
-
this
|
|
1058
|
-
this
|
|
1104
|
+
__publicField(this, "context", RootInjector.createScope());
|
|
1105
|
+
__publicField(this, "params", {});
|
|
1106
|
+
__publicField(this, "query");
|
|
1059
1107
|
this.path = path2.replace(/^\/|\/$/g, "");
|
|
1060
1108
|
this.query = query ?? {};
|
|
1061
1109
|
}
|
|
@@ -1081,12 +1129,14 @@ function isRendererEventMessage(value) {
|
|
|
1081
1129
|
__name(isRendererEventMessage, "isRendererEventMessage");
|
|
1082
1130
|
|
|
1083
1131
|
// src/internal/router.ts
|
|
1084
|
-
var
|
|
1132
|
+
var _Router_decorators, _init;
|
|
1133
|
+
_Router_decorators = [Injectable({ lifetime: "singleton" })];
|
|
1134
|
+
var _Router = class _Router {
|
|
1085
1135
|
constructor() {
|
|
1086
|
-
this
|
|
1087
|
-
this
|
|
1088
|
-
this
|
|
1089
|
-
this
|
|
1136
|
+
__publicField(this, "routes", new RadixTree());
|
|
1137
|
+
__publicField(this, "rootMiddlewares", []);
|
|
1138
|
+
__publicField(this, "lazyRoutes", /* @__PURE__ */ new Map());
|
|
1139
|
+
__publicField(this, "lazyLoadLock", Promise.resolve());
|
|
1090
1140
|
}
|
|
1091
1141
|
// -------------------------------------------------------------------------
|
|
1092
1142
|
// Registration
|
|
@@ -1327,10 +1377,11 @@ var Router = class {
|
|
|
1327
1377
|
}
|
|
1328
1378
|
}
|
|
1329
1379
|
};
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1380
|
+
_init = __decoratorStart(null);
|
|
1381
|
+
_Router = __decorateElement(_init, 0, "Router", _Router_decorators, _Router);
|
|
1382
|
+
__name(_Router, "Router");
|
|
1383
|
+
__runInitializers(_init, 1, _Router);
|
|
1384
|
+
var Router = _Router;
|
|
1334
1385
|
|
|
1335
1386
|
// src/internal/app.ts
|
|
1336
1387
|
import { app, BrowserWindow as BrowserWindow2, ipcMain, MessageChannelMain } from "electron/main";
|
|
@@ -1341,10 +1392,13 @@ init_logger();
|
|
|
1341
1392
|
// src/window/window-manager.ts
|
|
1342
1393
|
import { BrowserWindow } from "electron/main";
|
|
1343
1394
|
init_logger();
|
|
1344
|
-
var
|
|
1395
|
+
var _WindowManager_decorators, _init2;
|
|
1396
|
+
_WindowManager_decorators = [Injectable({ lifetime: "singleton" })];
|
|
1397
|
+
var _WindowManager = class _WindowManager {
|
|
1345
1398
|
constructor() {
|
|
1346
|
-
this
|
|
1347
|
-
this
|
|
1399
|
+
__publicField(this, "_windows", /* @__PURE__ */ new Map());
|
|
1400
|
+
__publicField(this, "listeners", /* @__PURE__ */ new Map());
|
|
1401
|
+
__publicField(this, "_mainWindowId");
|
|
1348
1402
|
}
|
|
1349
1403
|
// -------------------------------------------------------------------------
|
|
1350
1404
|
// Creation
|
|
@@ -1529,16 +1583,19 @@ var WindowManager = class {
|
|
|
1529
1583
|
});
|
|
1530
1584
|
}
|
|
1531
1585
|
};
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1586
|
+
_init2 = __decoratorStart(null);
|
|
1587
|
+
_WindowManager = __decorateElement(_init2, 0, "WindowManager", _WindowManager_decorators, _WindowManager);
|
|
1588
|
+
__name(_WindowManager, "WindowManager");
|
|
1589
|
+
__runInitializers(_init2, 1, _WindowManager);
|
|
1590
|
+
var WindowManager = _WindowManager;
|
|
1536
1591
|
|
|
1537
1592
|
// src/internal/socket.ts
|
|
1538
1593
|
init_logger();
|
|
1539
|
-
var
|
|
1594
|
+
var _NoxSocket_decorators, _init3;
|
|
1595
|
+
_NoxSocket_decorators = [Injectable({ lifetime: "singleton" })];
|
|
1596
|
+
var _NoxSocket = class _NoxSocket {
|
|
1540
1597
|
constructor() {
|
|
1541
|
-
this
|
|
1598
|
+
__publicField(this, "channels", /* @__PURE__ */ new Map());
|
|
1542
1599
|
}
|
|
1543
1600
|
register(senderId, requestChannel, socketChannel) {
|
|
1544
1601
|
this.channels.set(senderId, { request: requestChannel, socket: socketChannel });
|
|
@@ -1579,21 +1636,25 @@ var NoxSocket = class {
|
|
|
1579
1636
|
return true;
|
|
1580
1637
|
}
|
|
1581
1638
|
};
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1639
|
+
_init3 = __decoratorStart(null);
|
|
1640
|
+
_NoxSocket = __decorateElement(_init3, 0, "NoxSocket", _NoxSocket_decorators, _NoxSocket);
|
|
1641
|
+
__name(_NoxSocket, "NoxSocket");
|
|
1642
|
+
__runInitializers(_init3, 1, _NoxSocket);
|
|
1643
|
+
var NoxSocket = _NoxSocket;
|
|
1586
1644
|
|
|
1587
1645
|
// src/internal/app.ts
|
|
1588
|
-
var
|
|
1646
|
+
var _NoxApp_decorators, _init4;
|
|
1647
|
+
_NoxApp_decorators = [Injectable({ lifetime: "singleton", deps: [Router, NoxSocket, WindowManager] })];
|
|
1648
|
+
var _NoxApp = class _NoxApp {
|
|
1589
1649
|
constructor(router, socket, windowManager) {
|
|
1590
1650
|
this.router = router;
|
|
1591
1651
|
this.socket = socket;
|
|
1592
1652
|
this.windowManager = windowManager;
|
|
1653
|
+
__publicField(this, "appService");
|
|
1593
1654
|
// -------------------------------------------------------------------------
|
|
1594
1655
|
// IPC
|
|
1595
1656
|
// -------------------------------------------------------------------------
|
|
1596
|
-
this
|
|
1657
|
+
__publicField(this, "onRendererMessage", /* @__PURE__ */ __name(async (event) => {
|
|
1597
1658
|
const { senderId, requestId, path: path2, method, body, query } = event.data;
|
|
1598
1659
|
const channels = this.socket.get(senderId);
|
|
1599
1660
|
if (!channels) {
|
|
@@ -1613,7 +1674,7 @@ var NoxApp = class {
|
|
|
1613
1674
|
};
|
|
1614
1675
|
channels.request.port1.postMessage(response);
|
|
1615
1676
|
}
|
|
1616
|
-
}, "onRendererMessage");
|
|
1677
|
+
}, "onRendererMessage"));
|
|
1617
1678
|
}
|
|
1618
1679
|
// -------------------------------------------------------------------------
|
|
1619
1680
|
// Initialisation
|
|
@@ -1721,10 +1782,11 @@ var NoxApp = class {
|
|
|
1721
1782
|
this.socket.unregister(channelSenderId);
|
|
1722
1783
|
}
|
|
1723
1784
|
};
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1785
|
+
_init4 = __decoratorStart(null);
|
|
1786
|
+
_NoxApp = __decorateElement(_init4, 0, "NoxApp", _NoxApp_decorators, _NoxApp);
|
|
1787
|
+
__name(_NoxApp, "NoxApp");
|
|
1788
|
+
__runInitializers(_init4, 1, _NoxApp);
|
|
1789
|
+
var NoxApp = _NoxApp;
|
|
1728
1790
|
|
|
1729
1791
|
// src/internal/bootstrap.ts
|
|
1730
1792
|
init_app_injector();
|