@ooneex/routing 1.3.0 → 1.3.1
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/index.js +341 -4
- package/dist/index.js.map +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,344 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
// src/Router.ts
|
|
3
|
+
import { container, EContainerScope } from "@ooneex/container";
|
|
4
|
+
|
|
5
|
+
// src/RouterException.ts
|
|
6
|
+
import { Exception } from "@ooneex/exception";
|
|
7
|
+
import { HttpStatus } from "@ooneex/http-status";
|
|
8
|
+
|
|
9
|
+
class RouterException extends Exception {
|
|
10
|
+
constructor(message, data = {}) {
|
|
11
|
+
super(message, {
|
|
12
|
+
status: HttpStatus.Code.InternalServerError,
|
|
13
|
+
data
|
|
14
|
+
});
|
|
15
|
+
this.name = "RouterException";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// src/Router.ts
|
|
20
|
+
class Router {
|
|
21
|
+
routes = new Map;
|
|
22
|
+
addRoute(route) {
|
|
23
|
+
const name = route.name;
|
|
24
|
+
for (const item of this.routes[Symbol.iterator]()) {
|
|
25
|
+
const existingRoute = item[1].find((r) => r.name === name);
|
|
26
|
+
if (existingRoute) {
|
|
27
|
+
throw new RouterException(`Route with name '${name}' already exists`, route);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const routes = this.routes.get(route.path) ?? [];
|
|
31
|
+
if (route.isSocket && routes.find((r) => r.isSocket)) {
|
|
32
|
+
throw new RouterException(`Socket route with path '${route.path}' already exists`, route);
|
|
33
|
+
}
|
|
34
|
+
if (!route.isSocket && routes.find((r) => !r.isSocket && r.method === route.method)) {
|
|
35
|
+
throw new RouterException(`Route with path '${route.path}' and method '${route.method}' already exists`, route);
|
|
36
|
+
}
|
|
37
|
+
routes.push(route);
|
|
38
|
+
this.routes.set(route.path, routes);
|
|
39
|
+
container.add(route.controller, EContainerScope.Singleton);
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
findRouteByPath(path) {
|
|
43
|
+
return this.routes.get(path) ?? null;
|
|
44
|
+
}
|
|
45
|
+
findRouteByName(name) {
|
|
46
|
+
for (const item of this.routes[Symbol.iterator]()) {
|
|
47
|
+
const existingRoute = item[1].find((r) => r.name === name);
|
|
48
|
+
if (existingRoute) {
|
|
49
|
+
return existingRoute;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
getRoutes() {
|
|
55
|
+
return this.routes;
|
|
56
|
+
}
|
|
57
|
+
getSocketRoutes() {
|
|
58
|
+
const socketRoutes = new Map;
|
|
59
|
+
for (const [path, routes] of this.routes) {
|
|
60
|
+
const socketRoute = routes.find((route) => route.isSocket);
|
|
61
|
+
if (socketRoute) {
|
|
62
|
+
socketRoutes.set(path, socketRoute);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return socketRoutes;
|
|
66
|
+
}
|
|
67
|
+
getHttpRoutes() {
|
|
68
|
+
const httpRoutes = new Map;
|
|
69
|
+
for (const [path, routes] of this.routes) {
|
|
70
|
+
const filteredRoutes = routes.filter((route) => !route.isSocket);
|
|
71
|
+
if (filteredRoutes.length > 0) {
|
|
72
|
+
httpRoutes.set(path, filteredRoutes);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return httpRoutes;
|
|
76
|
+
}
|
|
77
|
+
generate(name, params) {
|
|
78
|
+
const route = this.findRouteByName(name);
|
|
79
|
+
if (!route) {
|
|
80
|
+
throw new RouterException(`Route with name '${name}' not found`);
|
|
81
|
+
}
|
|
82
|
+
let path = route.path;
|
|
83
|
+
const paramMatches = path.match(/:[a-zA-Z0-9_]+/g) || [];
|
|
84
|
+
if (paramMatches.length > 0) {
|
|
85
|
+
if (!params || typeof params !== "object" || params === null) {
|
|
86
|
+
throw new RouterException(`Route '${name}' requires parameters, but none were provided`);
|
|
87
|
+
}
|
|
88
|
+
for (const match of paramMatches) {
|
|
89
|
+
const paramName = match.substring(1);
|
|
90
|
+
if (!(paramName in params)) {
|
|
91
|
+
throw new RouterException(`Missing required parameter '${paramName}' for route '${name}'`);
|
|
92
|
+
}
|
|
93
|
+
path = path.replace(match, String(params[paramName]));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return path;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
var router = new Router;
|
|
100
|
+
|
|
101
|
+
// src/decorators.ts
|
|
102
|
+
var createRouteDecorator = (method) => {
|
|
103
|
+
return (path, config) => {
|
|
104
|
+
return (target) => {
|
|
105
|
+
const route = {
|
|
106
|
+
...config,
|
|
107
|
+
path,
|
|
108
|
+
method,
|
|
109
|
+
isSocket: false,
|
|
110
|
+
controller: target
|
|
111
|
+
};
|
|
112
|
+
router.addRoute(route);
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
var createSocketDecorator = () => {
|
|
117
|
+
return (path, config) => {
|
|
118
|
+
return (target) => {
|
|
119
|
+
const route = {
|
|
120
|
+
...config,
|
|
121
|
+
path,
|
|
122
|
+
method: "GET",
|
|
123
|
+
isSocket: true,
|
|
124
|
+
controller: target
|
|
125
|
+
};
|
|
126
|
+
router.addRoute(route);
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
var Route = {
|
|
131
|
+
get: createRouteDecorator("GET"),
|
|
132
|
+
post: createRouteDecorator("POST"),
|
|
133
|
+
put: createRouteDecorator("PUT"),
|
|
134
|
+
delete: createRouteDecorator("DELETE"),
|
|
135
|
+
patch: createRouteDecorator("PATCH"),
|
|
136
|
+
options: createRouteDecorator("OPTIONS"),
|
|
137
|
+
head: createRouteDecorator("HEAD"),
|
|
138
|
+
socket: createSocketDecorator()
|
|
139
|
+
};
|
|
140
|
+
// src/utils.ts
|
|
141
|
+
import { jsonSchemaToTypeString } from "@ooneex/validation";
|
|
142
|
+
var isValidRoutePath = (path) => {
|
|
143
|
+
if (!path.startsWith("/"))
|
|
144
|
+
return false;
|
|
145
|
+
if (path.includes("//"))
|
|
146
|
+
return false;
|
|
147
|
+
if (path.includes("::"))
|
|
148
|
+
return false;
|
|
149
|
+
if (path.endsWith(":"))
|
|
150
|
+
return false;
|
|
151
|
+
if (path.includes("/:")) {
|
|
152
|
+
const segments = path.split("/");
|
|
153
|
+
for (const segment of segments) {
|
|
154
|
+
if (segment.startsWith(":") && segment.length === 1)
|
|
155
|
+
return false;
|
|
156
|
+
if (segment.includes(":") && !segment.startsWith(":"))
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return true;
|
|
161
|
+
};
|
|
162
|
+
var extractParameterNames = (path) => {
|
|
163
|
+
const matches = path.match(/:([^/]+)/g);
|
|
164
|
+
return matches ? matches.map((match) => match.slice(1)) : [];
|
|
165
|
+
};
|
|
166
|
+
var routeConfigToTypeString = (config) => {
|
|
167
|
+
if (!config.response && !config.params && !config.payload && !config.queries) {
|
|
168
|
+
return "never";
|
|
169
|
+
}
|
|
170
|
+
const typeProperties = [];
|
|
171
|
+
if (config.response) {
|
|
172
|
+
try {
|
|
173
|
+
const constraint = "getConstraint" in config.response ? config.response.getConstraint() : config.response;
|
|
174
|
+
const schema = constraint.toJsonSchema();
|
|
175
|
+
let typeStr = jsonSchemaToTypeString(schema);
|
|
176
|
+
if (typeStr === "unknown" || typeStr === "{ }" || typeStr === "Record<string, unknown>") {
|
|
177
|
+
typeStr = "never";
|
|
178
|
+
}
|
|
179
|
+
typeProperties.push(`response: ${typeStr}`);
|
|
180
|
+
} catch {
|
|
181
|
+
typeProperties.push("response: never");
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (config.params) {
|
|
185
|
+
const paramProps = [];
|
|
186
|
+
for (const [key, assert] of Object.entries(config.params)) {
|
|
187
|
+
try {
|
|
188
|
+
const constraint = "getConstraint" in assert ? assert.getConstraint() : assert;
|
|
189
|
+
const schema = constraint.toJsonSchema();
|
|
190
|
+
let typeStr = jsonSchemaToTypeString(schema);
|
|
191
|
+
if (typeStr === "unknown" || typeStr === "{ }" || typeStr === "Record<string, unknown>") {
|
|
192
|
+
typeStr = "never";
|
|
193
|
+
}
|
|
194
|
+
paramProps.push(`${key}: ${typeStr}`);
|
|
195
|
+
} catch {
|
|
196
|
+
paramProps.push(`${key}: never`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (paramProps.length > 0) {
|
|
200
|
+
const paramsType = `{ ${paramProps.join("; ")} }`;
|
|
201
|
+
typeProperties.push(`params: ${paramsType}`);
|
|
202
|
+
} else {
|
|
203
|
+
typeProperties.push("params: never");
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (config.payload) {
|
|
207
|
+
try {
|
|
208
|
+
const constraint = "getConstraint" in config.payload ? config.payload.getConstraint() : config.payload;
|
|
209
|
+
const schema = constraint.toJsonSchema();
|
|
210
|
+
let typeStr = jsonSchemaToTypeString(schema);
|
|
211
|
+
if (typeStr === "unknown" || typeStr === "{ }" || typeStr === "Record<string, unknown>") {
|
|
212
|
+
typeStr = "never";
|
|
213
|
+
}
|
|
214
|
+
typeProperties.push(`payload: ${typeStr}`);
|
|
215
|
+
} catch {
|
|
216
|
+
typeProperties.push("payload: never");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (config.queries) {
|
|
220
|
+
try {
|
|
221
|
+
const constraint = "getConstraint" in config.queries ? config.queries.getConstraint() : config.queries;
|
|
222
|
+
const schema = constraint.toJsonSchema();
|
|
223
|
+
let typeStr = jsonSchemaToTypeString(schema);
|
|
224
|
+
if (typeStr === "unknown" || typeStr === "{ }" || typeStr === "Record<string, unknown>") {
|
|
225
|
+
typeStr = "never";
|
|
226
|
+
}
|
|
227
|
+
typeProperties.push(`queries: ${typeStr}`);
|
|
228
|
+
} catch {
|
|
229
|
+
typeProperties.push("queries: never");
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return `{
|
|
233
|
+
${typeProperties.join(`;
|
|
4
234
|
`)};
|
|
5
|
-
}
|
|
235
|
+
}`;
|
|
236
|
+
};
|
|
237
|
+
var assertToJsonSchema = (assert) => {
|
|
238
|
+
try {
|
|
239
|
+
const constraint = assert && typeof assert === "object" && "getConstraint" in assert ? assert.getConstraint() : assert;
|
|
240
|
+
return constraint.toJsonSchema();
|
|
241
|
+
} catch {
|
|
242
|
+
return { type: "unknown" };
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
var routeConfigToJsonDoc = (config) => {
|
|
246
|
+
const doc = {
|
|
247
|
+
name: config.name,
|
|
248
|
+
path: config.path,
|
|
249
|
+
method: config.method,
|
|
250
|
+
version: config.version,
|
|
251
|
+
description: config.description,
|
|
252
|
+
controller: config.controller.name,
|
|
253
|
+
isSocket: config.isSocket,
|
|
254
|
+
parameters: extractParameterNames(config.path)
|
|
255
|
+
};
|
|
256
|
+
const schemas = {};
|
|
257
|
+
if (config.params) {
|
|
258
|
+
const paramsSchema = {
|
|
259
|
+
type: "object",
|
|
260
|
+
properties: {}
|
|
261
|
+
};
|
|
262
|
+
for (const [key, assert] of Object.entries(config.params)) {
|
|
263
|
+
const schema = assertToJsonSchema(assert);
|
|
264
|
+
delete schema.$schema;
|
|
265
|
+
schema.required = true;
|
|
266
|
+
paramsSchema.properties[key] = schema;
|
|
267
|
+
}
|
|
268
|
+
schemas.params = paramsSchema;
|
|
269
|
+
}
|
|
270
|
+
if (config.queries) {
|
|
271
|
+
const schema = assertToJsonSchema(config.queries);
|
|
272
|
+
delete schema.$schema;
|
|
273
|
+
if (schema.type === "object" && schema.properties) {
|
|
274
|
+
const requiredFields = schema.required || [];
|
|
275
|
+
const properties = schema.properties;
|
|
276
|
+
for (const key of Object.keys(properties)) {
|
|
277
|
+
const propSchema = properties[key];
|
|
278
|
+
propSchema.required = requiredFields.includes(key);
|
|
279
|
+
}
|
|
280
|
+
delete schema.required;
|
|
281
|
+
}
|
|
282
|
+
schemas.queries = schema;
|
|
283
|
+
}
|
|
284
|
+
if (config.payload) {
|
|
285
|
+
const schema = assertToJsonSchema(config.payload);
|
|
286
|
+
delete schema.$schema;
|
|
287
|
+
if (schema.type === "object" && schema.properties) {
|
|
288
|
+
const requiredFields = schema.required || [];
|
|
289
|
+
const properties = schema.properties;
|
|
290
|
+
for (const key of Object.keys(properties)) {
|
|
291
|
+
const propSchema = properties[key];
|
|
292
|
+
propSchema.required = requiredFields.includes(key);
|
|
293
|
+
}
|
|
294
|
+
delete schema.required;
|
|
295
|
+
}
|
|
296
|
+
schemas.payload = schema;
|
|
297
|
+
}
|
|
298
|
+
if (config.response) {
|
|
299
|
+
const schema = assertToJsonSchema(config.response);
|
|
300
|
+
delete schema.$schema;
|
|
301
|
+
if (schema.type === "object" && schema.properties) {
|
|
302
|
+
const requiredFields = schema.required || [];
|
|
303
|
+
const properties = schema.properties;
|
|
304
|
+
for (const key of Object.keys(properties)) {
|
|
305
|
+
const propSchema = properties[key];
|
|
306
|
+
propSchema.required = requiredFields.includes(key);
|
|
307
|
+
}
|
|
308
|
+
delete schema.required;
|
|
309
|
+
}
|
|
310
|
+
schemas.response = schema;
|
|
311
|
+
}
|
|
312
|
+
if (Object.keys(schemas).length > 0) {
|
|
313
|
+
doc.schemas = schemas;
|
|
314
|
+
}
|
|
315
|
+
const security = {};
|
|
316
|
+
if (config.env && config.env.length > 0) {
|
|
317
|
+
security.environments = config.env;
|
|
318
|
+
}
|
|
319
|
+
if (config.roles && config.roles.length > 0) {
|
|
320
|
+
security.roles = config.roles;
|
|
321
|
+
}
|
|
322
|
+
if (config.ip && config.ip.length > 0) {
|
|
323
|
+
security.allowedIPs = config.ip;
|
|
324
|
+
}
|
|
325
|
+
if (config.host && config.host.length > 0) {
|
|
326
|
+
security.allowedHosts = config.host;
|
|
327
|
+
}
|
|
328
|
+
if (Object.keys(security).length > 0) {
|
|
329
|
+
doc.security = security;
|
|
330
|
+
}
|
|
331
|
+
return doc;
|
|
332
|
+
};
|
|
333
|
+
export {
|
|
334
|
+
router,
|
|
335
|
+
routeConfigToTypeString,
|
|
336
|
+
routeConfigToJsonDoc,
|
|
337
|
+
isValidRoutePath,
|
|
338
|
+
extractParameterNames,
|
|
339
|
+
RouterException,
|
|
340
|
+
Router,
|
|
341
|
+
Route
|
|
342
|
+
};
|
|
6
343
|
|
|
7
|
-
//# debugId=
|
|
344
|
+
//# debugId=AC68E5F3A5B90C5764756E2164756E21
|
package/dist/index.js.map
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"import type { ControllerClassType } from \"@ooneex/controller\";\nimport type { HttpMethodType } from \"@ooneex/types\";\nimport type { AssertType } from \"@ooneex/validation\";\nimport { router } from \"./Router\";\nimport type { ExtractParameters, RouteConfigType, RoutePathType } from \"./types\";\n\ntype TypedRouteConfig<T extends string> = Omit<\n RouteConfigType,\n \"method\" | \"path\" | \"isSocket\" | \"controller\" | \"params\"\n> & {\n params?: ExtractParameters<T> extends never ? never : Record<ExtractParameters<T>, AssertType>;\n};\n\ntype InferredRouteDecorator = (target: ControllerClassType) => void;\n\ntype RouteDecoratorFunction = <T extends string>(\n path: RoutePathType<T>,\n config: TypedRouteConfig<T>,\n) => InferredRouteDecorator;\n\nconst createRouteDecorator = (method: HttpMethodType) => {\n return <T extends string>(path: RoutePathType<T>, config: TypedRouteConfig<T>): InferredRouteDecorator => {\n return (target: ControllerClassType): void => {\n const route: RouteConfigType = {\n ...config,\n path,\n method,\n isSocket: false,\n controller: target,\n };\n\n router.addRoute(route);\n };\n };\n};\n\nconst createSocketDecorator = () => {\n return <T extends string>(path: RoutePathType<T>, config: TypedRouteConfig<T>): InferredRouteDecorator => {\n return (target: ControllerClassType): void => {\n const route: RouteConfigType = {\n ...config,\n path,\n method: \"GET\",\n isSocket: true,\n controller: target,\n };\n\n router.addRoute(route);\n };\n };\n};\n\nexport const Route = {\n get: createRouteDecorator(\"GET\") as RouteDecoratorFunction,\n post: createRouteDecorator(\"POST\") as RouteDecoratorFunction,\n put: createRouteDecorator(\"PUT\") as RouteDecoratorFunction,\n delete: createRouteDecorator(\"DELETE\") as RouteDecoratorFunction,\n patch: createRouteDecorator(\"PATCH\") as RouteDecoratorFunction,\n options: createRouteDecorator(\"OPTIONS\") as RouteDecoratorFunction,\n head: createRouteDecorator(\"HEAD\") as RouteDecoratorFunction,\n socket: createSocketDecorator() as RouteDecoratorFunction,\n};\n",
|
|
8
8
|
"import { jsonSchemaToTypeString } from \"@ooneex/validation\";\nimport type { RouteConfigType, ValidRoutePath } from \"./types\";\n\n// Type guards and validation helpers\nexport const isValidRoutePath = (path: string): path is ValidRoutePath => {\n // Runtime validation\n if (!path.startsWith(\"/\")) return false;\n if (path.includes(\"//\")) return false;\n if (path.includes(\"::\")) return false;\n if (path.endsWith(\":\")) return false;\n if (path.includes(\"/:\")) {\n // Check for malformed parameters\n const segments = path.split(\"/\");\n for (const segment of segments) {\n if (segment.startsWith(\":\") && segment.length === 1) return false;\n if (segment.includes(\":\") && !segment.startsWith(\":\")) return false;\n }\n }\n return true;\n};\n\n/**\n * Extract parameter names from a route path at runtime\n */\nexport const extractParameterNames = (path: string): string[] => {\n const matches = path.match(/:([^/]+)/g);\n return matches ? matches.map((match) => match.slice(1)) : [];\n};\n\n/**\n * Convert RouteConfigType to TypeScript type string representation\n *\n * @param config - Route configuration object\n * @returns TypeScript type definition as a string\n *\n * @example\n * ```ts\n * const config = {\n * params: {\n * id: Assert(\"string\"),\n * emailId: Assert(\"string\"),\n * },\n * payload: Assert({ name: \"string\" }),\n * queries: Assert({ limit: \"number\" }),\n * response: Assert({ success: \"boolean\", message: \"string\" }),\n * };\n *\n * const typeString = routeConfigToTypeString(config);\n * // Returns:\n * // {\n * // response: { success: boolean; message: string };\n * // params: { id: string; emailId: string };\n * // payload: { name: string };\n * // queries: { limit: number };\n * // }\n * ```\n */\nexport const routeConfigToTypeString = (\n config: Pick<RouteConfigType, \"params\" | \"queries\" | \"payload\" | \"response\">,\n): string => {\n if (!config.response && !config.params && !config.payload && !config.queries) {\n return \"never\";\n }\n\n const typeProperties: string[] = [];\n\n if (config.response) {\n try {\n const constraint = \"getConstraint\" in config.response ? config.response.getConstraint() : config.response;\n const schema = constraint.toJsonSchema();\n let typeStr = jsonSchemaToTypeString(schema);\n if (typeStr === \"unknown\" || typeStr === \"{ }\" || typeStr === \"Record<string, unknown>\") {\n typeStr = \"never\";\n }\n typeProperties.push(`response: ${typeStr}`);\n } catch {\n typeProperties.push(\"response: never\");\n }\n }\n\n if (config.params) {\n const paramProps: string[] = [];\n\n for (const [key, assert] of Object.entries(config.params)) {\n try {\n const constraint = \"getConstraint\" in assert ? assert.getConstraint() : assert;\n const schema = constraint.toJsonSchema();\n let typeStr = jsonSchemaToTypeString(schema);\n if (typeStr === \"unknown\" || typeStr === \"{ }\" || typeStr === \"Record<string, unknown>\") {\n typeStr = \"never\";\n }\n paramProps.push(`${key}: ${typeStr}`);\n } catch {\n paramProps.push(`${key}: never`);\n }\n }\n\n if (paramProps.length > 0) {\n const paramsType = `{ ${paramProps.join(\"; \")} }`;\n typeProperties.push(`params: ${paramsType}`);\n } else {\n typeProperties.push(\"params: never\");\n }\n }\n\n if (config.payload) {\n try {\n const constraint = \"getConstraint\" in config.payload ? config.payload.getConstraint() : config.payload;\n const schema = constraint.toJsonSchema();\n let typeStr = jsonSchemaToTypeString(schema);\n if (typeStr === \"unknown\" || typeStr === \"{ }\" || typeStr === \"Record<string, unknown>\") {\n typeStr = \"never\";\n }\n typeProperties.push(`payload: ${typeStr}`);\n } catch {\n typeProperties.push(\"payload: never\");\n }\n }\n\n if (config.queries) {\n try {\n const constraint = \"getConstraint\" in config.queries ? config.queries.getConstraint() : config.queries;\n const schema = constraint.toJsonSchema();\n let typeStr = jsonSchemaToTypeString(schema);\n if (typeStr === \"unknown\" || typeStr === \"{ }\" || typeStr === \"Record<string, unknown>\") {\n typeStr = \"never\";\n }\n typeProperties.push(`queries: ${typeStr}`);\n } catch {\n typeProperties.push(\"queries: never\");\n }\n }\n\n return `{\\n ${typeProperties.join(\";\\n \")};\\n}`;\n};\n\n/**\n * Helper function to convert AssertType/IAssert to JSON Schema\n */\nconst assertToJsonSchema = (assert: unknown): Record<string, unknown> => {\n try {\n const constraint =\n assert && typeof assert === \"object\" && \"getConstraint\" in assert\n ? (assert as { getConstraint: () => { toJsonSchema: () => Record<string, unknown> } }).getConstraint()\n : (assert as { toJsonSchema: () => Record<string, unknown> });\n return constraint.toJsonSchema();\n } catch {\n return { type: \"unknown\" };\n }\n};\n\n/**\n * Convert RouteConfigType to JSON documentation format\n *\n * @param config - Route configuration object\n * @returns JSON documentation object with route metadata and schemas\n *\n * @example\n * ```ts\n * const config = {\n * name: \"api.users.delete\",\n * path: \"/users/:id/emails/:emailId\",\n * method: \"DELETE\",\n * description: \"Delete a user by ID\",\n * params: {\n * id: Assert(\"string\"),\n * emailId: Assert(\"string\"),\n * },\n * payload: Assert({ name: \"string\" }),\n * queries: Assert({ limit: \"number\" }),\n * response: Assert({ success: \"boolean\", message: \"string\" }),\n * env: [Environment.LOCAL],\n * roles: [ERole.ADMIN],\n * isSocket: false,\n * };\n *\n * const jsonDoc = routeConfigToJsonDoc(config);\n * // Returns:\n * // {\n * // name: \"api.users.delete\",\n * // path: \"/users/:id/emails/:emailId\",\n * // method: \"DELETE\",\n * // description: \"Delete a user by ID\",\n * // isSocket: false,\n * // parameters: [\"id\", \"emailId\"],\n * // schemas: {\n * // params: { type: \"object\", properties: { id: { type: \"string\" }, emailId: { type: \"string\" } } },\n * // queries: { type: \"object\", properties: { limit: { type: \"number\" } } },\n * // payload: { type: \"object\", properties: { name: { type: \"string\" } } },\n * // response: { type: \"object\", properties: { success: { type: \"boolean\" }, message: { type: \"string\" } } }\n * // },\n * // security: {\n * // environments: [\"LOCAL\"],\n * // roles: [\"ADMIN\"],\n * // allowedIPs: [],\n * // allowedHosts: []\n * // }\n * // }\n * ```\n */\nexport const routeConfigToJsonDoc = (config: RouteConfigType): Record<string, unknown> => {\n const doc: Record<string, unknown> = {\n name: config.name,\n path: config.path,\n method: config.method,\n version: config.version,\n description: config.description,\n controller: config.controller.name,\n isSocket: config.isSocket,\n parameters: extractParameterNames(config.path),\n };\n\n const schemas: Record<string, Record<string, unknown>> = {};\n\n if (config.params) {\n const paramsSchema: Record<string, unknown> = {\n type: \"object\",\n properties: {},\n };\n\n for (const [key, assert] of Object.entries(config.params)) {\n const schema = assertToJsonSchema(assert);\n // Remove $schema from the schema object\n delete schema.$schema;\n // Add required field to each property\n schema.required = true;\n (paramsSchema.properties as Record<string, unknown>)[key] = schema;\n }\n\n schemas.params = paramsSchema;\n }\n\n if (config.queries) {\n const schema = assertToJsonSchema(config.queries);\n delete schema.$schema;\n if (schema.type === \"object\" && schema.properties) {\n const requiredFields = (schema.required as string[]) || [];\n const properties = schema.properties as Record<string, unknown>;\n for (const key of Object.keys(properties)) {\n const propSchema = properties[key] as Record<string, unknown>;\n propSchema.required = requiredFields.includes(key);\n }\n delete schema.required;\n }\n schemas.queries = schema;\n }\n\n if (config.payload) {\n const schema = assertToJsonSchema(config.payload);\n delete schema.$schema;\n if (schema.type === \"object\" && schema.properties) {\n const requiredFields = (schema.required as string[]) || [];\n const properties = schema.properties as Record<string, unknown>;\n for (const key of Object.keys(properties)) {\n const propSchema = properties[key] as Record<string, unknown>;\n propSchema.required = requiredFields.includes(key);\n }\n delete schema.required;\n }\n schemas.payload = schema;\n }\n\n if (config.response) {\n const schema = assertToJsonSchema(config.response);\n delete schema.$schema;\n if (schema.type === \"object\" && schema.properties) {\n const requiredFields = (schema.required as string[]) || [];\n const properties = schema.properties as Record<string, unknown>;\n for (const key of Object.keys(properties)) {\n const propSchema = properties[key] as Record<string, unknown>;\n propSchema.required = requiredFields.includes(key);\n }\n delete schema.required;\n }\n schemas.response = schema;\n }\n\n if (Object.keys(schemas).length > 0) {\n doc.schemas = schemas;\n }\n\n const security: Record<string, unknown> = {};\n\n if (config.env && config.env.length > 0) {\n security.environments = config.env;\n }\n\n if (config.roles && config.roles.length > 0) {\n security.roles = config.roles;\n }\n\n if (config.ip && config.ip.length > 0) {\n security.allowedIPs = config.ip;\n }\n\n if (config.host && config.host.length > 0) {\n security.allowedHosts = config.host;\n }\n\n if (Object.keys(security).length > 0) {\n doc.security = security;\n }\n\n return doc;\n};\n"
|
|
9
9
|
],
|
|
10
|
-
"mappings": ";AAAA,
|
|
11
|
-
"debugId": "
|
|
10
|
+
"mappings": ";;AAAA;;;ACAA;AACA;AAAA;AAEO,MAAM,wBAAwB,UAAU;AAAA,EAC7C,WAAW,CAAC,SAAiB,OAAgC,CAAC,GAAG;AAAA,IAC/D,MAAM,SAAS;AAAA,MACb,QAAQ,WAAW,KAAK;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,KAAK,OAAO;AAAA;AAEhB;;;ADPO,MAAM,OAA0B;AAAA,EAC7B,SAAyC,IAAI;AAAA,EAE9C,QAAQ,CAAC,OAA8B;AAAA,IAC5C,MAAM,OAAO,MAAM;AAAA,IAEnB,WAAW,QAAQ,KAAK,OAAO,OAAO,UAAU,GAAG;AAAA,MACjD,MAAM,gBAAgB,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,IAAI;AAAA,MAEzD,IAAI,eAAe;AAAA,QACjB,MAAM,IAAI,gBAAgB,oBAAoB,wBAAwB,KAAK;AAAA,MAC7E;AAAA,IACF;AAAA,IAEA,MAAM,SAAS,KAAK,OAAO,IAAI,MAAM,IAAI,KAAK,CAAC;AAAA,IAE/C,IAAI,MAAM,YAAY,OAAO,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG;AAAA,MACpD,MAAM,IAAI,gBAAgB,2BAA2B,MAAM,wBAAwB,KAAK;AAAA,IAC1F;AAAA,IAEA,IAAI,CAAC,MAAM,YAAY,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,WAAW,MAAM,MAAM,GAAG;AAAA,MACnF,MAAM,IAAI,gBAAgB,oBAAoB,MAAM,qBA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OAAO,SAAS,YAAY,OAAO,YAAY;AAAA,MACjD,MAAM,iBAAkB,OAAO,YAAyB,CAAC;AAAA,MACzD,MAAM,aAAa,OAAO;AAAA,MAC1B,WAAW,OAAO,OAAO,KAAK,UAAU,GAAG;AAAA,QACzC,MAAM,aAAa,WAAW;AAAA,QAC9B,WAAW,WAAW,eAAe,SAAS,GAAG;AAAA,MACnD;AAAA,MACA,OAAO,OAAO;AAAA,IAChB;AAAA,IACA,QAAQ,WAAW;AAAA,EACrB;AAAA,EAEA,IAAI,OAAO,KAAK,OAAO,EAAE,SAAS,GAAG;AAAA,IACnC,IAAI,UAAU;AAAA,EAChB;AAAA,EAEA,MAAM,WAAoC,CAAC;AAAA,EAE3C,IAAI,OAAO,OAAO,OAAO,IAAI,SAAS,GAAG;AAAA,IACvC,SAAS,eAAe,OAAO;AAAA,EACjC;AAAA,EAEA,IAAI,OAAO,SAAS,OAAO,MAAM,SAAS,GAAG;AAAA,IAC3C,SAAS,QAAQ,OAAO;AAAA,EAC1B;AAAA,EAEA,IAAI,OAAO,MAAM,OAAO,GAAG,SAAS,GAAG;AAAA,IACrC,SAAS,aAAa,OAAO;AAAA,EAC/B;AAAA,EAEA,IAAI,OAAO,QAAQ,OAAO,KAAK,SAAS,GAAG;AAAA,IACzC,SAAS,eAAe,OAAO;AAAA,EACjC;AAAA,EAEA,IAAI,OAAO,KAAK,QAAQ,EAAE,SAAS,GAAG;AAAA,IACpC,IAAI,WAAW;AAAA,EACjB;AAAA,EAEA,OAAO;AAAA;",
|
|
11
|
+
"debugId": "AC68E5F3A5B90C5764756E2164756E21",
|
|
12
12
|
"names": []
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/routing",
|
|
3
3
|
"description": "Decorator-driven HTTP routing with path parameters, validation constraints, permission guards, and named route generation",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@ooneex/app-env": "1.2.0",
|
|
38
|
-
"@ooneex/controller": "1.3.
|
|
38
|
+
"@ooneex/controller": "1.3.2",
|
|
39
39
|
"@ooneex/http-response": "1.2.2",
|
|
40
|
-
"@ooneex/permission": "1.1.
|
|
40
|
+
"@ooneex/permission": "1.1.3",
|
|
41
41
|
"@ooneex/role": "1.1.2",
|
|
42
42
|
"@ooneex/translation": "1.1.2",
|
|
43
43
|
"@ooneex/types": "1.1.2"
|