@jay-framework/stack-route-scanner 0.16.0 → 0.16.2
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.d.mts +3 -1
- package/dist/index.mjs +3 -2
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -13,6 +13,8 @@ type JayRoute = {
|
|
|
13
13
|
rawRoute: string;
|
|
14
14
|
jayHtmlPath: string;
|
|
15
15
|
compPath: string;
|
|
16
|
+
/** Export name for the page component (default: 'page'). Used by plugin routes where the export name differs. */
|
|
17
|
+
componentExport?: string;
|
|
16
18
|
/**
|
|
17
19
|
* Explicit params declared via <script type="application/jay-params"> in the jay-html.
|
|
18
20
|
* Used by static override routes to provide param values.
|
|
@@ -39,7 +41,7 @@ declare function parseRouteSegments(routePath: string): JayRouteSegment[];
|
|
|
39
41
|
* Create a JayRoute from explicit path and file locations (DL#130).
|
|
40
42
|
* Used for plugin-provided routes where the path is declared, not inferred from the filesystem.
|
|
41
43
|
*/
|
|
42
|
-
declare function createRoute(routePath: string, jayHtmlPath: string, compPath: string): JayRoute;
|
|
44
|
+
declare function createRoute(routePath: string, jayHtmlPath: string, compPath: string, componentExport?: string): JayRoute;
|
|
43
45
|
declare function scanRoutes(baseDir: string, options: ScanFilesOptions): Promise<JayRoutes>;
|
|
44
46
|
|
|
45
47
|
declare function routeToExpressRoute(route: JayRoute): string;
|
package/dist/index.mjs
CHANGED
|
@@ -142,12 +142,13 @@ function parseRouteSegments(routePath) {
|
|
|
142
142
|
};
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
function createRoute(routePath, jayHtmlPath, compPath) {
|
|
145
|
+
function createRoute(routePath, jayHtmlPath, compPath, componentExport) {
|
|
146
146
|
return {
|
|
147
147
|
segments: parseRouteSegments(routePath),
|
|
148
148
|
rawRoute: routePath,
|
|
149
149
|
jayHtmlPath,
|
|
150
|
-
compPath
|
|
150
|
+
compPath,
|
|
151
|
+
...componentExport && { componentExport }
|
|
151
152
|
};
|
|
152
153
|
}
|
|
153
154
|
async function scanRoutes(baseDir, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/stack-route-scanner",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.mts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"readme.md"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@jay-framework/logger": "^0.16.
|
|
12
|
+
"@jay-framework/logger": "^0.16.2",
|
|
13
13
|
"node-html-parser": "^6.1.12",
|
|
14
14
|
"yaml": "^2.3.4"
|
|
15
15
|
},
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test:watch": "vitest"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@jay-framework/dev-environment": "^0.16.
|
|
28
|
+
"@jay-framework/dev-environment": "^0.16.2",
|
|
29
29
|
"@types/node": "^20.11.5",
|
|
30
30
|
"nodemon": "^3.0.3",
|
|
31
31
|
"replace-in-file": "^7.1.0",
|