@aom-js/api 0.1.3 → 0.2.0
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/cjs/controllers/access/access-controller.d.ts +5 -5
- package/dist/cjs/controllers/access/access-controller.js +8 -8
- package/dist/cjs/controllers/events/websockets.d.ts +3 -3
- package/dist/cjs/controllers/events/websockets.js +9 -9
- package/dist/cjs/controllers/id-value/controller.d.ts +6 -6
- package/dist/cjs/controllers/id-value/controller.js +9 -9
- package/dist/cjs/controllers/root.d.ts +3 -3
- package/dist/cjs/controllers/root.d.ts.map +1 -1
- package/dist/cjs/controllers/root.js +4 -4
- package/dist/cjs/controllers/root.js.map +1 -1
- package/dist/cjs/controllers/visualizer.d.ts +2 -2
- package/dist/cjs/controllers/visualizer.d.ts.map +1 -1
- package/dist/cjs/controllers/visualizer.js +5 -5
- package/dist/cjs/controllers/visualizer.js.map +1 -1
- package/dist/mjs/controllers/access/access-controller.d.ts +5 -5
- package/dist/mjs/controllers/access/access-controller.js +8 -8
- package/dist/mjs/controllers/events/websockets.d.ts +3 -3
- package/dist/mjs/controllers/events/websockets.js +9 -9
- package/dist/mjs/controllers/id-value/controller.d.ts +6 -6
- package/dist/mjs/controllers/id-value/controller.js +9 -9
- package/dist/mjs/controllers/root.d.ts +3 -3
- package/dist/mjs/controllers/root.d.ts.map +1 -1
- package/dist/mjs/controllers/root.js +4 -4
- package/dist/mjs/controllers/root.js.map +1 -1
- package/dist/mjs/controllers/visualizer.d.ts +2 -2
- package/dist/mjs/controllers/visualizer.d.ts.map +1 -1
- package/dist/mjs/controllers/visualizer.js +5 -5
- package/dist/mjs/controllers/visualizer.js.map +1 -1
- package/dist/types/controllers/access/access-controller.d.ts +5 -5
- package/dist/types/controllers/events/websockets.d.ts +3 -3
- package/dist/types/controllers/id-value/controller.d.ts +6 -6
- package/dist/types/controllers/root.d.ts +3 -3
- package/dist/types/controllers/visualizer.d.ts +2 -2
- package/package.json +5 -5
|
@@ -6,8 +6,8 @@ import { AomAccessCore, AomAccessMapStructure } from "./types.js";
|
|
|
6
6
|
import { AomAccessMarkerElement, AomAccessToModulesStructure } from "./schemas.js";
|
|
7
7
|
import { AccessTypes } from "./init.js";
|
|
8
8
|
export declare class BaseAccessController {
|
|
9
|
-
static readonly
|
|
10
|
-
static readonly
|
|
9
|
+
static readonly MarkerName: string;
|
|
10
|
+
static readonly AllowedAccessTypes: AccessTypes[] | string[];
|
|
11
11
|
static readonly AccessMarker: typeof AomAccessMarkerElement;
|
|
12
12
|
static readonly AccessCore: typeof AomAccessCore;
|
|
13
13
|
moduleIdent: string;
|
|
@@ -17,14 +17,14 @@ export declare class BaseAccessController {
|
|
|
17
17
|
checkAccessPoint(ident: string, accessMarker: AomAccessMarkerElement): boolean;
|
|
18
18
|
generateAccessMap(allowedAccessTypes: string[], userRoles: AomAccessToModulesStructure[]): void;
|
|
19
19
|
static Init(self: BaseAccessController): Promise<void>;
|
|
20
|
-
static TypesRequired(...accessTypes: typeof this.
|
|
20
|
+
static TypesRequired(...accessTypes: typeof this.AllowedAccessTypes): CombinedDecorator;
|
|
21
21
|
private static IsExtraAccess;
|
|
22
|
-
static SetExtraAccess(...accessTypes: typeof this.
|
|
22
|
+
static SetExtraAccess(...accessTypes: typeof this.AllowedAccessTypes): MethodDecorator;
|
|
23
23
|
layerPassed: boolean;
|
|
24
24
|
static CheckLayerPass(cursor: AomCursor, route: AomRoute, self: BaseAccessController): Promise<void>;
|
|
25
25
|
static ExtraAccess(...middlewares: HandlerFunction[]): CombinedDecorator;
|
|
26
26
|
static Required(self: BaseAccessController, cursor: AomCursor, route: AomRoute): Promise<void | Error>;
|
|
27
|
-
static
|
|
27
|
+
static SetAccessMark(route: AomRoute, cursor: AomCursor): void;
|
|
28
28
|
static toString(): string;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=access-controller.d.ts.map
|
|
@@ -25,7 +25,7 @@ const constants_1 = require("../../constants/index.js");
|
|
|
25
25
|
const responses_1 = require("../../responses/index.js");
|
|
26
26
|
const types_1 = require("./types.js");
|
|
27
27
|
const SafeAccessMarker = (0, router_1.ThisRef)(((constructor) => [
|
|
28
|
-
(0, router_1.UseMarker)(constructor.
|
|
28
|
+
(0, router_1.UseMarker)(constructor.SetAccessMark),
|
|
29
29
|
]));
|
|
30
30
|
let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
31
31
|
constructor() {
|
|
@@ -62,7 +62,7 @@ let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
|
62
62
|
if (!accessTypes.length) {
|
|
63
63
|
throw new Error(constants_1.messages.CONTROLLERS_ACCESS_TYPES_REQUIRED);
|
|
64
64
|
}
|
|
65
|
-
const diff = compat_1.default.difference(accessTypes, this.
|
|
65
|
+
const diff = compat_1.default.difference(accessTypes, this.AllowedAccessTypes);
|
|
66
66
|
if (diff.length) {
|
|
67
67
|
throw new Error(`${constants_1.messages.CONTROLLERS_ACCESS_TYPES_MISMATCH}: ${diff}`);
|
|
68
68
|
}
|
|
@@ -77,7 +77,7 @@ let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
|
77
77
|
return handlerInstance && handlerInstance.extraAccess;
|
|
78
78
|
}
|
|
79
79
|
static SetExtraAccess(...accessTypes) {
|
|
80
|
-
const diff = compat_1.default.difference(accessTypes, this.
|
|
80
|
+
const diff = compat_1.default.difference(accessTypes, this.AllowedAccessTypes);
|
|
81
81
|
if (diff.length) {
|
|
82
82
|
throw new Error(`${constants_1.messages.CONTROLLERS_ACCESS_TYPES_MISMATCH}: ${diff}`);
|
|
83
83
|
}
|
|
@@ -97,7 +97,7 @@ let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
|
97
97
|
if (extraCursor) {
|
|
98
98
|
const extraIdent = extraCursor.$.toString();
|
|
99
99
|
const originIdent = extraCursor.origin.toString();
|
|
100
|
-
const routeAccessControl = route.markers[this.
|
|
100
|
+
const routeAccessControl = route.markers[this.MarkerName];
|
|
101
101
|
const accessPoint = routeAccessControl.accessPoints.find((value) => value.ident === originIdent);
|
|
102
102
|
if (!accessPoint)
|
|
103
103
|
return;
|
|
@@ -133,15 +133,15 @@ let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
|
133
133
|
}
|
|
134
134
|
static async Required(self, cursor, route) {
|
|
135
135
|
const cursorIsEndpoint = route.endpoint.$ === cursor.$;
|
|
136
|
-
const markName = this.
|
|
136
|
+
const markName = this.MarkerName;
|
|
137
137
|
const origin = cursorIsEndpoint ? route.endpoint.$ : cursor.origin;
|
|
138
138
|
const ident = origin.toString();
|
|
139
139
|
if (!self.checkAccessPoint(ident, route.markers[markName])) {
|
|
140
140
|
throw new responses_1.AccessDenyResponse(constants_1.messages.ERROR_ACCESS_DENY);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
static
|
|
144
|
-
const markName = this.
|
|
143
|
+
static SetAccessMark(route, cursor) {
|
|
144
|
+
const markName = this.MarkerName;
|
|
145
145
|
let currentAccessControl;
|
|
146
146
|
if (!route.markers[markName]) {
|
|
147
147
|
currentAccessControl = new this.AccessMarker();
|
|
@@ -220,7 +220,7 @@ __decorate([
|
|
|
220
220
|
__metadata("design:type", Function),
|
|
221
221
|
__metadata("design:paramtypes", [router_2.AomRoute, router_2.AomCursor]),
|
|
222
222
|
__metadata("design:returntype", void 0)
|
|
223
|
-
], BaseAccessController, "
|
|
223
|
+
], BaseAccessController, "SetAccessMark", null);
|
|
224
224
|
exports.BaseAccessController = BaseAccessController = BaseAccessController_1 = __decorate([
|
|
225
225
|
(0, router_3.Controller)()
|
|
226
226
|
], BaseAccessController);
|
|
@@ -5,8 +5,8 @@ import { type HttpRequest, type HttpSocket, type SocketCtx } from "../../types/i
|
|
|
5
5
|
export { WebSocket };
|
|
6
6
|
export declare type WebSocketConnections = Map<string, WebSocket[]>;
|
|
7
7
|
export declare type WithWebSockets<T extends {}> = T & {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Sockets: AomWebSockets;
|
|
9
|
+
SocketsParam?: string | Function;
|
|
10
10
|
};
|
|
11
11
|
export declare type CtxWS = () => WebSocket;
|
|
12
12
|
export declare type OnMessageFunction = (id: string, socket: WebSocket, data: any) => unknown;
|
|
@@ -31,7 +31,7 @@ declare class WebSocketWrapper {
|
|
|
31
31
|
}, id: string): Promise<void>;
|
|
32
32
|
}
|
|
33
33
|
export declare class WebSocketsController {
|
|
34
|
-
static
|
|
34
|
+
static WssMap: SocketServerConnections;
|
|
35
35
|
id: string | null;
|
|
36
36
|
static Define(route: AomRoute): Promise<void>;
|
|
37
37
|
static Connect(ctx: SocketCtx, head: Buffer, self: WebSocketsController, route: AomRoute): Promise<void>;
|
|
@@ -94,17 +94,17 @@ class WebSocketWrapper {
|
|
|
94
94
|
const { req, socket, head } = context;
|
|
95
95
|
const { target } = this;
|
|
96
96
|
wss.handleUpgrade(req, socket, head, (socket) => {
|
|
97
|
-
target.
|
|
97
|
+
target.Sockets.connect(id, socket);
|
|
98
98
|
socket.onerror = (...args) => {
|
|
99
99
|
console.error("socket error", args);
|
|
100
100
|
};
|
|
101
101
|
socket.onopen = (ev) => {
|
|
102
102
|
console.log("socket opened", ev);
|
|
103
103
|
};
|
|
104
|
-
if (target.
|
|
104
|
+
if (target.Sockets.onMessage) {
|
|
105
105
|
socket.onmessage = async (ev) => {
|
|
106
106
|
try {
|
|
107
|
-
await Reflect.apply(target.
|
|
107
|
+
await Reflect.apply(target.Sockets.onMessage, null, [id, socket, ev.data]);
|
|
108
108
|
}
|
|
109
109
|
catch (err) {
|
|
110
110
|
console.error("socket message error", err);
|
|
@@ -113,7 +113,7 @@ class WebSocketWrapper {
|
|
|
113
113
|
}
|
|
114
114
|
socket.onclose = (ev) => {
|
|
115
115
|
console.log("socket closed", id);
|
|
116
|
-
target.
|
|
116
|
+
target.Sockets.disconnect(id, socket);
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
119
|
}
|
|
@@ -121,17 +121,17 @@ class WebSocketWrapper {
|
|
|
121
121
|
let WebSocketsController = WebSocketsController_1 = class WebSocketsController {
|
|
122
122
|
static async Define(route) {
|
|
123
123
|
const target = route.endpoint.$._.target;
|
|
124
|
-
if (!target.
|
|
124
|
+
if (!target.Sockets || !(target.Sockets instanceof AomWebSockets)) {
|
|
125
125
|
throw new Error(constants_1.messages.CONTROLLERS_WEBSOCKETS_WRONG_TARGET);
|
|
126
126
|
}
|
|
127
|
-
const existsWss = this.
|
|
127
|
+
const existsWss = this.WssMap.get(route);
|
|
128
128
|
if (!existsWss) {
|
|
129
129
|
const wsWrap = new WebSocketWrapper(target);
|
|
130
|
-
this.
|
|
130
|
+
this.WssMap.set(route, wsWrap);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
static async Connect(ctx, head, self, route) {
|
|
134
|
-
const wsWrap = this.
|
|
134
|
+
const wsWrap = this.WssMap.get(route);
|
|
135
135
|
if (wsWrap && self.id) {
|
|
136
136
|
const context = { req: ctx.req, socket: ctx.res, head };
|
|
137
137
|
await wsWrap.handle(context, self.id);
|
|
@@ -142,7 +142,7 @@ let WebSocketsController = WebSocketsController_1 = class WebSocketsController {
|
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
exports.WebSocketsController = WebSocketsController;
|
|
145
|
-
WebSocketsController.
|
|
145
|
+
WebSocketsController.WssMap = new Map();
|
|
146
146
|
__decorate([
|
|
147
147
|
(0, router_1.Middleware)(),
|
|
148
148
|
__param(0, (0, router_2.Route)()),
|
|
@@ -4,8 +4,8 @@ type pathIn = "path" | "query" | "header";
|
|
|
4
4
|
export declare class IDController {
|
|
5
5
|
value: any;
|
|
6
6
|
source: any;
|
|
7
|
-
static readonly
|
|
8
|
-
static readonly
|
|
7
|
+
static readonly Attr: string;
|
|
8
|
+
static readonly Pattern: ParamIDSchema;
|
|
9
9
|
static PathID(): Promise<void>;
|
|
10
10
|
static QueryID(): Promise<void>;
|
|
11
11
|
static HeaderID(): Promise<void>;
|
|
@@ -14,7 +14,7 @@ export declare class IDController {
|
|
|
14
14
|
static HeaderValue(self: IDController, data: any): Promise<void>;
|
|
15
15
|
static Assign(self: IDController): Promise<void>;
|
|
16
16
|
static toString(): string;
|
|
17
|
-
static
|
|
17
|
+
static Param(): OpenApiPathParameters;
|
|
18
18
|
static JSONSchema(pathIn: pathIn): OpenApiParameterObject;
|
|
19
19
|
}
|
|
20
20
|
export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, IDPattern: T): {
|
|
@@ -22,8 +22,8 @@ export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, ID
|
|
|
22
22
|
value: any;
|
|
23
23
|
source: any;
|
|
24
24
|
};
|
|
25
|
-
readonly
|
|
26
|
-
|
|
25
|
+
readonly Attr: string;
|
|
26
|
+
Pattern: ParamIDSchema;
|
|
27
27
|
PathID(): Promise<void>;
|
|
28
28
|
QueryID(): Promise<void>;
|
|
29
29
|
HeaderID(): Promise<void>;
|
|
@@ -32,7 +32,7 @@ export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, ID
|
|
|
32
32
|
HeaderValue(self: IDController, data: any): Promise<void>;
|
|
33
33
|
Assign(self: IDController): Promise<void>;
|
|
34
34
|
toString(): string;
|
|
35
|
-
|
|
35
|
+
Param(): OpenApiPathParameters;
|
|
36
36
|
JSONSchema(pathIn: pathIn): OpenApiParameterObject;
|
|
37
37
|
};
|
|
38
38
|
export declare function UUIDParam(attr: string): ReturnType<typeof IDValue<typeof UUIDSchema>>;
|
|
@@ -23,7 +23,7 @@ const router_1 = require("@aom-js/router");
|
|
|
23
23
|
const router_2 = require("@aom-js/router");
|
|
24
24
|
const schemas_1 = require("./schemas.js");
|
|
25
25
|
const PathRefParams = (0, router_1.ThisRef)(((constructor) => {
|
|
26
|
-
return [(0, router_2.PathParameters)(constructor.
|
|
26
|
+
return [(0, router_2.PathParameters)(constructor.Param())];
|
|
27
27
|
}));
|
|
28
28
|
const RefParams = (pathIn) => (0, router_1.ThisRef)(((constructor) => {
|
|
29
29
|
return [(0, router_2.Parameters)(constructor.JSONSchema(pathIn))];
|
|
@@ -42,21 +42,21 @@ let IDController = IDController_1 = class IDController {
|
|
|
42
42
|
self.source = { ...data };
|
|
43
43
|
}
|
|
44
44
|
static async Assign(self) {
|
|
45
|
-
self.value = self.source[this.
|
|
45
|
+
self.value = self.source[this.Attr];
|
|
46
46
|
}
|
|
47
47
|
static toString() {
|
|
48
|
-
return this.
|
|
48
|
+
return this.Pattern.format(this.Attr);
|
|
49
49
|
}
|
|
50
|
-
static
|
|
50
|
+
static Param() {
|
|
51
51
|
return {
|
|
52
52
|
[this.toString()]: this.JSONSchema("path"),
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
static JSONSchema(pathIn) {
|
|
56
56
|
return {
|
|
57
|
-
name: this.
|
|
58
|
-
description: this.
|
|
59
|
-
schema: this.
|
|
57
|
+
name: this.Attr,
|
|
58
|
+
description: this.Attr,
|
|
59
|
+
schema: this.Pattern.schema(),
|
|
60
60
|
required: true,
|
|
61
61
|
in: pathIn,
|
|
62
62
|
};
|
|
@@ -128,8 +128,8 @@ function IDValue(attr, IDPattern) {
|
|
|
128
128
|
var _a;
|
|
129
129
|
return _a = class extends IDController {
|
|
130
130
|
},
|
|
131
|
-
_a.
|
|
132
|
-
_a.
|
|
131
|
+
_a.Attr = attr,
|
|
132
|
+
_a.Pattern = new IDPattern(),
|
|
133
133
|
_a;
|
|
134
134
|
}
|
|
135
135
|
function UUIDParam(attr) {
|
|
@@ -16,11 +16,11 @@ export declare class RoutesStructure<RE extends RouteElement> extends CommonResp
|
|
|
16
16
|
export declare class BaseRootController {
|
|
17
17
|
readonly ident: string;
|
|
18
18
|
static readonly RoutesStructure: typeof RoutesStructure<RouteElement>;
|
|
19
|
-
readonly RouteElement: typeof RouteElement;
|
|
20
|
-
protected static
|
|
19
|
+
static readonly RouteElement: typeof RouteElement;
|
|
20
|
+
protected static DocsJSON: OpenAPIObject;
|
|
21
21
|
readonly docs: OpenApi;
|
|
22
22
|
routes: AomRoute[];
|
|
23
|
-
markersToRoute(_routeElement:
|
|
23
|
+
markersToRoute(_routeElement: RouteElement, _markers: MarkerType): void;
|
|
24
24
|
constructor(..._args: any);
|
|
25
25
|
static InitRoutes(self: BaseRootController, { router }: AomRoute): Promise<void>;
|
|
26
26
|
static Index<RE extends RouteElement, RS extends RoutesStructure<RE>>(self: BaseRootController): RS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/controllers/root.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAc,aAAa,EAAsB,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAA2B,QAAQ,EAA2B,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAAyC,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMhF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAUxC,qBACa,YAAa,SAAQ,cAAc;IAE9C,MAAM,EAAG,MAAM,CAAC;IAGhB,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,EAAG,MAAM,CAAC;CACtB;AAGD,qBACa,eAAe,CAAC,EAAE,SAAS,YAAY,CAAE,SAAQ,cAAc;IAE1E,KAAK,EAAE,MAAM,CAAC;IAQd,MAAM,EAAE,EAAE,EAAE,CAAM;IAElB,YAAY,KAAK,EAAE,MAAM,EAIxB;CACF;AAkCD,qBACa,kBAAkB;IAE7B,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAC;IAGxB,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,OAAO,eAAe,CAAC,YAAY,CAAC,CAAC;IAGtE,QAAQ,CAAC,YAAY,EAAE,OAAO,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/controllers/root.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAc,aAAa,EAAsB,MAAM,gBAAgB,CA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AAS,EAAE,IAAI,EAAE,EAAE,kBAAkB,iBAOnD;IAiBD,MAAM,CAAC,OAAO,CAAQ,GAAG,EAAE,OAAO,GAAG,MAAM,CAK1C;CACF"}
|
|
@@ -86,7 +86,7 @@ let BaseRootController = BaseRootController_1 = class BaseRootController {
|
|
|
86
86
|
const result = new this.RoutesStructure(ident);
|
|
87
87
|
routes.forEach((route) => {
|
|
88
88
|
const { method, path } = route;
|
|
89
|
-
const routeElement = new
|
|
89
|
+
const routeElement = new this.RouteElement();
|
|
90
90
|
routeElement.method = method;
|
|
91
91
|
routeElement.path = path;
|
|
92
92
|
routeElement.operationId = route.endpoint.$.toString();
|
|
@@ -96,10 +96,10 @@ let BaseRootController = BaseRootController_1 = class BaseRootController {
|
|
|
96
96
|
return result;
|
|
97
97
|
}
|
|
98
98
|
static JSONDocs({ docs }) {
|
|
99
|
-
if (!this.
|
|
100
|
-
this.
|
|
99
|
+
if (!this.DocsJSON) {
|
|
100
|
+
this.DocsJSON = docs.toJSON();
|
|
101
101
|
}
|
|
102
|
-
return this.
|
|
102
|
+
return this.DocsJSON;
|
|
103
103
|
}
|
|
104
104
|
static Swagger(ctx) {
|
|
105
105
|
ctx.res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../../src/controllers/root.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA,6CAAkE;AAClE,2CAA2F;AAC3F,2CAA4F;AAC5F,2CAAgF;AAEhF,4CAAwC;AACxC,iCAAmC;AACnC,wDAAgC;AAEhC,4CAA8C;AAG9C,MAAM,kBAAkB,GAAG,IAAA,gBAAO,EAAC,CAAC,CAAsC,WAAc,EAAE,EAAE,CAAC;IAC3F,IAAA,kBAAS,EAAC,WAAW,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;CACpD,CAAgB,CAAC,CAAC;AAOZ,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ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,oBAAQ,CAAC,iCAAiC,CAAC;IACjD,IAAA,kBAAS,EAAC;QACT,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,oBAAQ,CAAC,iCAAiC;QACvD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B,CAAC;IACc,WAAA,IAAA,YAAG,GAAE,CAAA;;;;uCAKpB;6BA3HU,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;;GACA,kBAAkB,CA4H9B"}
|
|
@@ -3,8 +3,8 @@ import { Visualizer } from "@aom-js/visualizer";
|
|
|
3
3
|
import type { BuildGraphOptions, RenderOptions, VisualGraph } from "@aom-js/visualizer";
|
|
4
4
|
import { type HttpCtx } from "../types/index.js";
|
|
5
5
|
export declare class BaseVisualizerController {
|
|
6
|
-
static readonly
|
|
7
|
-
protected static
|
|
6
|
+
static readonly VisualizerOptions: BuildGraphOptions & RenderOptions;
|
|
7
|
+
protected static CreateVisualizer(route: AomRoute): Visualizer;
|
|
8
8
|
static Page(route: AomRoute, ctx: HttpCtx): string;
|
|
9
9
|
static Data(route: AomRoute): VisualGraph;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualizer.d.ts","sourceRoot":"","sources":["../../../src/controllers/visualizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGxF,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAuBxC,qBACa,wBAAwB;IAEnC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,aAAa,CAAM;IAE1E,SAAS,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"visualizer.d.ts","sourceRoot":"","sources":["../../../src/controllers/visualizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGxF,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAuBxC,qBACa,wBAAwB;IAEnC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,aAAa,CAAM;IAE1E,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,UAAU,CAE7D;IAcD,MAAM,CAAC,IAAI,CAAU,KAAK,EAAE,QAAQ,EAAS,GAAG,EAAE,OAAO,GAAG,MAAM,CAKjE;IAUD,MAAM,CAAC,IAAI,CAAU,KAAK,EAAE,QAAQ,GAAG,WAAW,CAEjD;CACF"}
|
|
@@ -17,19 +17,19 @@ const router_1 = require("@aom-js/router");
|
|
|
17
17
|
const visualizer_1 = require("@aom-js/visualizer");
|
|
18
18
|
const constants_1 = require("../constants/index.js");
|
|
19
19
|
let BaseVisualizerController = class BaseVisualizerController {
|
|
20
|
-
static
|
|
21
|
-
return new visualizer_1.Visualizer(route, this.
|
|
20
|
+
static CreateVisualizer(route) {
|
|
21
|
+
return new visualizer_1.Visualizer(route, this.VisualizerOptions);
|
|
22
22
|
}
|
|
23
23
|
static Page(route, ctx) {
|
|
24
24
|
ctx.res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
25
|
-
return this.
|
|
25
|
+
return this.CreateVisualizer(route).html;
|
|
26
26
|
}
|
|
27
27
|
static Data(route) {
|
|
28
|
-
return this.
|
|
28
|
+
return this.CreateVisualizer(route).graph;
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
exports.BaseVisualizerController = BaseVisualizerController;
|
|
32
|
-
BaseVisualizerController.
|
|
32
|
+
BaseVisualizerController.VisualizerOptions = {};
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, router_1.Get)("/visualizer"),
|
|
35
35
|
(0, router_1.Title)(constants_1.messages.CONTROLLERS_VISUALIZER_PAGE),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualizer.js","sourceRoot":"","sources":["../../../src/controllers/visualizer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8F;AAC9F,mDAAgD;AAGhD,4CAAwC;AAyBjC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAIzB,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"visualizer.js","sourceRoot":"","sources":["../../../src/controllers/visualizer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8F;AAC9F,mDAAgD;AAGhD,4CAAwC;AAyBjC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAIzB,MAAM,CAAC,gBAAgB,CAAC,KAAe;QAC/C,OAAO,IAAI,uBAAU,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACvD,CAAC;IAcM,AAAP,MAAM,CAAC,IAAI,CAAU,KAAe,EAAS,GAAY;QAGvD,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC;QAC9D,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;IAC3C,CAAC;IAUM,AAAP,MAAM,CAAC,IAAI,CAAU,KAAe;QAClC,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;IAC5C,CAAC;CACF,CAAA;;AApCiB,0CAAiB,GAAsC,EAAE,AAAxC,CAAyC;AAkBnE;IAPN,IAAA,YAAG,EAAC,aAAa,CAAC;IAClB,IAAA,cAAK,EAAC,oBAAQ,CAAC,2BAA2B,CAAC;IAC3C,IAAA,kBAAS,EAAC;QACT,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,oBAAQ,CAAC,2BAA2B;QACjD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B,CAAC;IACW,WAAA,IAAA,cAAK,GAAE,CAAA;IAAmB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;0CAK3C;AAUM;IAPN,IAAA,YAAG,EAAC,kBAAkB,CAAC;IACvB,IAAA,cAAK,EAAC,oBAAQ,CAAC,2BAA2B,CAAC;IAC3C,IAAA,kBAAS,EAAC;QACT,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,oBAAQ,CAAC,2BAA2B;QACjD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B,CAAC;IACW,WAAA,IAAA,cAAK,GAAE,CAAA;;;;0CAEnB;mCArCU,wBAAwB;IADpC,IAAA,mBAAU,GAAE;GACA,wBAAwB,CAsCpC"}
|
|
@@ -6,8 +6,8 @@ import { AomAccessCore, AomAccessMapStructure } from "./types.js";
|
|
|
6
6
|
import { AomAccessMarkerElement, AomAccessToModulesStructure } from "./schemas.js";
|
|
7
7
|
import { AccessTypes } from "./init.js";
|
|
8
8
|
export declare class BaseAccessController {
|
|
9
|
-
static readonly
|
|
10
|
-
static readonly
|
|
9
|
+
static readonly MarkerName: string;
|
|
10
|
+
static readonly AllowedAccessTypes: AccessTypes[] | string[];
|
|
11
11
|
static readonly AccessMarker: typeof AomAccessMarkerElement;
|
|
12
12
|
static readonly AccessCore: typeof AomAccessCore;
|
|
13
13
|
moduleIdent: string;
|
|
@@ -17,14 +17,14 @@ export declare class BaseAccessController {
|
|
|
17
17
|
checkAccessPoint(ident: string, accessMarker: AomAccessMarkerElement): boolean;
|
|
18
18
|
generateAccessMap(allowedAccessTypes: string[], userRoles: AomAccessToModulesStructure[]): void;
|
|
19
19
|
static Init(self: BaseAccessController): Promise<void>;
|
|
20
|
-
static TypesRequired(...accessTypes: typeof this.
|
|
20
|
+
static TypesRequired(...accessTypes: typeof this.AllowedAccessTypes): CombinedDecorator;
|
|
21
21
|
private static IsExtraAccess;
|
|
22
|
-
static SetExtraAccess(...accessTypes: typeof this.
|
|
22
|
+
static SetExtraAccess(...accessTypes: typeof this.AllowedAccessTypes): MethodDecorator;
|
|
23
23
|
layerPassed: boolean;
|
|
24
24
|
static CheckLayerPass(cursor: AomCursor, route: AomRoute, self: BaseAccessController): Promise<void>;
|
|
25
25
|
static ExtraAccess(...middlewares: HandlerFunction[]): CombinedDecorator;
|
|
26
26
|
static Required(self: BaseAccessController, cursor: AomCursor, route: AomRoute): Promise<void | Error>;
|
|
27
|
-
static
|
|
27
|
+
static SetAccessMark(route: AomRoute, cursor: AomCursor): void;
|
|
28
28
|
static toString(): string;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=access-controller.d.ts.map
|
|
@@ -19,7 +19,7 @@ import { messages } from "../../constants/index.js";
|
|
|
19
19
|
import { AccessDenyResponse } from "../../responses/index.js";
|
|
20
20
|
import { AomAccessMapStructure } from "./types.js";
|
|
21
21
|
const SafeAccessMarker = ThisRef(((constructor) => [
|
|
22
|
-
UseMarker(constructor.
|
|
22
|
+
UseMarker(constructor.SetAccessMark),
|
|
23
23
|
]));
|
|
24
24
|
let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
25
25
|
constructor() {
|
|
@@ -56,7 +56,7 @@ let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
|
56
56
|
if (!accessTypes.length) {
|
|
57
57
|
throw new Error(messages.CONTROLLERS_ACCESS_TYPES_REQUIRED);
|
|
58
58
|
}
|
|
59
|
-
const diff = _.difference(accessTypes, this.
|
|
59
|
+
const diff = _.difference(accessTypes, this.AllowedAccessTypes);
|
|
60
60
|
if (diff.length) {
|
|
61
61
|
throw new Error(`${messages.CONTROLLERS_ACCESS_TYPES_MISMATCH}: ${diff}`);
|
|
62
62
|
}
|
|
@@ -71,7 +71,7 @@ let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
|
71
71
|
return handlerInstance && handlerInstance.extraAccess;
|
|
72
72
|
}
|
|
73
73
|
static SetExtraAccess(...accessTypes) {
|
|
74
|
-
const diff = _.difference(accessTypes, this.
|
|
74
|
+
const diff = _.difference(accessTypes, this.AllowedAccessTypes);
|
|
75
75
|
if (diff.length) {
|
|
76
76
|
throw new Error(`${messages.CONTROLLERS_ACCESS_TYPES_MISMATCH}: ${diff}`);
|
|
77
77
|
}
|
|
@@ -91,7 +91,7 @@ let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
|
91
91
|
if (extraCursor) {
|
|
92
92
|
const extraIdent = extraCursor.$.toString();
|
|
93
93
|
const originIdent = extraCursor.origin.toString();
|
|
94
|
-
const routeAccessControl = route.markers[this.
|
|
94
|
+
const routeAccessControl = route.markers[this.MarkerName];
|
|
95
95
|
const accessPoint = routeAccessControl.accessPoints.find((value) => value.ident === originIdent);
|
|
96
96
|
if (!accessPoint)
|
|
97
97
|
return;
|
|
@@ -127,15 +127,15 @@ let BaseAccessController = BaseAccessController_1 = class BaseAccessController {
|
|
|
127
127
|
}
|
|
128
128
|
static async Required(self, cursor, route) {
|
|
129
129
|
const cursorIsEndpoint = route.endpoint.$ === cursor.$;
|
|
130
|
-
const markName = this.
|
|
130
|
+
const markName = this.MarkerName;
|
|
131
131
|
const origin = cursorIsEndpoint ? route.endpoint.$ : cursor.origin;
|
|
132
132
|
const ident = origin.toString();
|
|
133
133
|
if (!self.checkAccessPoint(ident, route.markers[markName])) {
|
|
134
134
|
throw new AccessDenyResponse(messages.ERROR_ACCESS_DENY);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
static
|
|
138
|
-
const markName = this.
|
|
137
|
+
static SetAccessMark(route, cursor) {
|
|
138
|
+
const markName = this.MarkerName;
|
|
139
139
|
let currentAccessControl;
|
|
140
140
|
if (!route.markers[markName]) {
|
|
141
141
|
currentAccessControl = new this.AccessMarker();
|
|
@@ -215,7 +215,7 @@ __decorate([
|
|
|
215
215
|
__metadata("design:type", Function),
|
|
216
216
|
__metadata("design:paramtypes", [AomRoute, AomCursor]),
|
|
217
217
|
__metadata("design:returntype", void 0)
|
|
218
|
-
], BaseAccessController, "
|
|
218
|
+
], BaseAccessController, "SetAccessMark", null);
|
|
219
219
|
BaseAccessController = BaseAccessController_1 = __decorate([
|
|
220
220
|
Controller()
|
|
221
221
|
], BaseAccessController);
|
|
@@ -5,8 +5,8 @@ import { type HttpRequest, type HttpSocket, type SocketCtx } from "../../types/i
|
|
|
5
5
|
export { WebSocket };
|
|
6
6
|
export declare type WebSocketConnections = Map<string, WebSocket[]>;
|
|
7
7
|
export declare type WithWebSockets<T extends {}> = T & {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Sockets: AomWebSockets;
|
|
9
|
+
SocketsParam?: string | Function;
|
|
10
10
|
};
|
|
11
11
|
export declare type CtxWS = () => WebSocket;
|
|
12
12
|
export declare type OnMessageFunction = (id: string, socket: WebSocket, data: any) => unknown;
|
|
@@ -31,7 +31,7 @@ declare class WebSocketWrapper {
|
|
|
31
31
|
}, id: string): Promise<void>;
|
|
32
32
|
}
|
|
33
33
|
export declare class WebSocketsController {
|
|
34
|
-
static
|
|
34
|
+
static WssMap: SocketServerConnections;
|
|
35
35
|
id: string | null;
|
|
36
36
|
static Define(route: AomRoute): Promise<void>;
|
|
37
37
|
static Connect(ctx: SocketCtx, head: Buffer, self: WebSocketsController, route: AomRoute): Promise<void>;
|
|
@@ -56,17 +56,17 @@ class WebSocketWrapper {
|
|
|
56
56
|
const { req, socket, head } = context;
|
|
57
57
|
const { target } = this;
|
|
58
58
|
wss.handleUpgrade(req, socket, head, (socket) => {
|
|
59
|
-
target.
|
|
59
|
+
target.Sockets.connect(id, socket);
|
|
60
60
|
socket.onerror = (...args) => {
|
|
61
61
|
console.error("socket error", args);
|
|
62
62
|
};
|
|
63
63
|
socket.onopen = (ev) => {
|
|
64
64
|
console.log("socket opened", ev);
|
|
65
65
|
};
|
|
66
|
-
if (target.
|
|
66
|
+
if (target.Sockets.onMessage) {
|
|
67
67
|
socket.onmessage = async (ev) => {
|
|
68
68
|
try {
|
|
69
|
-
await Reflect.apply(target.
|
|
69
|
+
await Reflect.apply(target.Sockets.onMessage, null, [id, socket, ev.data]);
|
|
70
70
|
}
|
|
71
71
|
catch (err) {
|
|
72
72
|
console.error("socket message error", err);
|
|
@@ -75,7 +75,7 @@ class WebSocketWrapper {
|
|
|
75
75
|
}
|
|
76
76
|
socket.onclose = (ev) => {
|
|
77
77
|
console.log("socket closed", id);
|
|
78
|
-
target.
|
|
78
|
+
target.Sockets.disconnect(id, socket);
|
|
79
79
|
};
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -83,17 +83,17 @@ class WebSocketWrapper {
|
|
|
83
83
|
let WebSocketsController = WebSocketsController_1 = class WebSocketsController {
|
|
84
84
|
static async Define(route) {
|
|
85
85
|
const target = route.endpoint.$._.target;
|
|
86
|
-
if (!target.
|
|
86
|
+
if (!target.Sockets || !(target.Sockets instanceof AomWebSockets)) {
|
|
87
87
|
throw new Error(messages.CONTROLLERS_WEBSOCKETS_WRONG_TARGET);
|
|
88
88
|
}
|
|
89
|
-
const existsWss = this.
|
|
89
|
+
const existsWss = this.WssMap.get(route);
|
|
90
90
|
if (!existsWss) {
|
|
91
91
|
const wsWrap = new WebSocketWrapper(target);
|
|
92
|
-
this.
|
|
92
|
+
this.WssMap.set(route, wsWrap);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
static async Connect(ctx, head, self, route) {
|
|
96
|
-
const wsWrap = this.
|
|
96
|
+
const wsWrap = this.WssMap.get(route);
|
|
97
97
|
if (wsWrap && self.id) {
|
|
98
98
|
const context = { req: ctx.req, socket: ctx.res, head };
|
|
99
99
|
await wsWrap.handle(context, self.id);
|
|
@@ -103,7 +103,7 @@ let WebSocketsController = WebSocketsController_1 = class WebSocketsController {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
-
WebSocketsController.
|
|
106
|
+
WebSocketsController.WssMap = new Map();
|
|
107
107
|
__decorate([
|
|
108
108
|
Middleware(),
|
|
109
109
|
__param(0, Route()),
|
|
@@ -4,8 +4,8 @@ type pathIn = "path" | "query" | "header";
|
|
|
4
4
|
export declare class IDController {
|
|
5
5
|
value: any;
|
|
6
6
|
source: any;
|
|
7
|
-
static readonly
|
|
8
|
-
static readonly
|
|
7
|
+
static readonly Attr: string;
|
|
8
|
+
static readonly Pattern: ParamIDSchema;
|
|
9
9
|
static PathID(): Promise<void>;
|
|
10
10
|
static QueryID(): Promise<void>;
|
|
11
11
|
static HeaderID(): Promise<void>;
|
|
@@ -14,7 +14,7 @@ export declare class IDController {
|
|
|
14
14
|
static HeaderValue(self: IDController, data: any): Promise<void>;
|
|
15
15
|
static Assign(self: IDController): Promise<void>;
|
|
16
16
|
static toString(): string;
|
|
17
|
-
static
|
|
17
|
+
static Param(): OpenApiPathParameters;
|
|
18
18
|
static JSONSchema(pathIn: pathIn): OpenApiParameterObject;
|
|
19
19
|
}
|
|
20
20
|
export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, IDPattern: T): {
|
|
@@ -22,8 +22,8 @@ export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, ID
|
|
|
22
22
|
value: any;
|
|
23
23
|
source: any;
|
|
24
24
|
};
|
|
25
|
-
readonly
|
|
26
|
-
|
|
25
|
+
readonly Attr: string;
|
|
26
|
+
Pattern: ParamIDSchema;
|
|
27
27
|
PathID(): Promise<void>;
|
|
28
28
|
QueryID(): Promise<void>;
|
|
29
29
|
HeaderID(): Promise<void>;
|
|
@@ -32,7 +32,7 @@ export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, ID
|
|
|
32
32
|
HeaderValue(self: IDController, data: any): Promise<void>;
|
|
33
33
|
Assign(self: IDController): Promise<void>;
|
|
34
34
|
toString(): string;
|
|
35
|
-
|
|
35
|
+
Param(): OpenApiPathParameters;
|
|
36
36
|
JSONSchema(pathIn: pathIn): OpenApiParameterObject;
|
|
37
37
|
};
|
|
38
38
|
export declare function UUIDParam(attr: string): ReturnType<typeof IDValue<typeof UUIDSchema>>;
|
|
@@ -15,7 +15,7 @@ import { After, Controller, Headers, Query, This, ThisRef } from "@aom-js/router
|
|
|
15
15
|
import { Parameters, Params, PathParameters, DelayRefStack, Middleware } from "@aom-js/router";
|
|
16
16
|
import { MongoIDSchema, NanoIDSchema, NumberIDSchema, UUIDSchema } from "./schemas.js";
|
|
17
17
|
const PathRefParams = ThisRef(((constructor) => {
|
|
18
|
-
return [PathParameters(constructor.
|
|
18
|
+
return [PathParameters(constructor.Param())];
|
|
19
19
|
}));
|
|
20
20
|
const RefParams = (pathIn) => ThisRef(((constructor) => {
|
|
21
21
|
return [Parameters(constructor.JSONSchema(pathIn))];
|
|
@@ -34,21 +34,21 @@ let IDController = IDController_1 = class IDController {
|
|
|
34
34
|
self.source = { ...data };
|
|
35
35
|
}
|
|
36
36
|
static async Assign(self) {
|
|
37
|
-
self.value = self.source[this.
|
|
37
|
+
self.value = self.source[this.Attr];
|
|
38
38
|
}
|
|
39
39
|
static toString() {
|
|
40
|
-
return this.
|
|
40
|
+
return this.Pattern.format(this.Attr);
|
|
41
41
|
}
|
|
42
|
-
static
|
|
42
|
+
static Param() {
|
|
43
43
|
return {
|
|
44
44
|
[this.toString()]: this.JSONSchema("path"),
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
static JSONSchema(pathIn) {
|
|
48
48
|
return {
|
|
49
|
-
name: this.
|
|
50
|
-
description: this.
|
|
51
|
-
schema: this.
|
|
49
|
+
name: this.Attr,
|
|
50
|
+
description: this.Attr,
|
|
51
|
+
schema: this.Pattern.schema(),
|
|
52
52
|
required: true,
|
|
53
53
|
in: pathIn,
|
|
54
54
|
};
|
|
@@ -120,8 +120,8 @@ export function IDValue(attr, IDPattern) {
|
|
|
120
120
|
var _a;
|
|
121
121
|
return _a = class extends IDController {
|
|
122
122
|
},
|
|
123
|
-
_a.
|
|
124
|
-
_a.
|
|
123
|
+
_a.Attr = attr,
|
|
124
|
+
_a.Pattern = new IDPattern(),
|
|
125
125
|
_a;
|
|
126
126
|
}
|
|
127
127
|
export function UUIDParam(attr) {
|
|
@@ -16,11 +16,11 @@ export declare class RoutesStructure<RE extends RouteElement> extends CommonResp
|
|
|
16
16
|
export declare class BaseRootController {
|
|
17
17
|
readonly ident: string;
|
|
18
18
|
static readonly RoutesStructure: typeof RoutesStructure<RouteElement>;
|
|
19
|
-
readonly RouteElement: typeof RouteElement;
|
|
20
|
-
protected static
|
|
19
|
+
static readonly RouteElement: typeof RouteElement;
|
|
20
|
+
protected static DocsJSON: OpenAPIObject;
|
|
21
21
|
readonly docs: OpenApi;
|
|
22
22
|
routes: AomRoute[];
|
|
23
|
-
markersToRoute(_routeElement:
|
|
23
|
+
markersToRoute(_routeElement: RouteElement, _markers: MarkerType): void;
|
|
24
24
|
constructor(..._args: any);
|
|
25
25
|
static InitRoutes(self: BaseRootController, { router }: AomRoute): Promise<void>;
|
|
26
26
|
static Index<RE extends RouteElement, RS extends RoutesStructure<RE>>(self: BaseRootController): RS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/controllers/root.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAc,aAAa,EAAsB,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAA2B,QAAQ,EAA2B,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAAyC,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMhF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAUxC,qBACa,YAAa,SAAQ,cAAc;IAE9C,MAAM,EAAG,MAAM,CAAC;IAGhB,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,EAAG,MAAM,CAAC;CACtB;AAGD,qBACa,eAAe,CAAC,EAAE,SAAS,YAAY,CA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AAE,aAAa,CAAC;IAGzC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAOvB,MAAM,EAAE,QAAQ,EAAE,CAAC;IAenB,cAAc,CAAC,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,QAM/D;IAED,YAAY,GAAG,KAAK,EAAE,GAAG,EAAI;IAM7B,OACa,UAAU,CAAS,IAAI,EAAE,kBAAkB,EAAW,EAAE,MAAM,EAAE,EAAE,QAAQ,iBAEtF;IAWD,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,YAAY,EAAE,EAAE,SAAS,eAAe,CAAC,EAAE,CAAC,EAC1D,IAAI,EAAE,kBAAkB,GAC/B,EAAE,CAaJ;IAeD,MAAM,CAAC,QAAQ,CAAS,EAAE,IAAI,EAAE,EAAE,kBAAkB,iBAOnD;IAiBD,MAAM,CAAC,OAAO,CAAQ,GAAG,EAAE,OAAO,GAAG,MAAM,CAK1C;CACF"}
|
|
@@ -80,7 +80,7 @@ let BaseRootController = BaseRootController_1 = class BaseRootController {
|
|
|
80
80
|
const result = new this.RoutesStructure(ident);
|
|
81
81
|
routes.forEach((route) => {
|
|
82
82
|
const { method, path } = route;
|
|
83
|
-
const routeElement = new
|
|
83
|
+
const routeElement = new this.RouteElement();
|
|
84
84
|
routeElement.method = method;
|
|
85
85
|
routeElement.path = path;
|
|
86
86
|
routeElement.operationId = route.endpoint.$.toString();
|
|
@@ -90,10 +90,10 @@ let BaseRootController = BaseRootController_1 = class BaseRootController {
|
|
|
90
90
|
return result;
|
|
91
91
|
}
|
|
92
92
|
static JSONDocs({ docs }) {
|
|
93
|
-
if (!this.
|
|
94
|
-
this.
|
|
93
|
+
if (!this.DocsJSON) {
|
|
94
|
+
this.DocsJSON = docs.toJSON();
|
|
95
95
|
}
|
|
96
|
-
return this.
|
|
96
|
+
return this.DocsJSON;
|
|
97
97
|
}
|
|
98
98
|
static Swagger(ctx) {
|
|
99
99
|
ctx.res.setHeader("Content-Type", "text/html; charset=utf-8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,GAAG,EAAE,CAAA;;;;uCAKpB;AA3HU,kBAAkB;IAD9B,UAAU,EAAE;;GACA,kBAAkB,CA4H9B"}
|
|
@@ -3,8 +3,8 @@ import { Visualizer } from "@aom-js/visualizer";
|
|
|
3
3
|
import type { BuildGraphOptions, RenderOptions, VisualGraph } from "@aom-js/visualizer";
|
|
4
4
|
import { type HttpCtx } from "../types/index.js";
|
|
5
5
|
export declare class BaseVisualizerController {
|
|
6
|
-
static readonly
|
|
7
|
-
protected static
|
|
6
|
+
static readonly VisualizerOptions: BuildGraphOptions & RenderOptions;
|
|
7
|
+
protected static CreateVisualizer(route: AomRoute): Visualizer;
|
|
8
8
|
static Page(route: AomRoute, ctx: HttpCtx): string;
|
|
9
9
|
static Data(route: AomRoute): VisualGraph;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualizer.d.ts","sourceRoot":"","sources":["../../../src/controllers/visualizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGxF,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAuBxC,qBACa,wBAAwB;IAEnC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,aAAa,CAAM;IAE1E,SAAS,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"visualizer.d.ts","sourceRoot":"","sources":["../../../src/controllers/visualizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGxF,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAuBxC,qBACa,wBAAwB;IAEnC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,aAAa,CAAM;IAE1E,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,UAAU,CAE7D;IAcD,MAAM,CAAC,IAAI,CAAU,KAAK,EAAE,QAAQ,EAAS,GAAG,EAAE,OAAO,GAAG,MAAM,CAKjE;IAUD,MAAM,CAAC,IAAI,CAAU,KAAK,EAAE,QAAQ,GAAG,WAAW,CAEjD;CACF"}
|
|
@@ -14,18 +14,18 @@ import { Controller, Ctx, Get, Responses, Route, Title } from "@aom-js/router";
|
|
|
14
14
|
import { Visualizer } from "@aom-js/visualizer";
|
|
15
15
|
import { messages } from "../constants/index.js";
|
|
16
16
|
let BaseVisualizerController = class BaseVisualizerController {
|
|
17
|
-
static
|
|
18
|
-
return new Visualizer(route, this.
|
|
17
|
+
static CreateVisualizer(route) {
|
|
18
|
+
return new Visualizer(route, this.VisualizerOptions);
|
|
19
19
|
}
|
|
20
20
|
static Page(route, ctx) {
|
|
21
21
|
ctx.res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
22
|
-
return this.
|
|
22
|
+
return this.CreateVisualizer(route).html;
|
|
23
23
|
}
|
|
24
24
|
static Data(route) {
|
|
25
|
-
return this.
|
|
25
|
+
return this.CreateVisualizer(route).graph;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
BaseVisualizerController.
|
|
28
|
+
BaseVisualizerController.VisualizerOptions = {};
|
|
29
29
|
__decorate([
|
|
30
30
|
Get("/visualizer"),
|
|
31
31
|
Title(messages.CONTROLLERS_VISUALIZER_PAGE),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualizer.js","sourceRoot":"","sources":["../../../src/controllers/visualizer.ts"],"names":[],"mapp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,CAAC,2BAA2B,CAAC;IAC3C,SAAS,CAAC;QACT,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,QAAQ,CAAC,2BAA2B;QACjD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B,CAAC;IACW,WAAA,KAAK,EAAE,CAAA;IAAmB,WAAA,GAAG,EAAE,CAAA;;;;0CAK3C;AAUM;IAPN,GAAG,CAAC,kBAAkB,CAAC;IACvB,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC3C,SAAS,CAAC;QACT,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,QAAQ,CAAC,2BAA2B;QACjD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B,CAAC;IACW,WAAA,KAAK,EAAE,CAAA;;;;0CAEnB;AArCU,wBAAwB;IADpC,UAAU,EAAE;GACA,wBAAwB,CAsCpC"}
|
|
@@ -6,8 +6,8 @@ import { AomAccessCore, AomAccessMapStructure } from "./types.js";
|
|
|
6
6
|
import { AomAccessMarkerElement, AomAccessToModulesStructure } from "./schemas.js";
|
|
7
7
|
import { AccessTypes } from "./init.js";
|
|
8
8
|
export declare class BaseAccessController {
|
|
9
|
-
static readonly
|
|
10
|
-
static readonly
|
|
9
|
+
static readonly MarkerName: string;
|
|
10
|
+
static readonly AllowedAccessTypes: AccessTypes[] | string[];
|
|
11
11
|
static readonly AccessMarker: typeof AomAccessMarkerElement;
|
|
12
12
|
static readonly AccessCore: typeof AomAccessCore;
|
|
13
13
|
moduleIdent: string;
|
|
@@ -17,13 +17,13 @@ export declare class BaseAccessController {
|
|
|
17
17
|
checkAccessPoint(ident: string, accessMarker: AomAccessMarkerElement): boolean;
|
|
18
18
|
generateAccessMap(allowedAccessTypes: string[], userRoles: AomAccessToModulesStructure[]): void;
|
|
19
19
|
static Init(self: BaseAccessController): Promise<void>;
|
|
20
|
-
static TypesRequired(...accessTypes: typeof this.
|
|
20
|
+
static TypesRequired(...accessTypes: typeof this.AllowedAccessTypes): CombinedDecorator;
|
|
21
21
|
private static IsExtraAccess;
|
|
22
|
-
static SetExtraAccess(...accessTypes: typeof this.
|
|
22
|
+
static SetExtraAccess(...accessTypes: typeof this.AllowedAccessTypes): MethodDecorator;
|
|
23
23
|
layerPassed: boolean;
|
|
24
24
|
static CheckLayerPass(cursor: AomCursor, route: AomRoute, self: BaseAccessController): Promise<void>;
|
|
25
25
|
static ExtraAccess(...middlewares: HandlerFunction[]): CombinedDecorator;
|
|
26
26
|
static Required(self: BaseAccessController, cursor: AomCursor, route: AomRoute): Promise<void | Error>;
|
|
27
|
-
static
|
|
27
|
+
static SetAccessMark(route: AomRoute, cursor: AomCursor): void;
|
|
28
28
|
static toString(): string;
|
|
29
29
|
}
|
|
@@ -5,8 +5,8 @@ import { type HttpRequest, type HttpSocket, type SocketCtx } from "../../types/i
|
|
|
5
5
|
export { WebSocket };
|
|
6
6
|
export declare type WebSocketConnections = Map<string, WebSocket[]>;
|
|
7
7
|
export declare type WithWebSockets<T extends {}> = T & {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Sockets: AomWebSockets;
|
|
9
|
+
SocketsParam?: string | Function;
|
|
10
10
|
};
|
|
11
11
|
export declare type CtxWS = () => WebSocket;
|
|
12
12
|
export declare type OnMessageFunction = (id: string, socket: WebSocket, data: any) => unknown;
|
|
@@ -31,7 +31,7 @@ declare class WebSocketWrapper {
|
|
|
31
31
|
}, id: string): Promise<void>;
|
|
32
32
|
}
|
|
33
33
|
export declare class WebSocketsController {
|
|
34
|
-
static
|
|
34
|
+
static WssMap: SocketServerConnections;
|
|
35
35
|
id: string | null;
|
|
36
36
|
static Define(route: AomRoute): Promise<void>;
|
|
37
37
|
static Connect(ctx: SocketCtx, head: Buffer, self: WebSocketsController, route: AomRoute): Promise<void>;
|
|
@@ -4,8 +4,8 @@ type pathIn = "path" | "query" | "header";
|
|
|
4
4
|
export declare class IDController {
|
|
5
5
|
value: any;
|
|
6
6
|
source: any;
|
|
7
|
-
static readonly
|
|
8
|
-
static readonly
|
|
7
|
+
static readonly Attr: string;
|
|
8
|
+
static readonly Pattern: ParamIDSchema;
|
|
9
9
|
static PathID(): Promise<void>;
|
|
10
10
|
static QueryID(): Promise<void>;
|
|
11
11
|
static HeaderID(): Promise<void>;
|
|
@@ -14,7 +14,7 @@ export declare class IDController {
|
|
|
14
14
|
static HeaderValue(self: IDController, data: any): Promise<void>;
|
|
15
15
|
static Assign(self: IDController): Promise<void>;
|
|
16
16
|
static toString(): string;
|
|
17
|
-
static
|
|
17
|
+
static Param(): OpenApiPathParameters;
|
|
18
18
|
static JSONSchema(pathIn: pathIn): OpenApiParameterObject;
|
|
19
19
|
}
|
|
20
20
|
export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, IDPattern: T): {
|
|
@@ -22,8 +22,8 @@ export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, ID
|
|
|
22
22
|
value: any;
|
|
23
23
|
source: any;
|
|
24
24
|
};
|
|
25
|
-
readonly
|
|
26
|
-
|
|
25
|
+
readonly Attr: string;
|
|
26
|
+
Pattern: ParamIDSchema;
|
|
27
27
|
PathID(): Promise<void>;
|
|
28
28
|
QueryID(): Promise<void>;
|
|
29
29
|
HeaderID(): Promise<void>;
|
|
@@ -32,7 +32,7 @@ export declare function IDValue<T extends typeof ParamIDSchema>(attr: string, ID
|
|
|
32
32
|
HeaderValue(self: IDController, data: any): Promise<void>;
|
|
33
33
|
Assign(self: IDController): Promise<void>;
|
|
34
34
|
toString(): string;
|
|
35
|
-
|
|
35
|
+
Param(): OpenApiPathParameters;
|
|
36
36
|
JSONSchema(pathIn: pathIn): OpenApiParameterObject;
|
|
37
37
|
};
|
|
38
38
|
export declare function UUIDParam(attr: string): ReturnType<typeof IDValue<typeof UUIDSchema>>;
|
|
@@ -16,11 +16,11 @@ export declare class RoutesStructure<RE extends RouteElement> extends CommonResp
|
|
|
16
16
|
export declare class BaseRootController {
|
|
17
17
|
readonly ident: string;
|
|
18
18
|
static readonly RoutesStructure: typeof RoutesStructure<RouteElement>;
|
|
19
|
-
readonly RouteElement: typeof RouteElement;
|
|
20
|
-
protected static
|
|
19
|
+
static readonly RouteElement: typeof RouteElement;
|
|
20
|
+
protected static DocsJSON: OpenAPIObject;
|
|
21
21
|
readonly docs: OpenApi;
|
|
22
22
|
routes: AomRoute[];
|
|
23
|
-
markersToRoute(_routeElement:
|
|
23
|
+
markersToRoute(_routeElement: RouteElement, _markers: MarkerType): void;
|
|
24
24
|
constructor(..._args: any);
|
|
25
25
|
static InitRoutes(self: BaseRootController, { router }: AomRoute): Promise<void>;
|
|
26
26
|
static Index<RE extends RouteElement, RS extends RoutesStructure<RE>>(self: BaseRootController): RS;
|
|
@@ -3,8 +3,8 @@ import { Visualizer } from "@aom-js/visualizer";
|
|
|
3
3
|
import type { BuildGraphOptions, RenderOptions, VisualGraph } from "@aom-js/visualizer";
|
|
4
4
|
import { type HttpCtx } from "../types/index.js";
|
|
5
5
|
export declare class BaseVisualizerController {
|
|
6
|
-
static readonly
|
|
7
|
-
protected static
|
|
6
|
+
static readonly VisualizerOptions: BuildGraphOptions & RenderOptions;
|
|
7
|
+
protected static CreateVisualizer(route: AomRoute): Visualizer;
|
|
8
8
|
static Page(route: AomRoute, ctx: HttpCtx): string;
|
|
9
9
|
static Data(route: AomRoute): VisualGraph;
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.2.0",
|
|
3
3
|
"name": "@aom-js/api",
|
|
4
4
|
"description": "`@aom` meta-framework api code",
|
|
5
5
|
"homepage": "https://aom.js.org/packages/api/",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"author": "Grigory B. Kholstinnikov (scarych)",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@aom-js/core": "0.
|
|
18
|
-
"@aom-js/router": "0.
|
|
19
|
-
"@aom-js/schemer": "0.
|
|
20
|
-
"@aom-js/visualizer": "0.
|
|
17
|
+
"@aom-js/core": "0.2.0",
|
|
18
|
+
"@aom-js/router": "0.2.0",
|
|
19
|
+
"@aom-js/schemer": "0.2.0",
|
|
20
|
+
"@aom-js/visualizer": "0.2.0",
|
|
21
21
|
"dayjs": "^1.11.21",
|
|
22
22
|
"es-toolkit": "^1.50.0",
|
|
23
23
|
"reflect-metadata": "^0.2.2",
|