@qwik.dev/router 2.0.0-beta.45 → 2.0.0-beta.47
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/lib/adapters/azure-swa/vite/index.d.ts +2 -2
- package/lib/adapters/bun-server/vite/index.d.ts +2 -2
- package/lib/adapters/cloud-run/vite/index.d.ts +2 -2
- package/lib/adapters/cloudflare-pages/vite/index.d.ts +2 -2
- package/lib/adapters/deno-server/vite/index.d.ts +2 -2
- package/lib/adapters/netlify-edge/vite/index.d.ts +2 -2
- package/lib/adapters/node-server/vite/index.d.ts +2 -2
- package/lib/adapters/shared/vite/index.d.ts +1 -1
- package/lib/adapters/shared/vite/index.mjs +1 -1
- package/lib/adapters/ssg/vite/index.d.ts +1 -1
- package/lib/adapters/vercel-edge/vite/index.d.ts +2 -2
- package/lib/chunks/fs.mjs +4 -4
- package/lib/chunks/head.qwik.mjs +181 -64
- package/lib/chunks/route-trie-key.mjs +10 -0
- package/lib/chunks/server-error.mjs +17 -1
- package/lib/chunks/system.mjs +13 -8
- package/lib/chunks/user-response.mjs +44 -33
- package/lib/chunks/worker-thread.mjs +5 -4
- package/lib/index.d.ts +50 -7
- package/lib/index.qwik.mjs +83 -45
- package/lib/middleware/request-handler/index.d.ts +102 -2
- package/lib/middleware/request-handler/index.mjs +8 -23
- package/lib/ssg/index.mjs +3 -2
- package/lib/vite/index.mjs +85 -30
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerAdapterOptions } from '../../shared/vite';
|
|
2
|
-
import type { SsgRenderOptions } from '
|
|
1
|
+
import { ServerAdapterOptions } from '../../shared/vite/index.js';
|
|
2
|
+
import type { SsgRenderOptions } from '../../../ssg/index.js';
|
|
3
3
|
|
|
4
4
|
/** @public */
|
|
5
5
|
export declare function azureSwaAdapter(opts?: AzureSwaAdapterOptions): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerAdapterOptions } from '../../shared/vite';
|
|
2
|
-
import type { SsgRenderOptions } from '
|
|
1
|
+
import { ServerAdapterOptions } from '../../shared/vite/index.js';
|
|
2
|
+
import type { SsgRenderOptions } from '../../../ssg/index.js';
|
|
3
3
|
|
|
4
4
|
/** @beta */
|
|
5
5
|
export declare function bunServerAdapter(opts?: bunServerAdapterOptions): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerAdapterOptions } from '../../shared/vite';
|
|
2
|
-
import type { SsgRenderOptions } from '
|
|
1
|
+
import { ServerAdapterOptions } from '../../shared/vite/index.js';
|
|
2
|
+
import type { SsgRenderOptions } from '../../../ssg/index.js';
|
|
3
3
|
|
|
4
4
|
/** @public */
|
|
5
5
|
export declare function cloudRunAdapter(opts?: CloudRunAdapterOptions): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerAdapterOptions } from '../../shared/vite';
|
|
2
|
-
import type { SsgRenderOptions } from '
|
|
1
|
+
import { ServerAdapterOptions } from '../../shared/vite/index.js';
|
|
2
|
+
import type { SsgRenderOptions } from '../../../ssg/index.js';
|
|
3
3
|
|
|
4
4
|
/** @public */
|
|
5
5
|
export declare function cloudflarePagesAdapter(opts?: CloudflarePagesAdapterOptions): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerAdapterOptions } from '../../shared/vite';
|
|
2
|
-
import type { SsgRenderOptions } from '
|
|
1
|
+
import { ServerAdapterOptions } from '../../shared/vite/index.js';
|
|
2
|
+
import type { SsgRenderOptions } from '../../../ssg/index.js';
|
|
3
3
|
|
|
4
4
|
/** @beta */
|
|
5
5
|
export declare function denoServerAdapter(opts?: DenoServerAdapterOptions): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerAdapterOptions } from '../../shared/vite';
|
|
2
|
-
import type { SsgRenderOptions } from '
|
|
1
|
+
import { ServerAdapterOptions } from '../../shared/vite/index.js';
|
|
2
|
+
import type { SsgRenderOptions } from '../../../ssg/index.js';
|
|
3
3
|
|
|
4
4
|
/** @public */
|
|
5
5
|
export declare function netlifyEdgeAdapter(opts?: NetlifyEdgeAdapterOptions): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerAdapterOptions } from '../../shared/vite';
|
|
2
|
-
import type { SsgRenderOptions } from '
|
|
1
|
+
import { ServerAdapterOptions } from '../../shared/vite/index.js';
|
|
2
|
+
import type { SsgRenderOptions } from '../../../ssg/index.js';
|
|
3
3
|
|
|
4
4
|
/** @beta */
|
|
5
5
|
export declare function nodeServerAdapter(opts?: NodeServerAdapterOptions): any;
|
|
@@ -166,7 +166,7 @@ function viteAdapter(opts) {
|
|
|
166
166
|
basePathname,
|
|
167
167
|
rootDir,
|
|
168
168
|
...opts.ssg,
|
|
169
|
-
maxWorkers: opts.maxWorkers
|
|
169
|
+
maxWorkers: opts.maxWorkers ?? opts.ssg?.maxWorkers
|
|
170
170
|
};
|
|
171
171
|
for (const key of Object.keys(ssgOpts)) if (ssgOpts[key] === void 0) delete ssgOpts[key];
|
|
172
172
|
return [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerAdapterOptions } from '../../shared/vite';
|
|
2
|
-
import type { SsgRenderOptions } from '
|
|
1
|
+
import { ServerAdapterOptions } from '../../shared/vite/index.js';
|
|
2
|
+
import type { SsgRenderOptions } from '../../../ssg/index.js';
|
|
3
3
|
|
|
4
4
|
export { SsgRenderOptions }
|
|
5
5
|
|
package/lib/chunks/fs.mjs
CHANGED
|
@@ -129,15 +129,15 @@ function isServiceWorkerName(extlessName) {
|
|
|
129
129
|
function isEntryName(extlessName) {
|
|
130
130
|
return extlessName === "entry";
|
|
131
131
|
}
|
|
132
|
-
/**
|
|
133
|
-
function
|
|
132
|
+
/** Which caught error a page renders (`'404'` or `'error'`), ignoring `@x`/`!` modifiers. */
|
|
133
|
+
function caughtErrorName(extlessName) {
|
|
134
134
|
const match = /^(error|404)(?:|!|@.+)$/.exec(extlessName);
|
|
135
135
|
return match ? match[1] : void 0;
|
|
136
136
|
}
|
|
137
137
|
function isErrorName(extlessName) {
|
|
138
|
-
return
|
|
138
|
+
return caughtErrorName(extlessName) !== void 0;
|
|
139
139
|
}
|
|
140
140
|
function isGroupedLayoutName(dirName, warn = true) {
|
|
141
141
|
return dirName.startsWith("(") && dirName.endsWith(")");
|
|
142
142
|
}
|
|
143
|
-
export { normalizePath as _, getPathnameFromDirPath as a, parseRouteIndexName as b, isIndexModule as c, isMenuFileName as d, isModuleExt as f, isServiceWorkerName as g, isPluginModule as h, getMenuPathname as i, isLayoutModule as l, isPageModuleExt as m,
|
|
143
|
+
export { normalizePath as _, getPathnameFromDirPath as a, parseRouteIndexName as b, isIndexModule as c, isMenuFileName as d, isModuleExt as f, isServiceWorkerName as g, isPluginModule as h, getMenuPathname as i, isLayoutModule as l, isPageModuleExt as m, createFileId as n, isEntryName as o, isPageExt as p, getExtension as r, isErrorName as s, caughtErrorName as t, isMarkdownExt as u, normalizePathKey as v, removeExtension as x, normalizePathSlash as y };
|