wunderland 0.87.0 → 0.88.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.
|
@@ -6,7 +6,11 @@ export interface ReportDataset {
|
|
|
6
6
|
/** Optional lead paragraph rendered above the table in HTML/PDF. */
|
|
7
7
|
summary?: string;
|
|
8
8
|
}
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Escape one CSV field per RFC 4180 (quote when it holds `," \n \r`). A text
|
|
11
|
+
* cell a spreadsheet would read as a formula (`=HYPERLINK(...)`, `@SUM(...)`)
|
|
12
|
+
* gets a leading `'`, so it opens as text; numbers are left as they are.
|
|
13
|
+
*/
|
|
10
14
|
export declare function csvField(value: string | number): string;
|
|
11
15
|
/** Render a dataset to CSV text (header row + one row per record). */
|
|
12
16
|
export declare function toCsv(ds: ReportDataset): string;
|
|
@@ -42,6 +46,9 @@ export interface InteractiveOptions {
|
|
|
42
46
|
* column sort, a live search box, per-column filters, stat cards, optional
|
|
43
47
|
* value heat-shading, and a light/dark toggle. No external resources — all CSS
|
|
44
48
|
* and JS are inlined, so it opens offline and is safe to share as one file.
|
|
49
|
+
* Row values and column keys and labels reach the page as text nodes, never as
|
|
50
|
+
* markup, and its CSV download neutralizes formula cells the way
|
|
51
|
+
* {@link csvField} does.
|
|
45
52
|
*/
|
|
46
53
|
export declare function toInteractiveHtml(ds: ReportDataset, opts?: InteractiveOptions): string;
|
|
47
54
|
/** Options controlling PDF rendering. */
|
|
@@ -51,20 +58,34 @@ export interface PdfOptions {
|
|
|
51
58
|
/** Per-render timeout ms (default 90s). */
|
|
52
59
|
timeoutMs?: number;
|
|
53
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Content security policy put ahead of the HTML a PDF is printed from: inline
|
|
63
|
+
* styles and data: images and fonts only, so the page fetches nothing (no
|
|
64
|
+
* network URL, no other file:// path, no frame).
|
|
65
|
+
*/
|
|
66
|
+
export declare const PDF_CSP = "default-src 'none'; style-src 'unsafe-inline'; img-src data:; font-src data:";
|
|
67
|
+
/**
|
|
68
|
+
* Prepare HTML for PDF printing: one doctype, then a charset and the
|
|
69
|
+
* {@link PDF_CSP} policy, then the caller's document. Pure + exported for tests.
|
|
70
|
+
*/
|
|
71
|
+
export declare function preparePdfHtml(html: string): string;
|
|
54
72
|
/**
|
|
55
73
|
* Build the headless-Chrome argv for PDF rendering. Pure + exported for tests.
|
|
56
74
|
* The `--user-data-dir` MUST be an isolated throwaway directory, never the
|
|
57
|
-
* user's live profile.
|
|
75
|
+
* user's live profile. Scripts are off, and every request goes to a proxy on
|
|
76
|
+
* a closed local port (loopback included), so the page reaches no host.
|
|
58
77
|
*/
|
|
59
78
|
export declare function buildPdfArgs(htmlPath: string, pdfPath: string, userDataDir: string): string[];
|
|
60
79
|
/**
|
|
61
80
|
* Render `html` to a PDF at `pdfPath` via an isolated headless Chrome. Throws
|
|
62
|
-
* if the binary is missing or the render times out.
|
|
81
|
+
* if the binary is missing or the render times out. The page prints with
|
|
82
|
+
* scripts off, behind {@link PDF_CSP} and with no network route.
|
|
63
83
|
*/
|
|
64
84
|
export declare function renderPdf(html: string, pdfPath: string, opts?: PdfOptions): Promise<string>;
|
|
65
85
|
/**
|
|
66
86
|
* Write CSV + HTML for a dataset (always) and a PDF (best-effort, when a Chrome
|
|
67
|
-
* binary is available). Returns the paths that were written.
|
|
87
|
+
* binary is available). Returns the paths that were written. Throws a
|
|
88
|
+
* TypeError before writing anything when `basename` is not a plain file name.
|
|
68
89
|
*/
|
|
69
90
|
export declare function exportReport(ds: ReportDataset, outDir: string, opts?: {
|
|
70
91
|
basename?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report-export.d.ts","sourceRoot":"","sources":["../../../src/cli/export/report-export.ts"],"names":[],"mappings":"AAsBA,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IA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path';
|
|
19
19
|
import { promisify } from 'node:util';
|
|
20
20
|
const pExecFile = promisify(execFile);
|
|
21
|
-
/**
|
|
21
|
+
/** A cell a spreadsheet would evaluate: it starts with `=`, `+`, `-`, `@`, tab or CR. */
|
|
22
|
+
const FORMULA_LEAD = /^[=+\-@\t\r]/;
|
|
23
|
+
/** A signed number such as `-5.25`, `+44` or `1e-3`, which stays as written. */
|
|
24
|
+
const PLAIN_NUMBER = /^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;
|
|
25
|
+
/**
|
|
26
|
+
* Escape one CSV field per RFC 4180 (quote when it holds `," \n \r`). A text
|
|
27
|
+
* cell a spreadsheet would read as a formula (`=HYPERLINK(...)`, `@SUM(...)`)
|
|
28
|
+
* gets a leading `'`, so it opens as text; numbers are left as they are.
|
|
29
|
+
*/
|
|
22
30
|
export function csvField(value) {
|
|
23
|
-
|
|
31
|
+
let s = String(value ?? '');
|
|
32
|
+
if (typeof value !== 'number' && FORMULA_LEAD.test(s) && !PLAIN_NUMBER.test(s))
|
|
33
|
+
s = `'${s}`;
|
|
24
34
|
return /[",\n\r]/.test(s) ? `"${s.replace(/"/g, '""')}"` : s;
|
|
25
35
|
}
|
|
26
36
|
/** Render a dataset to CSV text (header row + one row per record). */
|
|
@@ -66,6 +76,9 @@ ${rows}
|
|
|
66
76
|
* column sort, a live search box, per-column filters, stat cards, optional
|
|
67
77
|
* value heat-shading, and a light/dark toggle. No external resources — all CSS
|
|
68
78
|
* and JS are inlined, so it opens offline and is safe to share as one file.
|
|
79
|
+
* Row values and column keys and labels reach the page as text nodes, never as
|
|
80
|
+
* markup, and its CSV download neutralizes formula cells the way
|
|
81
|
+
* {@link csvField} does.
|
|
69
82
|
*/
|
|
70
83
|
export function toInteractiveHtml(ds, opts = {}) {
|
|
71
84
|
const specs = opts.columns ?? ds.columns.map((k) => ({ key: k }));
|
|
@@ -135,24 +148,46 @@ function shade(c, v){ const h=heats[c.key]; if(!h)return ''; const n=num(v); if(
|
|
|
135
148
|
function rows(){ let rs=DATA.rows; if(state.q){ const q=state.q.toLowerCase(); rs=rs.filter(r=>DATA.cols.some(c=>String(r[c.key]??'').toLowerCase().includes(q))); }
|
|
136
149
|
if(state.sortKey){ const c=DATA.cols.find(x=>x.key===state.sortKey); rs=rs.slice().sort((a,b)=>{ let av=a[state.sortKey], bv=b[state.sortKey]; if(c&&c.numeric){ av=num(av)??-Infinity; bv=num(bv)??-Infinity; return (av-bv)*state.dir;} return String(av??'').localeCompare(String(bv??''))*state.dir; }); }
|
|
137
150
|
return rs; }
|
|
151
|
+
function el(tag, cls, text){ const e=document.createElement(tag); if(cls)e.className=cls; if(text!=null)e.textContent=text; return e; }
|
|
138
152
|
function render(){ const th=document.getElementById('thead'), tb=document.getElementById('tbody');
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
153
|
+
const hr=document.createElement('tr');
|
|
154
|
+
for(const c of DATA.cols){ const h=el('th', ((c.numeric?'num ':'')+(state.sortKey===c.key?'sorted':'')).trim(), String(c.label));
|
|
155
|
+
h.appendChild(el('span','ar', state.sortKey===c.key?(state.dir>0?'▲':'▼'):'⇅'));
|
|
156
|
+
h.onclick=()=>{ if(state.sortKey===c.key)state.dir*=-1; else {state.sortKey=c.key;state.dir=1;} render(); };
|
|
157
|
+
hr.appendChild(h); }
|
|
158
|
+
th.replaceChildren(hr);
|
|
159
|
+
const rs=rows(); tb.replaceChildren();
|
|
160
|
+
for(const r of rs){ const tr=document.createElement('tr'); for(const c of DATA.cols){ const v=r[c.key]??''; const td=el('td', c.numeric?'num':'wrapcell', String(v)); td.style.cssText=shade(c,v); tr.appendChild(td); } tb.appendChild(tr); }
|
|
161
|
+
if(!rs.length){ const tr=document.createElement('tr'); const td=el('td','empty','No matching rows'); td.colSpan=DATA.cols.length; tr.appendChild(td); tb.appendChild(tr); }
|
|
162
|
+
document.getElementById('count').textContent=rs.length+' / '+DATA.rows.length+' rows'; }
|
|
143
163
|
document.getElementById('q').addEventListener('input', e=>{ state.q=e.target.value; render(); });
|
|
144
164
|
document.getElementById('themeBtn').onclick=()=>{ const r=document.documentElement; const cur=r.getAttribute('data-theme')|| (matchMedia('(prefers-color-scheme:dark)').matches?'dark':'light'); r.setAttribute('data-theme', cur==='dark'?'light':'dark'); };
|
|
145
|
-
document.getElementById('csvBtn').onclick=()=>{ const esc=v=>{
|
|
165
|
+
document.getElementById('csvBtn').onclick=()=>{ const esc=v=>{let s=String(v??''); if(typeof v!=='number'&&/^[=+\\-@\\t\\r]/.test(s)&&!/^[+-]?(\\d+\\.?\\d*|\\.\\d+)(e[+-]?\\d+)?$/i.test(s))s="'"+s; return /[",\\n\\r]/.test(s)?'"'+s.replace(/"/g,'""')+'"':s;}; const cols=DATA.cols.map(c=>c.key); const csv=[cols.map(esc).join(',')].concat(rows().map(r=>cols.map(c=>esc(r[c])).join(','))).join('\\n'); const a=document.createElement('a'); a.href=URL.createObjectURL(new Blob([csv],{type:'text/csv'})); a.download='report.csv'; a.click(); };
|
|
146
166
|
${theme !== 'auto' ? `document.documentElement.setAttribute('data-theme', ${JSON.stringify(theme)});` : ''}
|
|
147
167
|
render();
|
|
148
168
|
</script>
|
|
149
169
|
</body></html>`;
|
|
150
170
|
}
|
|
151
171
|
const DEFAULT_CHROME = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
|
|
172
|
+
/**
|
|
173
|
+
* Content security policy put ahead of the HTML a PDF is printed from: inline
|
|
174
|
+
* styles and data: images and fonts only, so the page fetches nothing (no
|
|
175
|
+
* network URL, no other file:// path, no frame).
|
|
176
|
+
*/
|
|
177
|
+
export const PDF_CSP = "default-src 'none'; style-src 'unsafe-inline'; img-src data:; font-src data:";
|
|
178
|
+
/**
|
|
179
|
+
* Prepare HTML for PDF printing: one doctype, then a charset and the
|
|
180
|
+
* {@link PDF_CSP} policy, then the caller's document. Pure + exported for tests.
|
|
181
|
+
*/
|
|
182
|
+
export function preparePdfHtml(html) {
|
|
183
|
+
const rest = html.replace(/^\uFEFF?\s*<!DOCTYPE[^>]*>/i, '');
|
|
184
|
+
return `<!DOCTYPE html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${PDF_CSP}">${rest}`;
|
|
185
|
+
}
|
|
152
186
|
/**
|
|
153
187
|
* Build the headless-Chrome argv for PDF rendering. Pure + exported for tests.
|
|
154
188
|
* The `--user-data-dir` MUST be an isolated throwaway directory, never the
|
|
155
|
-
* user's live profile.
|
|
189
|
+
* user's live profile. Scripts are off, and every request goes to a proxy on
|
|
190
|
+
* a closed local port (loopback included), so the page reaches no host.
|
|
156
191
|
*/
|
|
157
192
|
export function buildPdfArgs(htmlPath, pdfPath, userDataDir) {
|
|
158
193
|
return [
|
|
@@ -161,6 +196,9 @@ export function buildPdfArgs(htmlPath, pdfPath, userDataDir) {
|
|
|
161
196
|
`--user-data-dir=${userDataDir}`,
|
|
162
197
|
'--no-first-run',
|
|
163
198
|
'--no-default-browser-check',
|
|
199
|
+
'--blink-settings=scriptEnabled=false',
|
|
200
|
+
'--proxy-server=127.0.0.1:9',
|
|
201
|
+
'--proxy-bypass-list=<-loopback>',
|
|
164
202
|
`--print-to-pdf=${pdfPath}`,
|
|
165
203
|
'--no-pdf-header-footer',
|
|
166
204
|
`file://${htmlPath}`,
|
|
@@ -168,26 +206,38 @@ export function buildPdfArgs(htmlPath, pdfPath, userDataDir) {
|
|
|
168
206
|
}
|
|
169
207
|
/**
|
|
170
208
|
* Render `html` to a PDF at `pdfPath` via an isolated headless Chrome. Throws
|
|
171
|
-
* if the binary is missing or the render times out.
|
|
209
|
+
* if the binary is missing or the render times out. The page prints with
|
|
210
|
+
* scripts off, behind {@link PDF_CSP} and with no network route.
|
|
172
211
|
*/
|
|
173
212
|
export async function renderPdf(html, pdfPath, opts = {}) {
|
|
174
213
|
const { writeFileSync } = await import('node:fs');
|
|
175
214
|
const work = mkdtempSync(join(tmpdir(), 'wl-report-'));
|
|
176
215
|
const htmlPath = join(work, 'report.html');
|
|
177
216
|
const profileDir = join(work, 'chrome-profile'); // throwaway — NEVER the live profile
|
|
178
|
-
writeFileSync(htmlPath, html);
|
|
217
|
+
writeFileSync(htmlPath, preparePdfHtml(html));
|
|
179
218
|
const args = buildPdfArgs(htmlPath, pdfPath, profileDir);
|
|
180
219
|
await pExecFile(opts.chromeBinary ?? DEFAULT_CHROME, args, { timeout: opts.timeoutMs ?? 90_000 });
|
|
181
220
|
return pdfPath;
|
|
182
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Refuse a basename that is not a plain file name, so every output path stays
|
|
224
|
+
* inside `outDir` (`../x`, `a/b`, `a\b`, `.`, `..` and `''` throw).
|
|
225
|
+
*/
|
|
226
|
+
function plainBasename(base) {
|
|
227
|
+
if (!base || base === '.' || base === '..' || /[\\/\0]/.test(base)) {
|
|
228
|
+
throw new TypeError(`exportReport: basename must be a plain file name, got ${JSON.stringify(base)}`);
|
|
229
|
+
}
|
|
230
|
+
return base;
|
|
231
|
+
}
|
|
183
232
|
/**
|
|
184
233
|
* Write CSV + HTML for a dataset (always) and a PDF (best-effort, when a Chrome
|
|
185
|
-
* binary is available). Returns the paths that were written.
|
|
234
|
+
* binary is available). Returns the paths that were written. Throws a
|
|
235
|
+
* TypeError before writing anything when `basename` is not a plain file name.
|
|
186
236
|
*/
|
|
187
237
|
export async function exportReport(ds, outDir, opts = {}) {
|
|
238
|
+
const base = plainBasename(opts.basename ?? 'report');
|
|
188
239
|
const { mkdirSync, writeFileSync } = await import('node:fs');
|
|
189
240
|
mkdirSync(outDir, { recursive: true });
|
|
190
|
-
const base = opts.basename ?? 'report';
|
|
191
241
|
const csv = join(outDir, `${base}.csv`);
|
|
192
242
|
const html = join(outDir, `${base}.html`);
|
|
193
243
|
writeFileSync(csv, toCsv(ds));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report-export.js","sourceRoot":"","sources":["../../../src/cli/export/report-export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAA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C;QAAC,MAAM,CAAC;YACP,+CAA+C;QACjD,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wunderland",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "Autonomous AI agents you deploy in 30 seconds across any channel. Interactive setup wizard, 37 channel adapters, HEXACO personality and cognitive memory powered by AgentOS, five-tier prompt-injection defense.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,6 +41,10 @@
|
|
|
41
41
|
"./security": {
|
|
42
42
|
"import": "./dist/security/index.js",
|
|
43
43
|
"types": "./dist/security/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./report": {
|
|
46
|
+
"import": "./dist/cli/export/report-export.js",
|
|
47
|
+
"types": "./dist/cli/export/report-export.d.ts"
|
|
44
48
|
}
|
|
45
49
|
},
|
|
46
50
|
"files": [
|