refactor: migrate legacy wire namespace to wrn
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/router",
|
||||
"version": "0.8.8",
|
||||
"version": "0.8.9",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -124,7 +124,7 @@ function routeFromRaw(raw: string, file: string): Route {
|
||||
return { raw, file, regex, paramNames, paramMeta };
|
||||
}
|
||||
|
||||
function embeddedWireRoutes(pageFiles: ScannedFile[]): Pick<Router, "api" | "realtime"> {
|
||||
function embeddedWrnRoutes(pageFiles: ScannedFile[]): Pick<Router, "api" | "realtime"> {
|
||||
const api: Route[] = [];
|
||||
const realtime: Route[] = [];
|
||||
|
||||
@@ -179,7 +179,7 @@ function mergeExternalRoutes(
|
||||
/** Scan an app directory and build all route tables. */
|
||||
export function buildRouter(appDir: string, opts: RouterOptions = {}): Router {
|
||||
const pageFiles = scanDir(join(appDir, "pages"));
|
||||
const embedded = embeddedWireRoutes(pageFiles);
|
||||
const embedded = embeddedWrnRoutes(pageFiles);
|
||||
const external = opts.externalRoutes ?? [];
|
||||
const externalPages = external
|
||||
.filter((route) => route.kind === "page")
|
||||
|
||||
Reference in New Issue
Block a user