Skip to content

@onlyworlds/sdk 4.187.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 05:57
· 113 commits to main since this release

Added

  • @onlyworlds/sdk/convert, with convertKanka(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 its lines; kankaReportText gives the whole text). No file system, no network. world.json's producer line names this package and its version unless producer names another tool. The same folder as the Python package's door (python -m onlyworlds.kanka) byte for byte, given the same producer, 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 in test/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-DIR writes the folder and prints the report from the command line. A bad zip or an export with no campaign.json throws OwConvertError (not_a_zip, not_an_export); an unknown option is a TypeError before anything is read.

  • Codegen: codegen/html_entities.py writes src/convert/html-entities.generated.ts, the HTML character references as Python's html.unescape reads them, so the door reads an export's HTML as the Python door does; npm run codegen:check checks 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 the wire job (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 the description as the text an AI follows, the Charter's and each skill Object's, whole as the world holds it; a leading Charter whose description holds nothing gives that reader no house rules. The charter fixture gains four cases, each a newer marked Charter with an empty description beside an older one with text: the newer leads and its skill is empty. charterOf already answered all four so; no answer on an existing case moves.