@markless/bundler 0.3.3 → 0.5.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/dist/dev-error-DRvO28Fd.js +174 -0
- package/dist/dev-error.d.ts +14 -16
- package/dist/dev-error.js +1 -173
- package/dist/execution-log-D9cex1i1.d.ts +17 -0
- package/dist/optimized-deps-BfzxSm6C.js +89 -0
- package/dist/preload.d.ts +39 -7
- package/dist/preload.js +3 -2
- package/dist/repeat-runtime-BDnaUYXM.js +71 -0
- package/dist/rolldown-BciZw5hZ.js +9116 -0
- package/dist/rolldown.d.ts +37 -18
- package/dist/rolldown.js +3 -3
- package/dist/roster-resume-CpphsFl_.js +427 -0
- package/dist/route-pack-groups-BpefyjrE.js +2707 -0
- package/dist/shared-seed-slot-ihIVCD2S.js +113 -0
- package/dist/{types-BuooJg32.d.ts → types-BqSoEVp6.d.ts} +46 -10
- package/dist/vite.d.ts +5 -6
- package/dist/vite.js +636 -137
- package/package.json +7 -7
- package/dist/rolldown-FRjFod14.js +0 -4516
- package/dist/source-module-CZFm1uWH.js +0 -1032
- package/dist/source-module-XFgOFX1c.d.ts +0 -8
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { joinURL } from "ufo";
|
|
2
|
+
//#region src/dev-error/index.ts
|
|
3
|
+
const MARKLESS_DEV_ERROR_EVENT = "markless:dev-error";
|
|
4
|
+
const MARKLESS_DEV_ERROR_CLEAR_EVENT = "markless:dev-error-clear";
|
|
5
|
+
const MARKLESS_DEV_ERROR_CLIENT_ID = "virtual:markless:dev-error-client";
|
|
6
|
+
const PLUGIN_CODE_KIND = "markless-dev-error";
|
|
7
|
+
const PLUGIN_CODE_VERSION = 1;
|
|
8
|
+
var MarklessCompileError = class extends Error {
|
|
9
|
+
payload;
|
|
10
|
+
id;
|
|
11
|
+
loc;
|
|
12
|
+
frame;
|
|
13
|
+
plugin = "markless";
|
|
14
|
+
pluginCode;
|
|
15
|
+
constructor(payload) {
|
|
16
|
+
super(payload.details);
|
|
17
|
+
this.name = "MarklessCompileError";
|
|
18
|
+
this.payload = payload.stack || !this.stack ? payload : {
|
|
19
|
+
...payload,
|
|
20
|
+
stack: this.stack
|
|
21
|
+
};
|
|
22
|
+
this.id = this.payload.id;
|
|
23
|
+
const primary = this.payload.diagnostics[0];
|
|
24
|
+
this.loc = primary?.line !== void 0 && primary.column !== void 0 ? {
|
|
25
|
+
file: primary.filename,
|
|
26
|
+
line: primary.line,
|
|
27
|
+
column: primary.column
|
|
28
|
+
} : void 0;
|
|
29
|
+
this.frame = primary?.frame;
|
|
30
|
+
this.pluginCode = serializeMarklessDevError(this.payload);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
function createCompileErrorPayload(input) {
|
|
34
|
+
return {
|
|
35
|
+
version: 1,
|
|
36
|
+
id: input.filename,
|
|
37
|
+
kind: "compile",
|
|
38
|
+
diagnostics: input.diagnostics.map((diagnostic) => compilerDiagnostic(input.source, diagnostic)),
|
|
39
|
+
details: input.details,
|
|
40
|
+
...input.stack ? { stack: input.stack } : {}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function normalizeMarklessDevError(error, options = {}) {
|
|
44
|
+
if (error instanceof MarklessCompileError) return error.payload;
|
|
45
|
+
if (isObject(error) && isPayload(error.payload)) return error.payload;
|
|
46
|
+
if (isObject(error) && typeof error.pluginCode === "string") {
|
|
47
|
+
const payload = parseMarklessPluginCode(error.pluginCode);
|
|
48
|
+
if (payload) return payload;
|
|
49
|
+
}
|
|
50
|
+
const details = error instanceof Error ? error.message : String(error);
|
|
51
|
+
const code = isObject(error) && typeof error.code === "string" ? error.code : "MARKLESS_DEV_RUNTIME_ERROR";
|
|
52
|
+
return {
|
|
53
|
+
version: 1,
|
|
54
|
+
id: options.id ?? "navigation:unknown",
|
|
55
|
+
kind: "runtime",
|
|
56
|
+
diagnostics: [{
|
|
57
|
+
code,
|
|
58
|
+
message: details
|
|
59
|
+
}],
|
|
60
|
+
details,
|
|
61
|
+
...error instanceof Error && error.stack ? { stack: error.stack } : {}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function serializeMarklessDevError(payload) {
|
|
65
|
+
return JSON.stringify({
|
|
66
|
+
kind: PLUGIN_CODE_KIND,
|
|
67
|
+
version: PLUGIN_CODE_VERSION,
|
|
68
|
+
payload
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function formatMarklessSourceFrame(source, span) {
|
|
72
|
+
const lines = source.split("\n");
|
|
73
|
+
const start = sourcePosition(source, span.start);
|
|
74
|
+
const end = sourcePosition(source, Math.max(span.start, span.end));
|
|
75
|
+
const firstLine = Math.max(1, start.line - 2);
|
|
76
|
+
const lastLine = Math.min(lines.length, start.line + 2);
|
|
77
|
+
const width = String(lastLine).length;
|
|
78
|
+
const frame = [];
|
|
79
|
+
for (let line = firstLine; line <= lastLine; line += 1) {
|
|
80
|
+
const active = line === start.line;
|
|
81
|
+
const text = lines[line - 1] ?? "";
|
|
82
|
+
frame.push(`${active ? ">" : " "} ${String(line).padStart(width)} | ${text}`);
|
|
83
|
+
if (active) {
|
|
84
|
+
const firstLineEnd = start.line === end.line ? end.column : text.length + 1;
|
|
85
|
+
const caretLength = Math.max(1, firstLineEnd - start.column);
|
|
86
|
+
frame.push(` ${" ".repeat(width)} | ${" ".repeat(start.column - 1)}${"^".repeat(caretLength)}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return frame.join("\n");
|
|
90
|
+
}
|
|
91
|
+
function renderMarklessDevErrorDocument(payload, options = {}) {
|
|
92
|
+
const primary = payload.diagnostics[0] ?? {
|
|
93
|
+
code: "MARKLESS_DEV_RUNTIME_ERROR",
|
|
94
|
+
message: payload.details
|
|
95
|
+
};
|
|
96
|
+
const diagnostics = payload.diagnostics.slice(1).map((diagnostic) => {
|
|
97
|
+
return `<details><summary>${escapeHtml(`${diagnostic.code} — ${diagnostic.message}`)}</summary>${renderDiagnosticBody(diagnostic, options.base ?? "/")}</details>`;
|
|
98
|
+
});
|
|
99
|
+
const technical = [payload.details, payload.stack].filter(Boolean).join("\n\n");
|
|
100
|
+
const serialized = JSON.stringify(payload).replaceAll("<", "\\u003c");
|
|
101
|
+
return `<!doctype html>
|
|
102
|
+
<html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
103
|
+
<title>${escapeHtml(primary.code)} — Markless development error</title><style>${documentStyles}</style></head>
|
|
104
|
+
<body><main class="panel"><header><span class="badge">${escapeHtml(primary.code)}</span><h1>${escapeHtml(primary.message)}</h1></header>
|
|
105
|
+
${renderDiagnosticBody(primary, options.base ?? "/")}
|
|
106
|
+
${diagnostics.join("\n")}
|
|
107
|
+
<details><summary>Technical details</summary><pre>${escapeHtml(technical)}</pre></details>
|
|
108
|
+
<p class="recovery">Fix the error and reload to continue.</p></main>
|
|
109
|
+
<script>window.__MARKLESS_DEV_ERROR__ = ${serialized};<\/script></body></html>`;
|
|
110
|
+
}
|
|
111
|
+
function renderMarklessDevErrorPlainText(payload) {
|
|
112
|
+
return [payload.details, payload.stack].filter(Boolean).join("\n\n");
|
|
113
|
+
}
|
|
114
|
+
function compilerDiagnostic(source, diagnostic) {
|
|
115
|
+
const position = diagnostic.primarySpan ? sourcePosition(source, diagnostic.primarySpan.start) : void 0;
|
|
116
|
+
return {
|
|
117
|
+
code: diagnostic.code,
|
|
118
|
+
message: diagnostic.message,
|
|
119
|
+
...diagnostic.primarySpan ? { filename: diagnostic.primarySpan.filename } : {},
|
|
120
|
+
...position ? {
|
|
121
|
+
line: position.line,
|
|
122
|
+
column: position.column
|
|
123
|
+
} : {},
|
|
124
|
+
...diagnostic.why ? { why: diagnostic.why } : {},
|
|
125
|
+
...diagnostic.suggestions[0]?.message ? { suggestion: diagnostic.suggestions[0].message } : {},
|
|
126
|
+
...diagnostic.docsUrl ? { docsUrl: diagnostic.docsUrl } : {},
|
|
127
|
+
...diagnostic.primarySpan ? { frame: formatMarklessSourceFrame(source, diagnostic.primarySpan) } : {}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function sourcePosition(source, offset) {
|
|
131
|
+
const before = source.slice(0, Math.max(0, Math.min(offset, source.length)));
|
|
132
|
+
const lastLineBreak = before.lastIndexOf("\n");
|
|
133
|
+
return {
|
|
134
|
+
line: before.split("\n").length,
|
|
135
|
+
column: before.length - lastLineBreak
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function parseMarklessPluginCode(value) {
|
|
139
|
+
try {
|
|
140
|
+
const envelope = JSON.parse(value);
|
|
141
|
+
if (isObject(envelope) && envelope.kind === PLUGIN_CODE_KIND && envelope.version === PLUGIN_CODE_VERSION && isPayload(envelope.payload)) return envelope.payload;
|
|
142
|
+
} catch {}
|
|
143
|
+
}
|
|
144
|
+
function isPayload(value) {
|
|
145
|
+
return isObject(value) && value.version === 1 && typeof value.id === "string" && (value.kind === "compile" || value.kind === "runtime") && Array.isArray(value.diagnostics) && typeof value.details === "string";
|
|
146
|
+
}
|
|
147
|
+
function isObject(value) {
|
|
148
|
+
return typeof value === "object" && value !== null;
|
|
149
|
+
}
|
|
150
|
+
function renderDiagnosticBody(diagnostic, base) {
|
|
151
|
+
const editorLocation = diagnostic.filename && diagnostic.line !== void 0 && diagnostic.column !== void 0 ? `${diagnostic.filename}:${diagnostic.line}:${diagnostic.column}` : void 0;
|
|
152
|
+
return `${editorLocation ? `<a class="location" href="${escapeAttribute(joinURL(base, `/__open-in-editor?file=${encodeURIComponent(editorLocation)}`))}">${escapeHtml(editorLocation)}</a>` : ""}${diagnostic.why ? `<section><h2>Why</h2><p>${escapeHtml(diagnostic.why)}</p></section>` : ""}${diagnostic.suggestion ? `<section><h2>Suggested fix</h2><p>${escapeHtml(diagnostic.suggestion)}</p></section>` : ""}${diagnostic.frame ? `<pre class="frame">${escapeHtml(diagnostic.frame)}</pre>` : ""}${diagnostic.docsUrl && isHttpUrl(diagnostic.docsUrl) ? `<p><a href="${escapeAttribute(diagnostic.docsUrl)}">Read ${escapeHtml(diagnostic.code)} documentation</a></p>` : ""}`;
|
|
153
|
+
}
|
|
154
|
+
function isHttpUrl(value) {
|
|
155
|
+
try {
|
|
156
|
+
const url = new URL(value);
|
|
157
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
158
|
+
} catch {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function escapeHtml(value) {
|
|
163
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
164
|
+
}
|
|
165
|
+
function escapeAttribute(value) {
|
|
166
|
+
return escapeHtml(value);
|
|
167
|
+
}
|
|
168
|
+
const documentStyles = `
|
|
169
|
+
:root{color-scheme:light dark;font-family:system-ui,sans-serif;background:Canvas;color:CanvasText}
|
|
170
|
+
*{box-sizing:border-box}body{margin:0;min-height:100vh;display:grid;place-items:center;padding:clamp(1rem,4vw,3rem);background:color-mix(in srgb,Canvas 94%,#b42318 6%)}
|
|
171
|
+
.panel{width:min(60rem,100%);padding:clamp(1.25rem,3vw,2.5rem);border:1px solid color-mix(in srgb,CanvasText 20%,transparent);border-top:4px solid #c9362b;border-radius:.5rem;background:Canvas;box-shadow:0 1rem 3rem #0002}
|
|
172
|
+
header{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1rem}.badge{align-self:flex-start;padding:.15rem .45rem;border-radius:.25rem;background:color-mix(in srgb,#c9362b 14%,Canvas);color:#c9362b;font:600 .75rem ui-monospace,monospace}h1{margin:0;font-size:clamp(1.4rem,3vw,2rem);line-height:1.2}h2{margin:1rem 0 .25rem;font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;color:color-mix(in srgb,CanvasText 65%,transparent)}p{margin:.3rem 0 1rem;line-height:1.55}a{color:LinkText}.location{display:inline-block;margin-bottom:.5rem;font:500 .9rem ui-monospace,monospace}.frame,details pre{overflow:auto;padding:1rem;border-radius:.35rem;background:color-mix(in srgb,CanvasText 7%,Canvas);font: .85rem/1.55 ui-monospace,monospace;white-space:pre}details{margin-top:1rem;border-top:1px solid color-mix(in srgb,CanvasText 15%,transparent);padding-top:1rem}summary{cursor:pointer;font-weight:600}.recovery{margin:1.5rem 0 0;color:color-mix(in srgb,CanvasText 65%,transparent);font-size:.9rem}`;
|
|
173
|
+
//#endregion
|
|
174
|
+
export { createCompileErrorPayload as a, renderMarklessDevErrorDocument as c, MarklessCompileError as i, renderMarklessDevErrorPlainText as l, MARKLESS_DEV_ERROR_CLIENT_ID as n, formatMarklessSourceFrame as o, MARKLESS_DEV_ERROR_EVENT as r, normalizeMarklessDevError as s, MARKLESS_DEV_ERROR_CLEAR_EVENT as t, serializeMarklessDevError as u };
|
package/dist/dev-error.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { CompilerDiagnostic, SourceSpan } from "@markless/compiler";
|
|
2
|
-
|
|
3
2
|
//#region src/dev-error/index.d.ts
|
|
4
|
-
declare const MARKLESS_DEV_ERROR_EVENT = "markless:dev-error";
|
|
5
|
-
declare const MARKLESS_DEV_ERROR_CLEAR_EVENT = "markless:dev-error-clear";
|
|
6
|
-
declare const MARKLESS_DEV_ERROR_CLIENT_ID = "virtual:markless:dev-error-client";
|
|
7
|
-
interface MarklessDevDiagnostic {
|
|
3
|
+
export declare const MARKLESS_DEV_ERROR_EVENT = "markless:dev-error";
|
|
4
|
+
export declare const MARKLESS_DEV_ERROR_CLEAR_EVENT = "markless:dev-error-clear";
|
|
5
|
+
export declare const MARKLESS_DEV_ERROR_CLIENT_ID = "virtual:markless:dev-error-client";
|
|
6
|
+
export interface MarklessDevDiagnostic {
|
|
8
7
|
readonly code: string;
|
|
9
8
|
readonly message: string;
|
|
10
9
|
readonly filename?: string;
|
|
@@ -15,7 +14,7 @@ interface MarklessDevDiagnostic {
|
|
|
15
14
|
readonly docsUrl?: string;
|
|
16
15
|
readonly frame?: string;
|
|
17
16
|
}
|
|
18
|
-
interface MarklessDevErrorPayload {
|
|
17
|
+
export interface MarklessDevErrorPayload {
|
|
19
18
|
readonly version: 1;
|
|
20
19
|
readonly id: string;
|
|
21
20
|
readonly kind: 'compile' | 'runtime';
|
|
@@ -23,12 +22,12 @@ interface MarklessDevErrorPayload {
|
|
|
23
22
|
readonly details: string;
|
|
24
23
|
readonly stack?: string;
|
|
25
24
|
}
|
|
26
|
-
interface MarklessErrorLocation {
|
|
25
|
+
export interface MarklessErrorLocation {
|
|
27
26
|
readonly file?: string;
|
|
28
27
|
readonly line: number;
|
|
29
28
|
readonly column: number;
|
|
30
29
|
}
|
|
31
|
-
declare class MarklessCompileError extends Error {
|
|
30
|
+
export declare class MarklessCompileError extends Error {
|
|
32
31
|
readonly payload: MarklessDevErrorPayload;
|
|
33
32
|
readonly id: string;
|
|
34
33
|
readonly loc?: MarklessErrorLocation;
|
|
@@ -37,21 +36,20 @@ declare class MarklessCompileError extends Error {
|
|
|
37
36
|
readonly pluginCode: string;
|
|
38
37
|
constructor(payload: MarklessDevErrorPayload);
|
|
39
38
|
}
|
|
40
|
-
declare function createCompileErrorPayload(input: {
|
|
39
|
+
export declare function createCompileErrorPayload(input: {
|
|
41
40
|
readonly filename: string;
|
|
42
41
|
readonly source: string;
|
|
43
42
|
readonly diagnostics: readonly CompilerDiagnostic[];
|
|
44
43
|
readonly details: string;
|
|
45
44
|
readonly stack?: string;
|
|
46
45
|
}): MarklessDevErrorPayload;
|
|
47
|
-
declare function normalizeMarklessDevError(error: unknown, options?: {
|
|
46
|
+
export declare function normalizeMarklessDevError(error: unknown, options?: {
|
|
48
47
|
readonly id?: string;
|
|
49
48
|
}): MarklessDevErrorPayload;
|
|
50
|
-
declare function serializeMarklessDevError(payload: MarklessDevErrorPayload): string;
|
|
51
|
-
declare function formatMarklessSourceFrame(source: string, span: SourceSpan): string;
|
|
52
|
-
declare function renderMarklessDevErrorDocument(payload: MarklessDevErrorPayload, options?: {
|
|
49
|
+
export declare function serializeMarklessDevError(payload: MarklessDevErrorPayload): string;
|
|
50
|
+
export declare function formatMarklessSourceFrame(source: string, span: SourceSpan): string;
|
|
51
|
+
export declare function renderMarklessDevErrorDocument(payload: MarklessDevErrorPayload, options?: {
|
|
53
52
|
readonly base?: string;
|
|
54
53
|
}): string;
|
|
55
|
-
declare function renderMarklessDevErrorPlainText(payload: MarklessDevErrorPayload): string;
|
|
56
|
-
//#endregion
|
|
57
|
-
export { MARKLESS_DEV_ERROR_CLEAR_EVENT, MARKLESS_DEV_ERROR_CLIENT_ID, MARKLESS_DEV_ERROR_EVENT, MarklessCompileError, MarklessDevDiagnostic, MarklessDevErrorPayload, MarklessErrorLocation, createCompileErrorPayload, formatMarklessSourceFrame, normalizeMarklessDevError, renderMarklessDevErrorDocument, renderMarklessDevErrorPlainText, serializeMarklessDevError };
|
|
54
|
+
export declare function renderMarklessDevErrorPlainText(payload: MarklessDevErrorPayload): string;
|
|
55
|
+
//#endregion
|
package/dist/dev-error.js
CHANGED
|
@@ -1,174 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/dev-error/index.ts
|
|
3
|
-
const MARKLESS_DEV_ERROR_EVENT = "markless:dev-error";
|
|
4
|
-
const MARKLESS_DEV_ERROR_CLEAR_EVENT = "markless:dev-error-clear";
|
|
5
|
-
const MARKLESS_DEV_ERROR_CLIENT_ID = "virtual:markless:dev-error-client";
|
|
6
|
-
const PLUGIN_CODE_KIND = "markless-dev-error";
|
|
7
|
-
const PLUGIN_CODE_VERSION = 1;
|
|
8
|
-
var MarklessCompileError = class extends Error {
|
|
9
|
-
payload;
|
|
10
|
-
id;
|
|
11
|
-
loc;
|
|
12
|
-
frame;
|
|
13
|
-
plugin = "markless";
|
|
14
|
-
pluginCode;
|
|
15
|
-
constructor(payload) {
|
|
16
|
-
super(payload.details);
|
|
17
|
-
this.name = "MarklessCompileError";
|
|
18
|
-
this.payload = payload.stack || !this.stack ? payload : {
|
|
19
|
-
...payload,
|
|
20
|
-
stack: this.stack
|
|
21
|
-
};
|
|
22
|
-
this.id = this.payload.id;
|
|
23
|
-
const primary = this.payload.diagnostics[0];
|
|
24
|
-
this.loc = primary?.line !== void 0 && primary.column !== void 0 ? {
|
|
25
|
-
file: primary.filename,
|
|
26
|
-
line: primary.line,
|
|
27
|
-
column: primary.column
|
|
28
|
-
} : void 0;
|
|
29
|
-
this.frame = primary?.frame;
|
|
30
|
-
this.pluginCode = serializeMarklessDevError(this.payload);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
function createCompileErrorPayload(input) {
|
|
34
|
-
return {
|
|
35
|
-
version: 1,
|
|
36
|
-
id: input.filename,
|
|
37
|
-
kind: "compile",
|
|
38
|
-
diagnostics: input.diagnostics.map((diagnostic) => compilerDiagnostic(input.source, diagnostic)),
|
|
39
|
-
details: input.details,
|
|
40
|
-
...input.stack ? { stack: input.stack } : {}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function normalizeMarklessDevError(error, options = {}) {
|
|
44
|
-
if (error instanceof MarklessCompileError) return error.payload;
|
|
45
|
-
if (isObject(error) && isPayload(error.payload)) return error.payload;
|
|
46
|
-
if (isObject(error) && typeof error.pluginCode === "string") {
|
|
47
|
-
const payload = parseMarklessPluginCode(error.pluginCode);
|
|
48
|
-
if (payload) return payload;
|
|
49
|
-
}
|
|
50
|
-
const details = error instanceof Error ? error.message : String(error);
|
|
51
|
-
const code = isObject(error) && typeof error.code === "string" ? error.code : "MARKLESS_DEV_RUNTIME_ERROR";
|
|
52
|
-
return {
|
|
53
|
-
version: 1,
|
|
54
|
-
id: options.id ?? "navigation:unknown",
|
|
55
|
-
kind: "runtime",
|
|
56
|
-
diagnostics: [{
|
|
57
|
-
code,
|
|
58
|
-
message: details
|
|
59
|
-
}],
|
|
60
|
-
details,
|
|
61
|
-
...error instanceof Error && error.stack ? { stack: error.stack } : {}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function serializeMarklessDevError(payload) {
|
|
65
|
-
return JSON.stringify({
|
|
66
|
-
kind: PLUGIN_CODE_KIND,
|
|
67
|
-
version: PLUGIN_CODE_VERSION,
|
|
68
|
-
payload
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
function formatMarklessSourceFrame(source, span) {
|
|
72
|
-
const lines = source.split("\n");
|
|
73
|
-
const start = sourcePosition(source, span.start);
|
|
74
|
-
const end = sourcePosition(source, Math.max(span.start, span.end));
|
|
75
|
-
const firstLine = Math.max(1, start.line - 2);
|
|
76
|
-
const lastLine = Math.min(lines.length, start.line + 2);
|
|
77
|
-
const width = String(lastLine).length;
|
|
78
|
-
const frame = [];
|
|
79
|
-
for (let line = firstLine; line <= lastLine; line += 1) {
|
|
80
|
-
const active = line === start.line;
|
|
81
|
-
const text = lines[line - 1] ?? "";
|
|
82
|
-
frame.push(`${active ? ">" : " "} ${String(line).padStart(width)} | ${text}`);
|
|
83
|
-
if (active) {
|
|
84
|
-
const firstLineEnd = start.line === end.line ? end.column : text.length + 1;
|
|
85
|
-
const caretLength = Math.max(1, firstLineEnd - start.column);
|
|
86
|
-
frame.push(` ${" ".repeat(width)} | ${" ".repeat(start.column - 1)}${"^".repeat(caretLength)}`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return frame.join("\n");
|
|
90
|
-
}
|
|
91
|
-
function renderMarklessDevErrorDocument(payload, options = {}) {
|
|
92
|
-
const primary = payload.diagnostics[0] ?? {
|
|
93
|
-
code: "MARKLESS_DEV_RUNTIME_ERROR",
|
|
94
|
-
message: payload.details
|
|
95
|
-
};
|
|
96
|
-
const diagnostics = payload.diagnostics.slice(1).map((diagnostic) => {
|
|
97
|
-
return `<details><summary>${escapeHtml(`${diagnostic.code} — ${diagnostic.message}`)}</summary>${renderDiagnosticBody(diagnostic, options.base ?? "/")}</details>`;
|
|
98
|
-
});
|
|
99
|
-
const technical = [payload.details, payload.stack].filter(Boolean).join("\n\n");
|
|
100
|
-
const serialized = JSON.stringify(payload).replaceAll("<", "\\u003c");
|
|
101
|
-
return `<!doctype html>
|
|
102
|
-
<html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
103
|
-
<title>${escapeHtml(primary.code)} — Markless development error</title><style>${documentStyles}</style></head>
|
|
104
|
-
<body><main class="panel"><header><span class="badge">${escapeHtml(primary.code)}</span><h1>${escapeHtml(primary.message)}</h1></header>
|
|
105
|
-
${renderDiagnosticBody(primary, options.base ?? "/")}
|
|
106
|
-
${diagnostics.join("\n")}
|
|
107
|
-
<details><summary>Technical details</summary><pre>${escapeHtml(technical)}</pre></details>
|
|
108
|
-
<p class="recovery">Fix the error and reload to continue.</p></main>
|
|
109
|
-
<script>window.__MARKLESS_DEV_ERROR__ = ${serialized};<\/script></body></html>`;
|
|
110
|
-
}
|
|
111
|
-
function renderMarklessDevErrorPlainText(payload) {
|
|
112
|
-
return [payload.details, payload.stack].filter(Boolean).join("\n\n");
|
|
113
|
-
}
|
|
114
|
-
function compilerDiagnostic(source, diagnostic) {
|
|
115
|
-
const position = diagnostic.primarySpan ? sourcePosition(source, diagnostic.primarySpan.start) : void 0;
|
|
116
|
-
return {
|
|
117
|
-
code: diagnostic.code,
|
|
118
|
-
message: diagnostic.message,
|
|
119
|
-
...diagnostic.primarySpan ? { filename: diagnostic.primarySpan.filename } : {},
|
|
120
|
-
...position ? {
|
|
121
|
-
line: position.line,
|
|
122
|
-
column: position.column
|
|
123
|
-
} : {},
|
|
124
|
-
...diagnostic.why ? { why: diagnostic.why } : {},
|
|
125
|
-
...diagnostic.suggestions[0]?.message ? { suggestion: diagnostic.suggestions[0].message } : {},
|
|
126
|
-
...diagnostic.docsUrl ? { docsUrl: diagnostic.docsUrl } : {},
|
|
127
|
-
...diagnostic.primarySpan ? { frame: formatMarklessSourceFrame(source, diagnostic.primarySpan) } : {}
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function sourcePosition(source, offset) {
|
|
131
|
-
const before = source.slice(0, Math.max(0, Math.min(offset, source.length)));
|
|
132
|
-
const lastLineBreak = before.lastIndexOf("\n");
|
|
133
|
-
return {
|
|
134
|
-
line: before.split("\n").length,
|
|
135
|
-
column: before.length - lastLineBreak
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function parseMarklessPluginCode(value) {
|
|
139
|
-
try {
|
|
140
|
-
const envelope = JSON.parse(value);
|
|
141
|
-
if (isObject(envelope) && envelope.kind === PLUGIN_CODE_KIND && envelope.version === PLUGIN_CODE_VERSION && isPayload(envelope.payload)) return envelope.payload;
|
|
142
|
-
} catch {}
|
|
143
|
-
}
|
|
144
|
-
function isPayload(value) {
|
|
145
|
-
return isObject(value) && value.version === 1 && typeof value.id === "string" && (value.kind === "compile" || value.kind === "runtime") && Array.isArray(value.diagnostics) && typeof value.details === "string";
|
|
146
|
-
}
|
|
147
|
-
function isObject(value) {
|
|
148
|
-
return typeof value === "object" && value !== null;
|
|
149
|
-
}
|
|
150
|
-
function renderDiagnosticBody(diagnostic, base) {
|
|
151
|
-
const editorLocation = diagnostic.filename && diagnostic.line !== void 0 && diagnostic.column !== void 0 ? `${diagnostic.filename}:${diagnostic.line}:${diagnostic.column}` : void 0;
|
|
152
|
-
return `${editorLocation ? `<a class="location" href="${escapeAttribute(joinURL(base, `/__open-in-editor?file=${encodeURIComponent(editorLocation)}`))}">${escapeHtml(editorLocation)}</a>` : ""}${diagnostic.why ? `<section><h2>Why</h2><p>${escapeHtml(diagnostic.why)}</p></section>` : ""}${diagnostic.suggestion ? `<section><h2>Suggested fix</h2><p>${escapeHtml(diagnostic.suggestion)}</p></section>` : ""}${diagnostic.frame ? `<pre class="frame">${escapeHtml(diagnostic.frame)}</pre>` : ""}${diagnostic.docsUrl && isHttpUrl(diagnostic.docsUrl) ? `<p><a href="${escapeAttribute(diagnostic.docsUrl)}">Read ${escapeHtml(diagnostic.code)} documentation</a></p>` : ""}`;
|
|
153
|
-
}
|
|
154
|
-
function isHttpUrl(value) {
|
|
155
|
-
try {
|
|
156
|
-
const url = new URL(value);
|
|
157
|
-
return url.protocol === "http:" || url.protocol === "https:";
|
|
158
|
-
} catch {
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
function escapeHtml(value) {
|
|
163
|
-
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
164
|
-
}
|
|
165
|
-
function escapeAttribute(value) {
|
|
166
|
-
return escapeHtml(value);
|
|
167
|
-
}
|
|
168
|
-
const documentStyles = `
|
|
169
|
-
:root{color-scheme:light dark;font-family:system-ui,sans-serif;background:Canvas;color:CanvasText}
|
|
170
|
-
*{box-sizing:border-box}body{margin:0;min-height:100vh;display:grid;place-items:center;padding:clamp(1rem,4vw,3rem);background:color-mix(in srgb,Canvas 94%,#b42318 6%)}
|
|
171
|
-
.panel{width:min(60rem,100%);padding:clamp(1.25rem,3vw,2.5rem);border:1px solid color-mix(in srgb,CanvasText 20%,transparent);border-top:4px solid #c9362b;border-radius:.5rem;background:Canvas;box-shadow:0 1rem 3rem #0002}
|
|
172
|
-
header{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1rem}.badge{align-self:flex-start;padding:.15rem .45rem;border-radius:.25rem;background:color-mix(in srgb,#c9362b 14%,Canvas);color:#c9362b;font:600 .75rem ui-monospace,monospace}h1{margin:0;font-size:clamp(1.4rem,3vw,2rem);line-height:1.2}h2{margin:1rem 0 .25rem;font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;color:color-mix(in srgb,CanvasText 65%,transparent)}p{margin:.3rem 0 1rem;line-height:1.55}a{color:LinkText}.location{display:inline-block;margin-bottom:.5rem;font:500 .9rem ui-monospace,monospace}.frame,details pre{overflow:auto;padding:1rem;border-radius:.35rem;background:color-mix(in srgb,CanvasText 7%,Canvas);font: .85rem/1.55 ui-monospace,monospace;white-space:pre}details{margin-top:1rem;border-top:1px solid color-mix(in srgb,CanvasText 15%,transparent);padding-top:1rem}summary{cursor:pointer;font-weight:600}.recovery{margin:1.5rem 0 0;color:color-mix(in srgb,CanvasText 65%,transparent);font-size:.9rem}`;
|
|
173
|
-
//#endregion
|
|
1
|
+
import { a as createCompileErrorPayload, c as renderMarklessDevErrorDocument, i as MarklessCompileError, l as renderMarklessDevErrorPlainText, n as MARKLESS_DEV_ERROR_CLIENT_ID, o as formatMarklessSourceFrame, r as MARKLESS_DEV_ERROR_EVENT, s as normalizeMarklessDevError, t as MARKLESS_DEV_ERROR_CLEAR_EVENT, u as serializeMarklessDevError } from "./dev-error-DRvO28Fd.js";
|
|
174
2
|
export { MARKLESS_DEV_ERROR_CLEAR_EVENT, MARKLESS_DEV_ERROR_CLIENT_ID, MARKLESS_DEV_ERROR_EVENT, MarklessCompileError, createCompileErrorPayload, formatMarklessSourceFrame, normalizeMarklessDevError, renderMarklessDevErrorDocument, renderMarklessDevErrorPlainText, serializeMarklessDevError };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./types-BqSoEVp6.js";
|
|
2
|
+
import "@markless/serializer";
|
|
3
|
+
import "@markless/compiler";
|
|
4
|
+
import "@markless/web/inline/resumer";
|
|
5
|
+
//#region src/source-module.d.ts
|
|
6
|
+
declare const MARKLESS_VIRTUAL_PREFIX = "virtual:markless:";
|
|
7
|
+
declare function symbolVirtualModuleSourceFile(moduleId: string): string | null;
|
|
8
|
+
declare function resumeVirtualModuleId(filename: string): string;
|
|
9
|
+
declare function prerenderWakeVirtualModuleId(filename: string): string;
|
|
10
|
+
declare function prerenderWakeVirtualModuleSourceFile(moduleId: string): string | null;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/execution-log.d.ts
|
|
13
|
+
declare function isExecutionLogChunk(chunk: {
|
|
14
|
+
readonly moduleIds?: readonly string[];
|
|
15
|
+
}): boolean;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { resumeVirtualModuleId as a, prerenderWakeVirtualModuleSourceFile as i, MARKLESS_VIRTUAL_PREFIX as n, symbolVirtualModuleSourceFile as o, prerenderWakeVirtualModuleId as r, isExecutionLogChunk as t };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
2
|
+
import { dirname, isAbsolute, join, normalize, resolve } from "pathe";
|
|
3
|
+
//#region src/optimized-deps.ts
|
|
4
|
+
function optimizedDepsToInclude(specifiers, resolution) {
|
|
5
|
+
const root = resolve(resolution.root ?? "");
|
|
6
|
+
const preserveSymlinks = resolution.resolve?.preserveSymlinks === true;
|
|
7
|
+
const alias = resolution.resolve?.alias;
|
|
8
|
+
return specifiers.filter((specifier) => !servedFromSource(applyAlias(specifier, alias), root, preserveSymlinks));
|
|
9
|
+
}
|
|
10
|
+
function includeOptimizedDeps(config, specifiers) {
|
|
11
|
+
const bundled = optimizedDepsToInclude(specifiers, config);
|
|
12
|
+
if (bundled.length === 0) return;
|
|
13
|
+
const optimizeDeps = config.optimizeDeps ??= {};
|
|
14
|
+
const include = optimizeDeps.include ?? [];
|
|
15
|
+
optimizeDeps.include = [...include, ...bundled.filter((specifier) => !include.includes(specifier))];
|
|
16
|
+
}
|
|
17
|
+
function excludeSourceShippedDeps(config) {
|
|
18
|
+
const appManifest = nearestManifest(resolve(config.root ?? ""));
|
|
19
|
+
if (!appManifest) return;
|
|
20
|
+
const shipsSource = [];
|
|
21
|
+
const seen = /* @__PURE__ */ new Set();
|
|
22
|
+
const visit = (names, from) => {
|
|
23
|
+
for (const name of names) {
|
|
24
|
+
const directory = installedPackage(name, from);
|
|
25
|
+
if (directory === void 0 || seen.has(directory)) continue;
|
|
26
|
+
seen.add(directory);
|
|
27
|
+
const manifest = readManifest(join(directory, "package.json"));
|
|
28
|
+
if (manifest?.publishConfig?.marklessShipsSource !== true) continue;
|
|
29
|
+
if (!shipsSource.includes(name)) shipsSource.push(name);
|
|
30
|
+
visit(Object.keys(manifest.dependencies ?? {}), realpathOf(directory));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
visit([...Object.keys(appManifest.manifest.dependencies ?? {}), ...Object.keys(appManifest.manifest.devDependencies ?? {})], appManifest.directory);
|
|
34
|
+
if (shipsSource.length === 0) return;
|
|
35
|
+
const optimizeDeps = config.optimizeDeps ??= {};
|
|
36
|
+
const exclude = optimizeDeps.exclude ?? [];
|
|
37
|
+
optimizeDeps.exclude = [...exclude, ...shipsSource.filter((name) => !exclude.includes(name))];
|
|
38
|
+
}
|
|
39
|
+
function readManifest(path) {
|
|
40
|
+
try {
|
|
41
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
42
|
+
} catch {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function nearestManifest(root) {
|
|
47
|
+
for (let directory = root;; directory = dirname(directory)) {
|
|
48
|
+
const manifest = existsSync(join(directory, "package.json")) ? readManifest(join(directory, "package.json")) : void 0;
|
|
49
|
+
if (manifest) return {
|
|
50
|
+
directory,
|
|
51
|
+
manifest
|
|
52
|
+
};
|
|
53
|
+
if (dirname(directory) === directory) return void 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function applyAlias(specifier, alias) {
|
|
57
|
+
if (!alias) return specifier;
|
|
58
|
+
const entries = Array.isArray(alias) ? alias : Object.entries(alias).map(([find, replacement]) => ({
|
|
59
|
+
find,
|
|
60
|
+
replacement
|
|
61
|
+
}));
|
|
62
|
+
for (const { find, replacement } of entries) if (typeof find === "string") {
|
|
63
|
+
if (specifier === find || specifier.startsWith(`${find}/`)) return replacement + specifier.slice(find.length);
|
|
64
|
+
} else if (find.test(specifier)) return specifier.replace(find, replacement);
|
|
65
|
+
return specifier;
|
|
66
|
+
}
|
|
67
|
+
function servedFromSource(id, root, preserveSymlinks) {
|
|
68
|
+
const path = isAbsolute(id) || id.startsWith(".") ? resolve(root, id) : installedPackage(id, root);
|
|
69
|
+
if (path === void 0) return false;
|
|
70
|
+
return !`${preserveSymlinks ? normalize(path) : realpathOf(path)}/`.includes("/node_modules/");
|
|
71
|
+
}
|
|
72
|
+
function installedPackage(specifier, root) {
|
|
73
|
+
const segments = specifier.split("/");
|
|
74
|
+
const name = specifier.startsWith("@") ? segments.slice(0, 2).join("/") : segments[0];
|
|
75
|
+
for (let directory = root;; directory = dirname(directory)) {
|
|
76
|
+
const entry = join(directory, "node_modules", name);
|
|
77
|
+
if (existsSync(entry)) return entry;
|
|
78
|
+
if (dirname(directory) === directory) return void 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function realpathOf(path) {
|
|
82
|
+
try {
|
|
83
|
+
return normalize(realpathSync(path));
|
|
84
|
+
} catch {
|
|
85
|
+
return normalize(path);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { includeOptimizedDeps as n, optimizedDepsToInclude as r, excludeSourceShippedDeps as t };
|
package/dist/preload.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as MarklessBundleGraph } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { o as MarklessBundleGraph } from "./types-BqSoEVp6.js";
|
|
2
|
+
import { i as prerenderWakeVirtualModuleSourceFile, o as symbolVirtualModuleSourceFile, t as isExecutionLogChunk } from "./execution-log-D9cex1i1.js";
|
|
3
|
+
import { UserConfig } from "vite";
|
|
4
4
|
//#region src/build/preload-plan.d.ts
|
|
5
5
|
type ModulePreloadPlanInput = {
|
|
6
6
|
readonly bundleGraph: MarklessBundleGraph | undefined;
|
|
@@ -8,6 +8,7 @@ type ModulePreloadPlanInput = {
|
|
|
8
8
|
readonly base?: string;
|
|
9
9
|
readonly minProbability?: number;
|
|
10
10
|
readonly maxPreloads?: number;
|
|
11
|
+
readonly lazyChunks?: ReadonlySet<string>;
|
|
11
12
|
};
|
|
12
13
|
type ModulePreloadRoot = string | {
|
|
13
14
|
readonly name: string;
|
|
@@ -24,8 +25,14 @@ type ModulePreloadPlanEntry = {
|
|
|
24
25
|
readonly fetchPriority?: ModulePreloadFetchPriority;
|
|
25
26
|
readonly probability: number;
|
|
26
27
|
};
|
|
27
|
-
declare function planModulePreloadUrls(input: ModulePreloadPlanInput): string[];
|
|
28
|
-
declare function planModulePreloads(input: ModulePreloadPlanInput): ModulePreloadPlanEntry[];
|
|
28
|
+
export declare function planModulePreloadUrls(input: ModulePreloadPlanInput): string[];
|
|
29
|
+
export declare function planModulePreloads(input: ModulePreloadPlanInput): ModulePreloadPlanEntry[];
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/optimized-deps.d.ts
|
|
32
|
+
type DepResolution = Pick<UserConfig, 'root'> & {
|
|
33
|
+
readonly resolve?: Pick<NonNullable<UserConfig['resolve']>, 'alias' | 'preserveSymlinks'>;
|
|
34
|
+
};
|
|
35
|
+
export declare function optimizedDepsToInclude(specifiers: ReadonlyArray<string>, resolution: DepResolution): string[];
|
|
29
36
|
//#endregion
|
|
30
37
|
//#region src/build/module-preload-dom.d.ts
|
|
31
38
|
type LazySymbolPreloadView = {
|
|
@@ -74,6 +81,31 @@ type ModulePreloadLink = ModulePreloadExistingLink & {
|
|
|
74
81
|
crossOrigin: string;
|
|
75
82
|
setAttribute?(name: string, value: string): void;
|
|
76
83
|
};
|
|
77
|
-
declare function preloadLazySymbolModules(input: PreloadLazySymbolModulesInput): AppendedModulePreloads;
|
|
84
|
+
export declare function preloadLazySymbolModules(input: PreloadLazySymbolModulesInput): AppendedModulePreloads;
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/virtual-ids.d.ts
|
|
87
|
+
export declare function isSymbolOnlySourceRequest(id: string): boolean;
|
|
88
|
+
export declare function isResumeSourceRequest(id: string): boolean;
|
|
89
|
+
export declare function isRenderDataSourceRequest(id: string): boolean;
|
|
90
|
+
export declare function isRouteNavigationSourceRequest(id: string): boolean;
|
|
91
|
+
export declare function isClientPrimarySourceRequest(id: string): boolean;
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/build/planned-landing.d.ts
|
|
94
|
+
export declare function plannedLandingFiles(bundle: Readonly<Record<string, unknown>>): Map<string, ReadonlySet<string>> | undefined;
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/build/route-pack-groups.d.ts
|
|
97
|
+
export declare const MARKLESS_DEFERRED_PACK = "markless-deferred";
|
|
98
|
+
export declare const MARKLESS_NAVIGATION_PACK_PREFIX = "navigation:";
|
|
99
|
+
export declare function isMarklessDeferredPack(name: string | undefined): boolean;
|
|
100
|
+
/** Deferred packs plus the module-free facade chunks Rolldown emits in front of their entries. */
|
|
101
|
+
export declare function marklessDeferredChunkFileNames(chunks: Iterable<{
|
|
102
|
+
readonly fileName: string;
|
|
103
|
+
readonly name?: string;
|
|
104
|
+
readonly imports: readonly string[];
|
|
105
|
+
readonly moduleIds?: readonly string[];
|
|
106
|
+
}>): Set<string>;
|
|
107
|
+
export declare function isMarklessNavigationPack(name: string | undefined): boolean;
|
|
108
|
+
export declare function lazyStartupPackName(group: string): string;
|
|
109
|
+
export declare function startupPackOfLazy(name: string): string;
|
|
78
110
|
//#endregion
|
|
79
|
-
export { type AppendedModulePreloads, type LazySymbolPreloadView, type MarklessBundleGraph, type ModulePreloadFetchPriority, type ModulePreloadPlanEntry, type ModulePreloadPlanInput, type ModulePreloadPriority, type ModulePreloadRoot, type PreloadLazySymbolModulesInput,
|
|
111
|
+
export { type AppendedModulePreloads, type LazySymbolPreloadView, type MarklessBundleGraph, type ModulePreloadFetchPriority, type ModulePreloadPlanEntry, type ModulePreloadPlanInput, type ModulePreloadPriority, type ModulePreloadRoot, type PreloadLazySymbolModulesInput, isExecutionLogChunk, prerenderWakeVirtualModuleSourceFile, symbolVirtualModuleSourceFile };
|
package/dist/preload.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as isExecutionLogChunk, E as isRouteNavigationSourceRequest, Nt as planModulePreloadUrls, O as isSymbolOnlySourceRequest, Pt as planModulePreloads, T as isResumeSourceRequest, b as isClientPrimarySourceRequest, d as plannedLandingFiles, i as isMarklessNavigationPack, l as startupPackOfLazy, mt as prerenderWakeVirtualModuleSourceFile, n as MARKLESS_NAVIGATION_PACK_PREFIX, o as lazyStartupPackName, r as isMarklessDeferredPack, s as marklessDeferredChunkFileNames, t as MARKLESS_DEFERRED_PACK, w as isRenderDataSourceRequest, xt as symbolVirtualModuleSourceFile } from "./route-pack-groups-BpefyjrE.js";
|
|
2
|
+
import { r as optimizedDepsToInclude } from "./optimized-deps-BfzxSm6C.js";
|
|
2
3
|
//#region src/build/module-preload-dom.ts
|
|
3
4
|
const PRIORITY_RANK = {
|
|
4
5
|
high: 2,
|
|
@@ -72,4 +73,4 @@ function rememberHref(seen, href, baseURI) {
|
|
|
72
73
|
if (baseURI) seen.add(new URL(href, baseURI).href);
|
|
73
74
|
}
|
|
74
75
|
//#endregion
|
|
75
|
-
export { planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules, prerenderWakeVirtualModuleSourceFile, symbolVirtualModuleSourceFile };
|
|
76
|
+
export { MARKLESS_DEFERRED_PACK, MARKLESS_NAVIGATION_PACK_PREFIX, isClientPrimarySourceRequest, isExecutionLogChunk, isMarklessDeferredPack, isMarklessNavigationPack, isRenderDataSourceRequest, isResumeSourceRequest, isRouteNavigationSourceRequest, isSymbolOnlySourceRequest, lazyStartupPackName, marklessDeferredChunkFileNames, optimizedDepsToInclude, planModulePreloadUrls, planModulePreloads, plannedLandingFiles, preloadLazySymbolModules, prerenderWakeVirtualModuleSourceFile, startupPackOfLazy, symbolVirtualModuleSourceFile };
|