@webpieces/core-meta 0.2.14 → 0.2.15
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/package.json +1 -1
- package/src/WebAppMeta.js.map +1 -1
- package/src/index.js.map +1 -1
package/package.json
CHANGED
package/src/WebAppMeta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebAppMeta.js","sourceRoot":"","sources":["../../../../../packages/core/core-meta/src/WebAppMeta.ts"],"names":[],"mappings":";;;AAsBA,MAAa,cAAc;IAMvB,
|
|
1
|
+
{"version":3,"file":"WebAppMeta.js","sourceRoot":"","sources":["../../../../../packages/core/core-meta/src/WebAppMeta.ts"],"names":[],"mappings":";;;AAsBA,MAAa,cAAc;IAMvB,YAAY,UAAkB,EAAE,IAAY,EAAE,UAAkB,EAAE,cAAsB;QACpF,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACzC,CAAC;CACJ;AAZD,wCAYC;AACD;;;;;GAKG;AACH,MAAa,eAAe;IACxB,YACW,SAAyB,EACzB,eAAoB,EACpB,kBAA2B;QAF3B,cAAS,GAAT,SAAS,CAAgB;QACzB,oBAAe,GAAf,eAAe,CAAK;QACpB,uBAAkB,GAAlB,kBAAkB,CAAS;IACnC,CAAC;CACP;AAND,0CAMC;AAED;;;;;;;;;GASG;AACH,MAAa,gBAAgB;IAWzB,YAAY,QAAgB,EAAE,WAAgB,EAAE,eAAuB;QACnE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,4BAA4B;IACzD,CAAC;CACJ;AAjBD,4CAiBC;AAED;;;GAGG;AACH,MAAa,YAAY;IAWrB,YAAY,OAAgB,EAAE,QAAiB;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CACJ;AAfD,oCAeC","sourcesContent":["import { ContainerModule, Container } from 'inversify';\n\n/**\n * Represents a route configuration that can be registered with the router.\n * Similar to Java WebPieces Routes interface.\n */\nexport interface Routes {\n /**\n * Configure routes using the provided RouteBuilder.\n */\n configure(routeBuilder: RouteBuilder): void;\n}\n\n/**\n * Builder for registering routes.\n * Will be implemented in http-routing package.\n */\nexport interface RouteBuilder {\n addRoute<TResult = unknown>(route: RouteDefinition<TResult>): void;\n addFilter(filter: FilterDefinition): void;\n}\n\nexport class RouteMetadata2 {\n httpMethod: string;\n path: string;\n methodName: string;\n parameterTypes?: any[];\n\n constructor(httpMethod: string, path: string, methodName: string, parameterTypes?: any[]) {\n this.httpMethod = httpMethod;\n this.path = path;\n this.methodName = methodName;\n this.parameterTypes = parameterTypes;\n }\n}\n/**\n * Definition of a single route.\n *\n * Generic type parameter TResult represents the return type of the route handler.\n * This provides type safety for the entire request/response cycle.\n */\nexport class RouteDefinition<TResult = unknown> {\n constructor(\n public routeMeta: RouteMetadata2,\n public controllerClass: any,\n public controllerFilepath?: string,\n ) {}\n}\n\n/**\n * Definition of a filter with priority.\n *\n * Use filepathPattern to scope filters to specific controllers:\n * - 'src/controllers/admin/**' + '/*.ts' - All admin controllers\n * - '**' + '/admin/**' - Any file in admin directories\n * - '**' + '/UserController.ts' - Specific controller file\n *\n * If filepathPattern is not specified, the filter matches all controllers.\n */\nexport class FilterDefinition {\n priority: number;\n filterClass: any;\n filter?: any; // Filter instance (set by RouteBuilder when resolving from DI)\n\n /**\n * Glob pattern to match controller file paths.\n * If not specified, defaults to matching all controllers.\n */\n filepathPattern: string;\n\n constructor(priority: number, filterClass: any, filepathPattern: string) {\n this.priority = priority;\n this.filterClass = filterClass;\n this.filepathPattern = filepathPattern;\n this.filter = undefined; // Set later by RouteBuilder\n }\n}\n\n/**\n * Holds Express Request and Response objects.\n * JsonFilter uses these to read request body and write response.\n */\nexport class RouteRequest {\n /**\n * Express Request object\n */\n request: unknown;\n\n /**\n * Express Response object\n */\n response: unknown;\n\n constructor(request: unknown, response: unknown) {\n this.request = request;\n this.response = response;\n }\n}\n\n/**\n * Main application metadata interface.\n * Similar to Java WebPieces WebAppMeta.\n *\n * This is the entry point that WebpiecesServer calls to configure your application.\n */\nexport interface WebAppMeta {\n /**\n * Returns the list of Inversify container modules for dependency injection.\n * Similar to getGuiceModules() in Java.\n */\n getDIModules(): ContainerModule[];\n\n /**\n * Returns the list of route configurations.\n * Similar to getRouteModules() in Java.\n */\n getRoutes(): Routes[];\n}\n"]}
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/core/core-meta/src/index.ts"],"names":[],"mappings":";;;AAAA,2CAQsB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/core/core-meta/src/index.ts"],"names":[],"mappings":";;;AAAA,2CAQsB;AAJlB,6GAAA,eAAe,OAAA;AACf,4GAAA,cAAc,OAAA;AACd,8GAAA,gBAAgB,OAAA;AAChB,0GAAA,YAAY,OAAA","sourcesContent":["export {\n WebAppMeta,\n Routes,\n RouteBuilder,\n RouteDefinition,\n RouteMetadata2,\n FilterDefinition,\n RouteRequest,\n} from './WebAppMeta';\n"]}
|