@autocode-cli/autocode 0.0.34 → 0.0.36
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/server/dashboard.d.ts +4 -0
- package/dist/server/dashboard.d.ts.map +1 -1
- package/dist/server/dashboard.js +381 -18
- package/dist/server/dashboard.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +11 -1
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,4 +5,8 @@
|
|
|
5
5
|
* Generate the full dashboard HTML
|
|
6
6
|
*/
|
|
7
7
|
export declare function generateDashboard(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Generate column edit page
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateColumnEditPage(slug: string, lang: string): string;
|
|
8
12
|
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/server/dashboard.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAmL1C"}
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/server/dashboard.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAmL1C;AA6tDD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA4RzE"}
|
package/dist/server/dashboard.js
CHANGED
|
@@ -589,46 +589,122 @@ function getStyles() {
|
|
|
589
589
|
}
|
|
590
590
|
.comments-header h3 { font-size: 14px; font-weight: 600; }
|
|
591
591
|
.comments-count {
|
|
592
|
-
background:
|
|
592
|
+
background: var(--accent);
|
|
593
|
+
color: #fff;
|
|
593
594
|
padding: 2px 8px;
|
|
594
595
|
border-radius: 10px;
|
|
595
|
-
font-size:
|
|
596
|
+
font-size: 11px;
|
|
597
|
+
font-weight: 600;
|
|
596
598
|
}
|
|
597
599
|
.comments-list {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
max-height:
|
|
600
|
+
display: flex;
|
|
601
|
+
flex-direction: column;
|
|
602
|
+
gap: 10px;
|
|
603
|
+
max-height: 300px;
|
|
602
604
|
overflow-y: auto;
|
|
605
|
+
padding-right: 4px;
|
|
606
|
+
}
|
|
607
|
+
.comments-list::-webkit-scrollbar { width: 6px; }
|
|
608
|
+
.comments-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
|
609
|
+
.no-comments {
|
|
610
|
+
color: var(--muted);
|
|
611
|
+
font-size: 13px;
|
|
612
|
+
text-align: center;
|
|
613
|
+
padding: 24px;
|
|
614
|
+
background: var(--bg);
|
|
615
|
+
border-radius: 8px;
|
|
616
|
+
border: 1px dashed var(--border);
|
|
603
617
|
}
|
|
604
|
-
.no-comments { color: var(--muted); font-size: 13px; text-align: center; }
|
|
605
618
|
.comment {
|
|
606
|
-
|
|
607
|
-
border-
|
|
619
|
+
background: var(--bg);
|
|
620
|
+
border-radius: 8px;
|
|
621
|
+
border-left: 3px solid var(--accent);
|
|
622
|
+
padding: 12px 14px;
|
|
623
|
+
transition: all 0.2s ease;
|
|
624
|
+
}
|
|
625
|
+
.comment:hover {
|
|
626
|
+
border-left-color: var(--blue);
|
|
627
|
+
transform: translateX(2px);
|
|
608
628
|
}
|
|
609
|
-
.comment:last-child { border-bottom: none; }
|
|
610
629
|
.comment-meta {
|
|
611
630
|
display: flex;
|
|
631
|
+
align-items: center;
|
|
612
632
|
justify-content: space-between;
|
|
613
|
-
margin-bottom:
|
|
633
|
+
margin-bottom: 8px;
|
|
634
|
+
padding-bottom: 8px;
|
|
635
|
+
border-bottom: 1px solid var(--border);
|
|
614
636
|
}
|
|
615
637
|
.comment-column {
|
|
616
|
-
font-size:
|
|
638
|
+
font-size: 10px;
|
|
639
|
+
font-weight: 600;
|
|
640
|
+
text-transform: uppercase;
|
|
641
|
+
letter-spacing: 0.5px;
|
|
617
642
|
color: var(--blue);
|
|
618
|
-
padding:
|
|
619
|
-
background: rgba(77,171,247,0.
|
|
643
|
+
padding: 3px 8px;
|
|
644
|
+
background: rgba(77,171,247,0.15);
|
|
620
645
|
border-radius: 4px;
|
|
621
646
|
}
|
|
622
|
-
.comment-date {
|
|
623
|
-
|
|
624
|
-
|
|
647
|
+
.comment-date {
|
|
648
|
+
font-size: 11px;
|
|
649
|
+
color: var(--muted);
|
|
650
|
+
display: flex;
|
|
651
|
+
align-items: center;
|
|
652
|
+
gap: 4px;
|
|
653
|
+
}
|
|
654
|
+
.comment-date::before {
|
|
655
|
+
content: '🕐';
|
|
656
|
+
font-size: 10px;
|
|
657
|
+
}
|
|
658
|
+
.comment-text {
|
|
659
|
+
font-size: 13px;
|
|
660
|
+
line-height: 1.6;
|
|
661
|
+
color: var(--fg);
|
|
662
|
+
}
|
|
663
|
+
.comment-text h1, .comment-text h2, .comment-text h3, .comment-text h4 {
|
|
664
|
+
margin: 12px 0 6px;
|
|
665
|
+
font-weight: 600;
|
|
666
|
+
color: var(--fg);
|
|
667
|
+
}
|
|
668
|
+
.comment-text h1 { font-size: 16px; }
|
|
669
|
+
.comment-text h2 { font-size: 15px; }
|
|
670
|
+
.comment-text h3 { font-size: 14px; }
|
|
671
|
+
.comment-text p { margin: 6px 0; }
|
|
625
672
|
.comment-text code {
|
|
626
673
|
background: #21262d;
|
|
627
674
|
padding: 2px 6px;
|
|
628
675
|
border-radius: 4px;
|
|
629
676
|
font-size: 12px;
|
|
677
|
+
font-family: 'JetBrains Mono', monospace;
|
|
678
|
+
}
|
|
679
|
+
.comment-text pre {
|
|
680
|
+
background: #21262d;
|
|
681
|
+
padding: 10px 12px;
|
|
682
|
+
border-radius: 6px;
|
|
683
|
+
overflow-x: auto;
|
|
684
|
+
margin: 8px 0;
|
|
685
|
+
}
|
|
686
|
+
.comment-text pre code {
|
|
687
|
+
background: none;
|
|
688
|
+
padding: 0;
|
|
630
689
|
}
|
|
631
|
-
.comment-text ul
|
|
690
|
+
.comment-text ul, .comment-text ol {
|
|
691
|
+
margin: 6px 0 6px 20px;
|
|
692
|
+
}
|
|
693
|
+
.comment-text li { margin: 4px 0; }
|
|
694
|
+
.comment-text blockquote {
|
|
695
|
+
border-left: 3px solid var(--accent);
|
|
696
|
+
padding-left: 12px;
|
|
697
|
+
margin: 8px 0;
|
|
698
|
+
color: var(--muted);
|
|
699
|
+
font-style: italic;
|
|
700
|
+
}
|
|
701
|
+
.comment-text a {
|
|
702
|
+
color: var(--blue);
|
|
703
|
+
text-decoration: none;
|
|
704
|
+
}
|
|
705
|
+
.comment-text a:hover { text-decoration: underline; }
|
|
706
|
+
.comment-text strong { font-weight: 600; }
|
|
707
|
+
.comment-text em { font-style: italic; }
|
|
632
708
|
|
|
633
709
|
.add-comment { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
|
|
634
710
|
.add-comment textarea { min-height: 60px; }
|
|
@@ -1862,4 +1938,291 @@ function getScript() {
|
|
|
1862
1938
|
connectWebSocket();
|
|
1863
1939
|
`;
|
|
1864
1940
|
}
|
|
1941
|
+
/**
|
|
1942
|
+
* Generate column edit page
|
|
1943
|
+
*/
|
|
1944
|
+
export function generateColumnEditPage(slug, lang) {
|
|
1945
|
+
const columns = getColumns();
|
|
1946
|
+
const column = columns.find(c => c.slug === slug);
|
|
1947
|
+
const columnName = column?.name || slug;
|
|
1948
|
+
return `<!DOCTYPE html>
|
|
1949
|
+
<html lang="${lang}">
|
|
1950
|
+
<head>
|
|
1951
|
+
<meta charset="UTF-8">
|
|
1952
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
1953
|
+
<title>Edit: ${escapeHtml(columnName)} - AutoCode</title>
|
|
1954
|
+
<style>
|
|
1955
|
+
:root {
|
|
1956
|
+
--bg: #0d1117;
|
|
1957
|
+
--bg-card: #161b22;
|
|
1958
|
+
--border: #30363d;
|
|
1959
|
+
--fg: #c9d1d9;
|
|
1960
|
+
--muted: #8b949e;
|
|
1961
|
+
--accent: #7c3aed;
|
|
1962
|
+
--blue: #4dabf7;
|
|
1963
|
+
--green: #22c55e;
|
|
1964
|
+
--red: #ef4444;
|
|
1965
|
+
}
|
|
1966
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
1967
|
+
body {
|
|
1968
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1969
|
+
background: var(--bg);
|
|
1970
|
+
color: var(--fg);
|
|
1971
|
+
height: 100vh;
|
|
1972
|
+
display: flex;
|
|
1973
|
+
flex-direction: column;
|
|
1974
|
+
}
|
|
1975
|
+
.header {
|
|
1976
|
+
background: var(--bg-card);
|
|
1977
|
+
border-bottom: 1px solid var(--border);
|
|
1978
|
+
padding: 16px 24px;
|
|
1979
|
+
display: flex;
|
|
1980
|
+
align-items: center;
|
|
1981
|
+
gap: 16px;
|
|
1982
|
+
}
|
|
1983
|
+
.back-btn {
|
|
1984
|
+
background: none;
|
|
1985
|
+
border: 1px solid var(--border);
|
|
1986
|
+
color: var(--fg);
|
|
1987
|
+
padding: 8px 12px;
|
|
1988
|
+
border-radius: 6px;
|
|
1989
|
+
cursor: pointer;
|
|
1990
|
+
font-size: 14px;
|
|
1991
|
+
display: flex;
|
|
1992
|
+
align-items: center;
|
|
1993
|
+
gap: 6px;
|
|
1994
|
+
text-decoration: none;
|
|
1995
|
+
}
|
|
1996
|
+
.back-btn:hover { border-color: var(--accent); color: var(--accent); }
|
|
1997
|
+
.title {
|
|
1998
|
+
flex: 1;
|
|
1999
|
+
font-size: 18px;
|
|
2000
|
+
font-weight: 600;
|
|
2001
|
+
}
|
|
2002
|
+
.title span { color: var(--muted); font-weight: 400; }
|
|
2003
|
+
.lang-selector {
|
|
2004
|
+
display: flex;
|
|
2005
|
+
gap: 4px;
|
|
2006
|
+
}
|
|
2007
|
+
.lang-btn {
|
|
2008
|
+
background: var(--bg);
|
|
2009
|
+
border: 1px solid var(--border);
|
|
2010
|
+
color: var(--muted);
|
|
2011
|
+
padding: 6px 12px;
|
|
2012
|
+
border-radius: 4px;
|
|
2013
|
+
cursor: pointer;
|
|
2014
|
+
font-size: 13px;
|
|
2015
|
+
font-weight: 600;
|
|
2016
|
+
}
|
|
2017
|
+
.lang-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
|
|
2018
|
+
.lang-btn:hover:not(.active) { border-color: var(--accent); color: var(--fg); }
|
|
2019
|
+
.actions {
|
|
2020
|
+
display: flex;
|
|
2021
|
+
gap: 8px;
|
|
2022
|
+
}
|
|
2023
|
+
.btn {
|
|
2024
|
+
padding: 8px 16px;
|
|
2025
|
+
border-radius: 6px;
|
|
2026
|
+
font-size: 14px;
|
|
2027
|
+
font-weight: 500;
|
|
2028
|
+
cursor: pointer;
|
|
2029
|
+
border: none;
|
|
2030
|
+
}
|
|
2031
|
+
.btn-save { background: var(--green); color: white; }
|
|
2032
|
+
.btn-save:hover { opacity: 0.9; }
|
|
2033
|
+
.btn-save:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
2034
|
+
.editor-container {
|
|
2035
|
+
flex: 1;
|
|
2036
|
+
padding: 16px 24px;
|
|
2037
|
+
display: flex;
|
|
2038
|
+
flex-direction: column;
|
|
2039
|
+
overflow: hidden;
|
|
2040
|
+
}
|
|
2041
|
+
.editor {
|
|
2042
|
+
flex: 1;
|
|
2043
|
+
width: 100%;
|
|
2044
|
+
background: var(--bg-card);
|
|
2045
|
+
border: 1px solid var(--border);
|
|
2046
|
+
border-radius: 8px;
|
|
2047
|
+
color: var(--fg);
|
|
2048
|
+
font-family: 'JetBrains Mono', 'Fira Code', monospace;
|
|
2049
|
+
font-size: 14px;
|
|
2050
|
+
line-height: 1.6;
|
|
2051
|
+
padding: 16px;
|
|
2052
|
+
resize: none;
|
|
2053
|
+
outline: none;
|
|
2054
|
+
}
|
|
2055
|
+
.editor:focus { border-color: var(--accent); }
|
|
2056
|
+
.status-bar {
|
|
2057
|
+
display: flex;
|
|
2058
|
+
justify-content: space-between;
|
|
2059
|
+
align-items: center;
|
|
2060
|
+
padding: 8px 0;
|
|
2061
|
+
font-size: 12px;
|
|
2062
|
+
color: var(--muted);
|
|
2063
|
+
}
|
|
2064
|
+
.status-bar .modified { color: var(--accent); font-weight: 600; }
|
|
2065
|
+
.status-bar .saved { color: var(--green); }
|
|
2066
|
+
.notification {
|
|
2067
|
+
position: fixed;
|
|
2068
|
+
bottom: 24px;
|
|
2069
|
+
right: 24px;
|
|
2070
|
+
background: var(--bg-card);
|
|
2071
|
+
border: 1px solid var(--border);
|
|
2072
|
+
border-left: 3px solid var(--green);
|
|
2073
|
+
padding: 12px 16px;
|
|
2074
|
+
border-radius: 6px;
|
|
2075
|
+
font-size: 14px;
|
|
2076
|
+
opacity: 0;
|
|
2077
|
+
transform: translateY(10px);
|
|
2078
|
+
transition: all 0.3s;
|
|
2079
|
+
z-index: 100;
|
|
2080
|
+
}
|
|
2081
|
+
.notification.show { opacity: 1; transform: translateY(0); }
|
|
2082
|
+
.notification.error { border-left-color: var(--red); }
|
|
2083
|
+
</style>
|
|
2084
|
+
</head>
|
|
2085
|
+
<body>
|
|
2086
|
+
<header class="header">
|
|
2087
|
+
<a href="/" class="back-btn">← Dashboard</a>
|
|
2088
|
+
<h1 class="title">${escapeHtml(columnName)} <span>/ ACTION.md</span></h1>
|
|
2089
|
+
<div class="lang-selector">
|
|
2090
|
+
<button class="lang-btn ${lang === 'en' ? 'active' : ''}" data-lang="en">EN</button>
|
|
2091
|
+
<button class="lang-btn ${lang === 'fr' ? 'active' : ''}" data-lang="fr">FR</button>
|
|
2092
|
+
</div>
|
|
2093
|
+
<div class="actions">
|
|
2094
|
+
<button class="btn btn-save" id="saveBtn" disabled>Save</button>
|
|
2095
|
+
</div>
|
|
2096
|
+
</header>
|
|
2097
|
+
<div class="editor-container">
|
|
2098
|
+
<div class="status-bar">
|
|
2099
|
+
<span id="status">Loading...</span>
|
|
2100
|
+
<span id="path">${slug}/ACTION.${lang}.md</span>
|
|
2101
|
+
</div>
|
|
2102
|
+
<textarea class="editor" id="editor" placeholder="Loading..."></textarea>
|
|
2103
|
+
</div>
|
|
2104
|
+
<div class="notification" id="notification"></div>
|
|
2105
|
+
|
|
2106
|
+
<script>
|
|
2107
|
+
const slug = '${slug}';
|
|
2108
|
+
let currentLang = '${lang}';
|
|
2109
|
+
let originalContent = '';
|
|
2110
|
+
let hasChanges = false;
|
|
2111
|
+
|
|
2112
|
+
const editor = document.getElementById('editor');
|
|
2113
|
+
const saveBtn = document.getElementById('saveBtn');
|
|
2114
|
+
const status = document.getElementById('status');
|
|
2115
|
+
const pathEl = document.getElementById('path');
|
|
2116
|
+
const notification = document.getElementById('notification');
|
|
2117
|
+
|
|
2118
|
+
// Load content
|
|
2119
|
+
async function loadContent() {
|
|
2120
|
+
try {
|
|
2121
|
+
status.textContent = 'Loading...';
|
|
2122
|
+
status.className = '';
|
|
2123
|
+
const res = await fetch('/api/columns/' + slug + '/actions?lang=' + currentLang);
|
|
2124
|
+
const data = await res.json();
|
|
2125
|
+
if (data.success) {
|
|
2126
|
+
originalContent = data.data.content || '';
|
|
2127
|
+
editor.value = originalContent;
|
|
2128
|
+
pathEl.textContent = slug + '/ACTION.' + currentLang + '.md';
|
|
2129
|
+
checkChanges();
|
|
2130
|
+
status.textContent = 'Ready';
|
|
2131
|
+
} else {
|
|
2132
|
+
status.textContent = 'Error: ' + (data.error || 'Failed to load');
|
|
2133
|
+
}
|
|
2134
|
+
} catch (e) {
|
|
2135
|
+
status.textContent = 'Error: ' + e.message;
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
// Save content
|
|
2140
|
+
async function saveContent() {
|
|
2141
|
+
if (!hasChanges) return;
|
|
2142
|
+
try {
|
|
2143
|
+
saveBtn.disabled = true;
|
|
2144
|
+
saveBtn.textContent = 'Saving...';
|
|
2145
|
+
const res = await fetch('/api/columns/' + slug + '/actions?lang=' + currentLang, {
|
|
2146
|
+
method: 'POST',
|
|
2147
|
+
headers: { 'Content-Type': 'application/json' },
|
|
2148
|
+
body: JSON.stringify({ content: editor.value })
|
|
2149
|
+
});
|
|
2150
|
+
const data = await res.json();
|
|
2151
|
+
if (data.success) {
|
|
2152
|
+
originalContent = editor.value;
|
|
2153
|
+
hasChanges = false;
|
|
2154
|
+
checkChanges();
|
|
2155
|
+
showNotification('Saved successfully!', false);
|
|
2156
|
+
} else {
|
|
2157
|
+
showNotification('Error: ' + (data.error || 'Failed to save'), true);
|
|
2158
|
+
}
|
|
2159
|
+
} catch (e) {
|
|
2160
|
+
showNotification('Error: ' + e.message, true);
|
|
2161
|
+
} finally {
|
|
2162
|
+
saveBtn.textContent = 'Save';
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
// Check for changes
|
|
2167
|
+
function checkChanges() {
|
|
2168
|
+
hasChanges = editor.value !== originalContent;
|
|
2169
|
+
saveBtn.disabled = !hasChanges;
|
|
2170
|
+
if (hasChanges) {
|
|
2171
|
+
status.textContent = 'Modified (unsaved)';
|
|
2172
|
+
status.className = 'modified';
|
|
2173
|
+
} else {
|
|
2174
|
+
status.textContent = 'Saved';
|
|
2175
|
+
status.className = 'saved';
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
// Show notification
|
|
2180
|
+
function showNotification(msg, isError) {
|
|
2181
|
+
notification.textContent = msg;
|
|
2182
|
+
notification.className = 'notification show' + (isError ? ' error' : '');
|
|
2183
|
+
setTimeout(() => notification.className = 'notification', 3000);
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
// Event listeners
|
|
2187
|
+
editor.addEventListener('input', checkChanges);
|
|
2188
|
+
saveBtn.addEventListener('click', saveContent);
|
|
2189
|
+
|
|
2190
|
+
// Ctrl+S to save
|
|
2191
|
+
document.addEventListener('keydown', e => {
|
|
2192
|
+
if ((e.ctrlKey || e.metaKey) && e.key === 's') {
|
|
2193
|
+
e.preventDefault();
|
|
2194
|
+
if (hasChanges) saveContent();
|
|
2195
|
+
}
|
|
2196
|
+
});
|
|
2197
|
+
|
|
2198
|
+
// Language switcher
|
|
2199
|
+
document.querySelectorAll('.lang-btn').forEach(btn => {
|
|
2200
|
+
btn.addEventListener('click', () => {
|
|
2201
|
+
const newLang = btn.dataset.lang;
|
|
2202
|
+
if (newLang !== currentLang) {
|
|
2203
|
+
if (hasChanges && !confirm('You have unsaved changes. Switch language anyway?')) {
|
|
2204
|
+
return;
|
|
2205
|
+
}
|
|
2206
|
+
currentLang = newLang;
|
|
2207
|
+
document.querySelectorAll('.lang-btn').forEach(b => b.classList.remove('active'));
|
|
2208
|
+
btn.classList.add('active');
|
|
2209
|
+
loadContent();
|
|
2210
|
+
}
|
|
2211
|
+
});
|
|
2212
|
+
});
|
|
2213
|
+
|
|
2214
|
+
// Warn before leaving with unsaved changes
|
|
2215
|
+
window.addEventListener('beforeunload', e => {
|
|
2216
|
+
if (hasChanges) {
|
|
2217
|
+
e.preventDefault();
|
|
2218
|
+
e.returnValue = '';
|
|
2219
|
+
}
|
|
2220
|
+
});
|
|
2221
|
+
|
|
2222
|
+
// Init
|
|
2223
|
+
loadContent();
|
|
2224
|
+
</script>
|
|
2225
|
+
</body>
|
|
2226
|
+
</html>`;
|
|
2227
|
+
}
|
|
1865
2228
|
//# sourceMappingURL=dashboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/server/dashboard.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C;;GAEG;AACH,MAAM,UAA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AAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuIf,UAAU,CAAC,UAAU,CAAC;;gCAEd,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;gCAC7B,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;;;;;;;;;wBASrC,IAAI,WAAW,IAAI;;;;;;;oBAOvB,IAAI;yBACC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsHrB,CAAC;AACT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;GAEG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;GAEG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkG7D"}
|
package/dist/server/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* HTTP Server
|
|
3
3
|
*/
|
|
4
4
|
import { createServer } from 'node:http';
|
|
5
|
-
import { generateDashboard } from './dashboard.js';
|
|
5
|
+
import { generateDashboard, generateColumnEditPage } from './dashboard.js';
|
|
6
6
|
import { handleApiRequest } from './api.js';
|
|
7
7
|
import { handleWebSocketUpgrade, setupPingInterval, getClientCount } from './websocket.js';
|
|
8
8
|
import { startWatcher, stopWatcher } from './watcher.js';
|
|
@@ -28,6 +28,16 @@ export async function startServer(port) {
|
|
|
28
28
|
res.end(html);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
+
// Handle column edit page
|
|
32
|
+
const columnEditMatch = url.match(/^\/column\/([^/]+)\/edit$/);
|
|
33
|
+
if (columnEditMatch) {
|
|
34
|
+
const config = getConfig();
|
|
35
|
+
const slug = columnEditMatch[1];
|
|
36
|
+
const html = generateColumnEditPage(slug, config.lang);
|
|
37
|
+
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
38
|
+
res.end(html);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
31
41
|
// Health check
|
|
32
42
|
if (url === '/health') {
|
|
33
43
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAmC,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAmC,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAA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