@cccarv82/freya 2.3.9 → 2.3.10
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/cli/web.js +6 -1
- package/package.json +1 -1
package/cli/web.js
CHANGED
|
@@ -938,6 +938,11 @@ function companionHtml(defaultDir) {
|
|
|
938
938
|
return buildCompanionHtml(safeDefault, APP_VERSION);
|
|
939
939
|
}
|
|
940
940
|
|
|
941
|
+
function timelineHtml(defaultDir) {
|
|
942
|
+
const safeDefault = String(defaultDir || './freya').replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
943
|
+
return buildTimelineHtml(safeDefault, APP_VERSION);
|
|
944
|
+
}
|
|
945
|
+
|
|
941
946
|
function buildHtml(safeDefault, appVersion) {
|
|
942
947
|
const safeVersion = escapeHtml(appVersion || 'unknown');
|
|
943
948
|
return `<!doctype html>
|
|
@@ -1961,7 +1966,7 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1961
1966
|
|
|
1962
1967
|
if (req.method === 'GET' && req.url === '/timeline') {
|
|
1963
1968
|
try { res.__freyaDebug.workspaceDir = normalizeWorkspaceDir(dir || './freya'); } catch {}
|
|
1964
|
-
const body =
|
|
1969
|
+
const body = timelineHtml(dir || './freya');
|
|
1965
1970
|
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' });
|
|
1966
1971
|
res.end(body);
|
|
1967
1972
|
return;
|
package/package.json
CHANGED