@tsed/common 7.13.4 → 7.13.5
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/lib/cjs/interfaces/Route.js.map +1 -1
- package/lib/cjs/services/Platform.js +2 -0
- package/lib/cjs/services/Platform.js.map +1 -1
- package/lib/esm/interfaces/Route.js.map +1 -1
- package/lib/esm/services/Platform.js +2 -0
- package/lib/esm/services/Platform.js.map +1 -1
- package/lib/types/interfaces/Route.d.ts +1 -0
- package/package.json +15 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../../src/interfaces/Route.ts"],"names":[],"mappings":"","sourcesContent":["import {Provider, TokenProvider} from \"@tsed/di\";\n\nexport interface Route extends Record<string, any> {\n route: string;\n token: TokenProvider;\n}\n\nexport interface RouteController {\n route: string;\n provider: Provider;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../../src/interfaces/Route.ts"],"names":[],"mappings":"","sourcesContent":["import {Provider, TokenProvider} from \"@tsed/di\";\n\nexport interface Route extends Record<string, any> {\n route: string;\n token: TokenProvider;\n}\n\nexport interface RouteController {\n route: string;\n routes: Set<string>;\n provider: Provider;\n}\n"]}
|
|
@@ -55,9 +55,11 @@ let Platform = class Platform {
|
|
|
55
55
|
if (!controllers.has(key)) {
|
|
56
56
|
controllers.set(key, {
|
|
57
57
|
route,
|
|
58
|
+
routes: new Set(),
|
|
58
59
|
provider: layer.provider
|
|
59
60
|
});
|
|
60
61
|
}
|
|
62
|
+
controllers.get(key).routes.add(String(layer.path));
|
|
61
63
|
}
|
|
62
64
|
return controllers;
|
|
63
65
|
}, new Map());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Platform.js","sourceRoot":"","sources":["../../../src/services/Platform.ts"],"names":[],"mappings":";;;;AAAA,iCAAuG;AACvG,2DAAqE;AAErE,+DAA0D;AAC1D,uDAAkD;AAElD;;;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AG,EAA2B,CAAC,CAAC;QAEvC,OAAO,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AAnEY,QAAQ;IAJpB,IAAA,eAAU,EAAC;QACV,KAAK,EAAE,kBAAa,CAAC,SAAS;QAC9B,OAAO,EAAE,CAAC,iCAAe,CAAC;KAC3B,CAAC;6CAKqB,oBAAe;QACJ,yCAAmB;QACvB,iCAAe;GANhC,QAAQ,CAmEpB;AAnEY,4BAAQ","sourcesContent":["import {ControllerProvider, Injectable, InjectorService, ProviderScope, TokenProvider} from \"@tsed/di\";\nimport {PlatformLayer, PlatformRouters} from \"@tsed/platform-router\";\nimport {Route, RouteController} from \"../interfaces/Route\";\nimport {PlatformApplication} from \"./PlatformApplication\";\nimport {PlatformHandler} from \"./PlatformHandler\";\n\n/**\n * `Platform` is used to provide all routes collected by annotation `@Controller`.\n *\n * @platform\n */\n@Injectable({\n scope: ProviderScope.SINGLETON,\n imports: [PlatformHandler]\n})\nexport class Platform {\n #layers: PlatformLayer[];\n\n constructor(\n readonly injector: InjectorService,\n readonly platformApplication: PlatformApplication,\n readonly platformRouters: PlatformRouters\n ) {\n platformRouters.prebuild();\n }\n\n get app() {\n return this.platformApplication;\n }\n\n public addRoutes(routes: Route[]) {\n routes.forEach((routeSettings) => {\n this.addRoute(routeSettings.route, routeSettings.token);\n });\n }\n\n public addRoute(route: string, token: TokenProvider) {\n const provider = this.injector.getProvider(token) as ControllerProvider;\n\n if (!provider || provider.hasParent()) {\n return this;\n }\n\n const router = this.platformRouters.from(provider.token);\n\n this.app.use(route, router);\n\n return this;\n }\n\n public getLayers() {\n this.#layers = this.#layers || this.platformRouters.getLayers(this.app);\n\n return this.#layers;\n }\n\n /**\n * Get all controllers mounted on the application.\n * @returns {RouteController[]}\n */\n public getMountedControllers() {\n const controllers = this.getLayers().reduce((controllers, layer) => {\n if (layer.isProvider()) {\n const route = String(layer.getBasePath());\n const key = `${layer.provider.toString()}:${route}`;\n\n if (!controllers.has(key)) {\n controllers.set(key, {\n route,\n routes: new Set(),\n provider: layer.provider\n });\n }\n\n controllers.get(key)!.routes.add(String(layer.path));\n }\n\n return controllers;\n }, new Map<string, RouteController>());\n\n return [...controllers.values()];\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../../src/interfaces/Route.ts"],"names":[],"mappings":"","sourcesContent":["import {Provider, TokenProvider} from \"@tsed/di\";\n\nexport interface Route extends Record<string, any> {\n route: string;\n token: TokenProvider;\n}\n\nexport interface RouteController {\n route: string;\n provider: Provider;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../../src/interfaces/Route.ts"],"names":[],"mappings":"","sourcesContent":["import {Provider, TokenProvider} from \"@tsed/di\";\n\nexport interface Route extends Record<string, any> {\n route: string;\n token: TokenProvider;\n}\n\nexport interface RouteController {\n route: string;\n routes: Set<string>;\n provider: Provider;\n}\n"]}
|
|
@@ -52,9 +52,11 @@ let Platform = class Platform {
|
|
|
52
52
|
if (!controllers.has(key)) {
|
|
53
53
|
controllers.set(key, {
|
|
54
54
|
route,
|
|
55
|
+
routes: new Set(),
|
|
55
56
|
provider: layer.provider
|
|
56
57
|
});
|
|
57
58
|
}
|
|
59
|
+
controllers.get(key).routes.add(String(layer.path));
|
|
58
60
|
}
|
|
59
61
|
return controllers;
|
|
60
62
|
}, new Map());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Platform.js","sourceRoot":"","sources":["../../../src/services/Platform.ts"],"names":[],"mappings":";AAAA,OAAO,EAAqB,UAAU,EAAE,eAAe,EAAE,aAAa,EAAgB,MAAM,UAAU,CAAC;AACvG,OAAO,EAAgB,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;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;gBAED,WAAW,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;aACtD;YAED,OAAO,WAAW,CAAC;QACrB,CAAC,EAAE,IAAI,GAAG,EAA2B,CAAC,CAAC;QAEvC,OAAO,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AAnEY,QAAQ;IAJpB,UAAU,CAAC;QACV,KAAK,EAAE,aAAa,CAAC,SAAS;QAC9B,OAAO,EAAE,CAAC,eAAe,CAAC;KAC3B,CAAC;qCAKqB,eAAe;QACJ,mBAAmB;QACvB,eAAe;GANhC,QAAQ,CAmEpB;SAnEY,QAAQ","sourcesContent":["import {ControllerProvider, Injectable, InjectorService, ProviderScope, TokenProvider} from \"@tsed/di\";\nimport {PlatformLayer, PlatformRouters} from \"@tsed/platform-router\";\nimport {Route, RouteController} from \"../interfaces/Route\";\nimport {PlatformApplication} from \"./PlatformApplication\";\nimport {PlatformHandler} from \"./PlatformHandler\";\n\n/**\n * `Platform` is used to provide all routes collected by annotation `@Controller`.\n *\n * @platform\n */\n@Injectable({\n scope: ProviderScope.SINGLETON,\n imports: [PlatformHandler]\n})\nexport class Platform {\n #layers: PlatformLayer[];\n\n constructor(\n readonly injector: InjectorService,\n readonly platformApplication: PlatformApplication,\n readonly platformRouters: PlatformRouters\n ) {\n platformRouters.prebuild();\n }\n\n get app() {\n return this.platformApplication;\n }\n\n public addRoutes(routes: Route[]) {\n routes.forEach((routeSettings) => {\n this.addRoute(routeSettings.route, routeSettings.token);\n });\n }\n\n public addRoute(route: string, token: TokenProvider) {\n const provider = this.injector.getProvider(token) as ControllerProvider;\n\n if (!provider || provider.hasParent()) {\n return this;\n }\n\n const router = this.platformRouters.from(provider.token);\n\n this.app.use(route, router);\n\n return this;\n }\n\n public getLayers() {\n this.#layers = this.#layers || this.platformRouters.getLayers(this.app);\n\n return this.#layers;\n }\n\n /**\n * Get all controllers mounted on the application.\n * @returns {RouteController[]}\n */\n public getMountedControllers() {\n const controllers = this.getLayers().reduce((controllers, layer) => {\n if (layer.isProvider()) {\n const route = String(layer.getBasePath());\n const key = `${layer.provider.toString()}:${route}`;\n\n if (!controllers.has(key)) {\n controllers.set(key, {\n route,\n routes: new Set(),\n provider: layer.provider\n });\n }\n\n controllers.get(key)!.routes.add(String(layer.path));\n }\n\n return controllers;\n }, new Map<string, RouteController>());\n\n return [...controllers.values()];\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/common",
|
|
3
|
-
"version": "7.13.
|
|
3
|
+
"version": "7.13.5",
|
|
4
4
|
"description": "A TypeScript Framework on top of Express",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -62,22 +62,23 @@
|
|
|
62
62
|
}
|
|
63
63
|
],
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@tsed/core": "7.13.
|
|
66
|
-
"@tsed/di": "7.13.
|
|
67
|
-
"@tsed/exceptions": "7.13.
|
|
68
|
-
"@tsed/json-mapper": "7.13.
|
|
65
|
+
"@tsed/core": "7.13.5",
|
|
66
|
+
"@tsed/di": "7.13.5",
|
|
67
|
+
"@tsed/exceptions": "7.13.5",
|
|
68
|
+
"@tsed/json-mapper": "7.13.5",
|
|
69
69
|
"@tsed/logger": ">=6.2.2",
|
|
70
70
|
"@tsed/logger-file": ">=6.2.2",
|
|
71
|
-
"@tsed/perf": "7.13.
|
|
72
|
-
"@tsed/platform-exceptions": "7.13.
|
|
73
|
-
"@tsed/platform-log-middleware": "7.13.
|
|
74
|
-
"@tsed/platform-middlewares": "7.13.
|
|
75
|
-
"@tsed/platform-params": "7.13.
|
|
76
|
-
"@tsed/platform-response-filter": "7.13.
|
|
77
|
-
"@tsed/platform-router": "7.13.
|
|
78
|
-
"@tsed/platform-views": "7.13.
|
|
79
|
-
"@tsed/schema": "7.13.
|
|
71
|
+
"@tsed/perf": "7.13.5",
|
|
72
|
+
"@tsed/platform-exceptions": "7.13.5",
|
|
73
|
+
"@tsed/platform-log-middleware": "7.13.5",
|
|
74
|
+
"@tsed/platform-middlewares": "7.13.5",
|
|
75
|
+
"@tsed/platform-params": "7.13.5",
|
|
76
|
+
"@tsed/platform-response-filter": "7.13.5",
|
|
77
|
+
"@tsed/platform-router": "7.13.5",
|
|
78
|
+
"@tsed/platform-views": "7.13.5",
|
|
79
|
+
"@tsed/schema": "7.13.5",
|
|
80
80
|
"@types/json-schema": "7.0.11",
|
|
81
|
+
"accepts": "^1.3.8",
|
|
81
82
|
"tslib": "2.4.0",
|
|
82
83
|
"uuid": "8.3.2"
|
|
83
84
|
},
|