Extend network stack: session/auth, WebSocket, cookie/multipart primitives
Add the network-extension wave to lib/net and the web ABI plugin:
- lib/net cookie_parse / multipart_parse host primitives (EN/ZH)
- plugins/web session store + /admin login gate + WebSocket client/server
- ext/web author surface (EN/ZH) for session, auth, ws
- form update flow and page-level validation echo tests
- fix string escapes: \xHH, \u{...}, unknown escapes kept verbatim
- map Chinese component slots (导航/侧栏/页脚) so sidebar renders
- resolve relative static/db paths against the entry script dir (entry_dir)
- new tutorial chapter 14, EN/ZH example sites, and gold tests
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7dfa161422
commit
7645dd4c1f
47 files changed
+3380
-75
No files matched your search
@@ -273,6 +273,20 @@ unsafe extern "C" fn host_query(
|
||||
"cwd" => Ok(serde_json::Value::String(
|
||||
ctx.cwd.to_string_lossy().into_owned(),
|
||||
)),
|
||||
"entry_dir" => Ok(serde_json::Value::String(
|
||||
ctx.entry_path
|
||||
.as_ref()
|
||||
.map(|p| {
|
||||
if p.is_dir() {
|
||||
p.clone()
|
||||
} else {
|
||||
p.parent().unwrap_or(p).to_path_buf()
|
||||
}
|
||||
})
|
||||
.unwrap_or_else(|| ctx.cwd.clone())
|
||||
.to_string_lossy()
|
||||
.into_owned(),
|
||||
)),
|
||||
"call_lib_path" => (|| {
|
||||
let raw = args_owned.as_deref().unwrap_or("{}");
|
||||
let args: serde_json::Value = serde_json::from_str(if raw.trim().is_empty() {
|
||||
|
||||
Reference in new issue
Block a user