code wiki / _hdl_build / nx_js_headless_render.nx
nx_js_headless_render.nx
buildroot/runtime/_hdl_build/nx_js_headless_render.nx
about
nx_js_headless_render.nx -- RUNG 5 CONSUMER + API-CAPTURE: fetch a REAL site over sovereign TLS, fetch its
same-origin external <script> BUNDLES, run everything (inline+bundles) in ONE shared genv, and -- the SPA
unlock -- CAPTURE the runtime fetch()/XHR calls the app makes (js_pending_*), service them over TLS, and
print the captured API endpoint + its JSON. That reaches SPA *data* without rendering the framework.
usage: nx_js_headless_render <url>
license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_js_eval.nxnx_html_to_text.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const HR_MAGIC_4194304: i64 = 4194304 |
| 14 | const HR_MAGIC_65536: i64 = 65536 |
| 15 | const HR_MAGIC_4096: i64 = 4096 |
| 16 | const HR_MAGIC_4094: i64 = 4094 |
| 17 | const HR_MAGIC_1048576: i64 = 1048576 |
| 36 | const HR_MAXROUNDS: i64 = 10 |
functions
| 19 | func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 20 | func hn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var q: i64=k-1; var x: i64=0; while q>=0 { o[x]=t[q]; x=x+1; q=q-1 } sys_write(1,o,x); return 0 } |
| 21 | func hsl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: origin_of |
| 23 | func origin_of(url: *u8, out: *u8) -> i64 |
| 38 | func main(argc: i64, argv: *i64) -> i64 |