@ilha/router 0.2.5 → 0.3.0
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/README.md +86 -0
- package/dist/index-BsCpWQzC.d.ts +254 -0
- package/dist/index.d.ts +2 -236
- package/dist/index.js +2 -637
- package/dist/src-C2qmhASZ.js +776 -0
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +13 -4
- package/package.json +1 -1
package/dist/vite.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
2
|
+
import { B as wrapLayout, n as ErrorHandler, s as LayoutHandler, t as AppError, v as RouteSnapshot, z as wrapError } from "./index-BsCpWQzC.js";
|
|
3
3
|
import * as http from "node:http";
|
|
4
4
|
import { Agent, ClientRequest, ClientRequestArgs, OutgoingHttpHeaders } from "node:http";
|
|
5
5
|
import { Http2SecureServer } from "node:http2";
|
package/dist/vite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { wrapError, wrapLayout } from "./
|
|
1
|
+
import { C as wrapError, w as wrapLayout } from "./src-C2qmhASZ.js";
|
|
2
2
|
import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
3
3
|
import { basename, dirname, extname, join, relative, resolve } from "node:path";
|
|
4
4
|
//#region src/vite.ts
|
|
@@ -303,9 +303,18 @@ function pages(options = {}) {
|
|
|
303
303
|
}
|
|
304
304
|
},
|
|
305
305
|
load(id) {
|
|
306
|
-
if (id === RESOLVED_PAGES)
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
if (id === RESOLVED_PAGES) {
|
|
307
|
+
const spec = outFile.replace(/\.tsx?$/, "");
|
|
308
|
+
return `export { pageRouter } from ${JSON.stringify(spec)};`;
|
|
309
|
+
}
|
|
310
|
+
if (id === RESOLVED_REGISTRY) {
|
|
311
|
+
const spec = outFile.replace(/\.tsx?$/, "");
|
|
312
|
+
return `export { registry } from ${JSON.stringify(spec)};`;
|
|
313
|
+
}
|
|
314
|
+
if (id === RESOLVED_LOADERS) {
|
|
315
|
+
const spec = loadersFile.replace(/\.tsx?$/, "");
|
|
316
|
+
return `import ${JSON.stringify(spec)};`;
|
|
317
|
+
}
|
|
309
318
|
if (id.endsWith(CLIENT_QUERY)) {
|
|
310
319
|
const bare = id.slice(0, -7);
|
|
311
320
|
return `export { default } from ${JSON.stringify(bare)};`;
|