@rdyl/node-koa-controller 0.0.3 → 0.0.4

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 0.0.2 (2025-03-28)
1
+ ## 0.0.4 (2025-03-28)
2
2
 
3
3
 
4
4
 
@@ -90,10 +90,10 @@ function RegisterASTCacheRoutes(router) {
90
90
  var handlers = route.handlers, prefix = route.prefix, Instance = route.Instance;
91
91
  handlers.forEach(function (handler) {
92
92
  var method = handler.method, url = handler.url, name = handler.name;
93
- var path = (0, path_1.join)("/" + prefix, url);
93
+ var path = (0, path_1.join)("/" + exports.ASTCache.prefix, prefix, url);
94
94
  var isPublic = route.isPublic || route.isPublic;
95
95
  if (isPublic) {
96
- exports.ASTCache.whitelist.push((0, path_1.join)("/" + exports.ASTCache.prefix, path));
96
+ exports.ASTCache.whitelist.push(path);
97
97
  }
98
98
  // @ts-ignore
99
99
  router[method.toLowerCase()](path, function (_ctx) {
@@ -117,9 +117,7 @@ function useController(app_1, _a) {
117
117
  switch (_d.label) {
118
118
  case 0:
119
119
  exports.ASTCache.prefix = prefix;
120
- router = new koa_router_1.default({
121
- prefix: prefix,
122
- });
120
+ router = new koa_router_1.default();
123
121
  rootDir = (0, path_1.resolve)(process.cwd(), root);
124
122
  initAST = function (dir) { return __awaiter(_this, void 0, void 0, function () {
125
123
  var list, _i, list_1, p, url, stat, isDir, sp, ext, _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rdyl/node-koa-controller",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",