code wiki / _hdl_build / nx_cms_migrate.nx

nx_cms_migrate.nx

buildroot/runtime/_hdl_build/nx_cms_migrate.nx

7300 B177 linesdepth 5pulls 6 transitivereach 2 importersview sourcekind librarytopic cms
docsdependenciesstructsconstsfunctions

about

nx_cms_migrate.nx -- CMS IMPORT / EXPORT / MIGRATE capability (W-RE, the import-export-migrate class). Sovereign site portability with no lock-in: composes the real nx_cms_store serialization (@key\nvalue, already portable + auditable) with nx_sha256 content-integrity, plus a cross-format importer that maps a foreign WordPress-style export (post_title/post_content/post_status) into the native store. - cms_migrate_export : wrap a store in a self-describing, integrity-stamped bundle (@@NXEXPORT v1 ...) - cms_migrate_import : verify the bundle's sha256 then unwrap -> REFUSES a tampered/corrupt bundle (the exceed over all-in-one-migration, which silently corrupts on size/format) - cms_migrate_wp_import : migrate FROM WordPress (foreign schema -> native cms_store keys + values) module: nishi-core.cms.migrate depends: nishi-core.cms.store + nishi-core.crypto.sha256 + nishi-core.io.syscalls capability: CMS license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_cms_store.nx nx_sha256.nx nx_syscalls.nx nx_cms_migrate.nx nx_cms_migrate_exceed_gate.nx nx_cms_migrate_gate.nx

imports: nx_cms_store.nxnx_sha256.nxnx_syscalls.nx

imported by: nx_cms_migrate_exceed_gate.nxnx_cms_migrate_gate.nx

structs

none

consts

16const K_MAGIC_2048: i64 = 2048

functions

18func cmm_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: cmm_find
20func cmm_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var k: i64=0; while s[k]!=(0 as u8){dst[o]=s[k];o=o+1;k=k+1} return o }
22func cmm_catnum(dst: *u8, off: i64, v: i64) -> i64
called by 1: cms_migrate_export calls 1: sys_mmap
28func cmm_hex(dig: *u8, out: *u8) -> i64
41func cmm_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 2: cms_migrate_importmain calls 1: cmm_slen
55func cmm_pdec(buf: *u8, start: i64, n: i64) -> i64
called by 1: cms_migrate_import
69func cmm_keyeq(buf: *u8, off: i64, kl: i64, lit: *u8) -> i64
77func cms_migrate_export(store: *u8, n: i64, out: *u8, cap: i64) -> i64
96func cms_migrate_import(bundle: *u8, bn: i64, out_store: *u8, cap: i64) -> i64
127func cms_migrate_map_key(buf: *u8, off: i64, kl: i64) -> *u8
called by 1: cms_migrate_wp_import calls 1: cmm_keyeq
137func cms_migrate_wp_import(wp: *u8, wn: i64, out: *u8, cap: i64) -> i64