Repository navigation
@onlyworlds/sdk 4.187.0
Added
-
@onlyworlds/sdk/convert, withconvertKanka(bytes, { source, producer }): a Kanka JSON export (the zip's bytes) as a world folder in memory, its files ({ path, data }) and a report (counts,total,modules,relations,folded,unplaced,unresolved,hidden,possiblyStarter,uploads,pictures,untagged,madeNames,notes, and itslines;kankaReportTextgives the whole text). No file system, no network.world.json's producer line names this package and its version unlessproducernames another tool. The same folder as the Python package's door (python -m onlyworlds.kanka) byte for byte, given the sameproducer, and the same report: both read the door's tables and wording from one data file,src/convert/kanka.json, the same bytes in both packages (each package's tests hold its sha256). Held to the Python door's output on the three real Kanka exports intest/fixtures/kanka/, every file and the report text by sha256. The reader sits on a shared core (element bodies, the hidden mark, kept keys, folding, Relation and Narrative link fields, made names,world.json, the folder's bytes) that a second tool's reader can use.scripts/convert-kanka.mjs EXPORT.zip OUT-DIRwrites the folder and prints the report from the command line. A bad zip or an export with nocampaign.jsonthrowsOwConvertError(not_a_zip,not_an_export); an unknown option is aTypeErrorbefore anything is read. -
Codegen:
codegen/html_entities.pywritessrc/convert/html-entities.generated.ts, the HTML character references as Python'shtml.unescapereads them, so the door reads an export's HTML as the Python door does;npm run codegen:checkchecks it. -
Tests: CI now checks the built package against onlyworlds.com's public API document (
/api/v2/openapi.json) on every pull request and push to main, as thewirejob (scripts/verify-wire.mjs): the routes, query parameters, headers and bodies the client sends, and the types it declares for the answers, are held to what the document declares, and two checks ask production a few reads without a key. Until now this check ran on a maintainer's machine before each release.
Changed
- The schema pin moves to
v0.34.1-dist.145(canonical 00.34.01 unchanged, no schema file moved; the generated files change only their provenance lines). The charter page's rule 4 now names thedescriptionas the text an AI follows, the Charter's and each skill Object's, whole as the world holds it; a leading Charter whosedescriptionholds nothing gives that reader no house rules. The charter fixture gains four cases, each a newer marked Charter with an emptydescriptionbeside an older one with text: the newer leads and itsskillis empty.charterOfalready answered all four so; no answer on an existing case moves.