rpg-engine 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/adventures/index.d.ts +3 -0
- package/dist/adventures/index.js +5 -0
- package/dist/adventures/manifest.d.ts +39 -0
- package/dist/adventures/manifest.js +89 -0
- package/dist/adventures/placement.d.ts +4 -0
- package/dist/adventures/placement.js +14 -0
- package/dist/adventures/source.d.ts +21 -0
- package/dist/adventures/source.js +108 -0
- package/dist/bell-listener.d.ts +9 -0
- package/dist/bell-listener.js +83 -0
- package/dist/campaign/create-campaign.d.ts +3 -2
- package/dist/campaign/create-campaign.js +5 -5
- package/dist/campaign/host-files.d.ts +23 -6
- package/dist/campaign/host-files.js +130 -40
- package/dist/campaign/index.d.ts +2 -2
- package/dist/campaign/index.js +2 -2
- package/dist/campaign/settings.d.ts +33 -2
- package/dist/campaign/settings.js +49 -12
- package/dist/cli.js +10 -1
- package/dist/command-line.js +20 -2
- package/dist/commands/advance.js +6 -2
- package/dist/commands/ask.d.ts +11 -4
- package/dist/commands/ask.js +249 -23
- package/dist/commands/change.d.ts +29 -0
- package/dist/commands/change.js +260 -41
- package/dist/commands/config.d.ts +6 -3
- package/dist/commands/config.js +179 -79
- package/dist/commands/effect.js +38 -9
- package/dist/commands/game-advance.d.ts +11 -2
- package/dist/commands/game-advance.js +22 -7
- package/dist/commands/game-adventures.d.ts +70 -0
- package/dist/commands/game-adventures.js +418 -0
- package/dist/commands/game-bonds.d.ts +9 -0
- package/dist/commands/game-bonds.js +84 -0
- package/dist/commands/game-catalog.d.ts +36 -0
- package/dist/commands/game-catalog.js +122 -0
- package/dist/commands/game-checks.d.ts +17 -0
- package/dist/commands/game-checks.js +128 -0
- package/dist/commands/game-damage.d.ts +18 -0
- package/dist/commands/game-damage.js +74 -0
- package/dist/commands/game-effects.d.ts +5 -0
- package/dist/commands/game-effects.js +2 -2
- package/dist/commands/game-events.js +8 -4
- package/dist/commands/game-experience.js +2 -2
- package/dist/commands/game-extensions.d.ts +8 -1
- package/dist/commands/game-extensions.js +8 -3
- package/dist/commands/game-grid-moves.d.ts +4 -1
- package/dist/commands/game-grid-moves.js +8 -2
- package/dist/commands/game-hit-dice.d.ts +39 -0
- package/dist/commands/game-hit-dice.js +120 -0
- package/dist/commands/game-import.d.ts +11 -0
- package/dist/commands/game-import.js +154 -0
- package/dist/commands/game-journey.d.ts +6 -2
- package/dist/commands/game-journey.js +17 -6
- package/dist/commands/game-knowledge.d.ts +56 -6
- package/dist/commands/game-knowledge.js +152 -23
- package/dist/commands/game-library.d.ts +112 -0
- package/dist/commands/game-library.js +388 -0
- package/dist/commands/game-limits.d.ts +7 -0
- package/dist/commands/game-limits.js +67 -0
- package/dist/commands/game-mode.js +3 -3
- package/dist/commands/game-moves.d.ts +14 -1
- package/dist/commands/game-moves.js +24 -9
- package/dist/commands/game-recipe-pace.d.ts +6 -0
- package/dist/commands/game-recipe-pace.js +25 -0
- package/dist/commands/game-recipes.js +10 -3
- package/dist/commands/game-reminders.d.ts +3 -3
- package/dist/commands/game-reminders.js +10 -5
- package/dist/commands/game-roads.d.ts +11 -4
- package/dist/commands/game-roads.js +89 -26
- package/dist/commands/game-saves.d.ts +12 -0
- package/dist/commands/game-saves.js +44 -5
- package/dist/commands/game-scene.js +3 -1
- package/dist/commands/game-stacks.d.ts +78 -0
- package/dist/commands/game-stacks.js +198 -0
- package/dist/commands/game-system-code.d.ts +25 -0
- package/dist/commands/game-system-code.js +165 -0
- package/dist/commands/game-thoughts.d.ts +25 -0
- package/dist/commands/game-thoughts.js +57 -0
- package/dist/commands/game-turn-uses.d.ts +33 -0
- package/dist/commands/game-turn-uses.js +137 -0
- package/dist/commands/game-upkeep.d.ts +20 -0
- package/dist/commands/game-upkeep.js +190 -0
- package/dist/commands/game-view-journal.d.ts +14 -1
- package/dist/commands/game-view-journal.js +5 -2
- package/dist/commands/game-view-map.d.ts +3 -0
- package/dist/commands/game-view-map.js +5 -1
- package/dist/commands/game-view-place.d.ts +22 -3
- package/dist/commands/game-view-place.js +61 -24
- package/dist/commands/game-view-world.d.ts +98 -0
- package/dist/commands/game-view-world.js +98 -0
- package/dist/commands/game-voices.d.ts +5 -0
- package/dist/commands/game-voices.js +13 -0
- package/dist/commands/game-widgets.d.ts +66 -0
- package/dist/commands/game-widgets.js +274 -0
- package/dist/commands/game-world.d.ts +8 -1
- package/dist/commands/game-world.js +23 -3
- package/dist/commands/image.js +2 -3
- package/dist/commands/import.d.ts +47 -0
- package/dist/commands/import.js +390 -0
- package/dist/commands/index.js +6 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/install.js +2 -1
- package/dist/commands/instructions.js +26 -1
- package/dist/commands/mode.js +3 -1
- package/dist/commands/move.d.ts +2 -0
- package/dist/commands/move.js +86 -12
- package/dist/commands/package.d.ts +57 -3
- package/dist/commands/package.js +304 -49
- package/dist/commands/parts.d.ts +3 -0
- package/dist/commands/parts.js +5 -0
- package/dist/commands/problems.js +6 -0
- package/dist/commands/rename.js +3 -0
- package/dist/commands/reveal.js +12 -7
- package/dist/commands/roll.d.ts +2 -0
- package/dist/commands/roll.js +23 -7
- package/dist/commands/route.js +4 -5
- package/dist/commands/rules.d.ts +3 -0
- package/dist/commands/rules.js +38 -6
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/save.js +2 -2
- package/dist/commands/scene.d.ts +10 -1
- package/dist/commands/scene.js +146 -29
- package/dist/commands/sheet.d.ts +47 -6
- package/dist/commands/sheet.js +179 -33
- package/dist/commands/show.d.ts +33 -0
- package/dist/commands/show.js +19 -2
- package/dist/commands/status.d.ts +9 -3
- package/dist/commands/status.js +59 -17
- package/dist/commands/thoughts.d.ts +11 -0
- package/dist/commands/thoughts.js +54 -0
- package/dist/commands/trade.d.ts +17 -0
- package/dist/commands/trade.js +273 -0
- package/dist/commands/travel.d.ts +2 -0
- package/dist/commands/travel.js +40 -14
- package/dist/commands/validate.js +2 -1
- package/dist/commands/view.d.ts +99 -2
- package/dist/commands/view.js +273 -57
- package/dist/commands/worked-out.d.ts +16 -0
- package/dist/commands/worked-out.js +108 -13
- package/dist/commands/write.d.ts +1 -0
- package/dist/commands/write.js +93 -21
- package/dist/confirm/confirm.d.ts +35 -0
- package/dist/confirm/confirm.js +94 -0
- package/dist/confirm/index.d.ts +1 -0
- package/dist/confirm/index.js +3 -0
- package/dist/core/archive-paths.d.ts +8 -0
- package/dist/core/archive-paths.js +39 -0
- package/dist/core/context.d.ts +127 -5
- package/dist/core/context.js +4 -3
- package/dist/core/download.d.ts +2 -0
- package/dist/core/download.js +31 -0
- package/dist/core/field-kind.d.ts +4 -3
- package/dist/core/field-kind.js +4 -3
- package/dist/core/files.d.ts +10 -0
- package/dist/core/files.js +58 -2
- package/dist/core/formula.d.ts +3 -1
- package/dist/core/formula.js +13 -2
- package/dist/core/progression-rule.d.ts +2 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.js +7 -0
- package/dist/dashboard/act-names.js +27 -0
- package/dist/dashboard/act-sheet.js +100 -0
- package/dist/dashboard/act-strip.js +49 -0
- package/dist/dashboard/acts.js +140 -0
- package/dist/dashboard/address.js +16 -12
- package/dist/dashboard/api.js +140 -10
- package/dist/dashboard/app.js +370 -41
- package/dist/dashboard/asked.js +297 -19
- package/dist/dashboard/calendar.js +56 -0
- package/dist/dashboard/card.js +13 -12
- package/dist/dashboard/coins.js +13 -0
- package/dist/dashboard/death-save.js +67 -0
- package/dist/dashboard/dice/pool.js +22 -0
- package/dist/dashboard/dice/roller.js +1 -1
- package/dist/dashboard/dice/stage.js +12 -4
- package/dist/dashboard/dice/tray.js +28 -15
- package/dist/dashboard/dying.js +46 -0
- package/dist/dashboard/extension-widgets.js +160 -0
- package/dist/dashboard/game-words.js +33 -4
- package/dist/dashboard/guide/ar.md +105 -100
- package/dist/dashboard/guide/cs.md +111 -106
- package/dist/dashboard/guide/da.md +95 -90
- package/dist/dashboard/guide/de.md +93 -88
- package/dist/dashboard/guide/el.md +110 -105
- package/dist/dashboard/guide/en.md +21 -16
- package/dist/dashboard/guide/es.md +79 -74
- package/dist/dashboard/guide/fi.md +99 -94
- package/dist/dashboard/guide/fr.md +83 -78
- package/dist/dashboard/guide/he.md +109 -104
- package/dist/dashboard/guide/hi.md +103 -98
- package/dist/dashboard/guide/hu.md +113 -108
- package/dist/dashboard/guide/is.md +102 -97
- package/dist/dashboard/guide/it.md +22 -17
- package/dist/dashboard/guide/ja.md +108 -103
- package/dist/dashboard/guide/ko.md +113 -108
- package/dist/dashboard/guide/nb.md +95 -90
- package/dist/dashboard/guide/nl.md +89 -84
- package/dist/dashboard/guide/pl.md +104 -99
- package/dist/dashboard/guide/pt.md +82 -77
- package/dist/dashboard/guide/ro.md +113 -108
- package/dist/dashboard/guide/ru.md +109 -104
- package/dist/dashboard/guide/sv.md +96 -91
- package/dist/dashboard/guide/tr.md +102 -97
- package/dist/dashboard/guide/uk.md +113 -108
- package/dist/dashboard/guide/zh.md +110 -105
- package/dist/dashboard/guide-markdown.js +4 -0
- package/dist/dashboard/help.js +4 -5
- package/dist/dashboard/i18n/ar.json +361 -16
- package/dist/dashboard/i18n/cs.json +361 -16
- package/dist/dashboard/i18n/da.json +361 -16
- package/dist/dashboard/i18n/de.json +361 -16
- package/dist/dashboard/i18n/el.json +361 -16
- package/dist/dashboard/i18n/es.json +361 -16
- package/dist/dashboard/i18n/fi.json +361 -16
- package/dist/dashboard/i18n/fr.json +361 -16
- package/dist/dashboard/i18n/he.json +361 -16
- package/dist/dashboard/i18n/hi.json +361 -16
- package/dist/dashboard/i18n/hu.json +361 -16
- package/dist/dashboard/i18n/is.json +361 -16
- package/dist/dashboard/i18n/it.json +363 -18
- package/dist/dashboard/i18n/ja.json +361 -16
- package/dist/dashboard/i18n/ko.json +361 -16
- package/dist/dashboard/i18n/nb.json +361 -16
- package/dist/dashboard/i18n/nl.json +361 -16
- package/dist/dashboard/i18n/pl.json +361 -16
- package/dist/dashboard/i18n/pt.json +361 -16
- package/dist/dashboard/i18n/ro.json +361 -16
- package/dist/dashboard/i18n/ru.json +361 -16
- package/dist/dashboard/i18n/sv.json +361 -16
- package/dist/dashboard/i18n/tr.json +361 -16
- package/dist/dashboard/i18n/uk.json +361 -16
- package/dist/dashboard/i18n/zh.json +361 -16
- package/dist/dashboard/icons.js +38 -4
- package/dist/dashboard/journal.js +203 -49
- package/dist/dashboard/labels.js +42 -4
- package/dist/dashboard/languages.js +2 -2
- package/dist/dashboard/layout.js +35 -0
- package/dist/dashboard/lore.js +44 -0
- package/dist/dashboard/markdown.js +136 -30
- package/dist/dashboard/master.js +2 -2
- package/dist/dashboard/notes.js +5 -5
- package/dist/dashboard/notices.js +24 -4
- package/dist/dashboard/packages.js +678 -0
- package/dist/dashboard/pages.js +0 -8
- package/dist/dashboard/party.js +17 -4
- package/dist/dashboard/place-map-view.js +47 -9
- package/dist/dashboard/rolls.js +35 -93
- package/dist/dashboard/save-outcome.js +42 -0
- package/dist/dashboard/saves.js +14 -11
- package/dist/dashboard/scene.js +114 -20
- package/dist/dashboard/settings.js +70 -12
- package/dist/dashboard/setup.js +4 -4
- package/dist/dashboard/sheet.js +123 -19
- package/dist/dashboard/spend.js +115 -0
- package/dist/dashboard/status.js +22 -10
- package/dist/dashboard/story.js +6 -6
- package/dist/dashboard/style.css +8047 -3468
- package/dist/dashboard/table.js +145 -0
- package/dist/dashboard/tabs.js +34 -0
- package/dist/dashboard/text.js +19 -1
- package/dist/dashboard/top.js +91 -31
- package/dist/dashboard/turns.js +150 -0
- package/dist/dashboard/widgets.js +21 -14
- package/dist/dashboard/world-calendar.js +101 -0
- package/dist/dashboard/world-lore.js +231 -0
- package/dist/dashboard/world.js +87 -29
- package/dist/dashboard-server.d.ts +10 -1
- package/dist/dashboard-server.js +738 -26
- package/dist/documents/index.d.ts +2 -0
- package/dist/documents/index.js +5 -0
- package/dist/documents/markup.d.ts +10 -0
- package/dist/documents/markup.js +124 -0
- package/dist/documents/ocr.d.ts +9 -0
- package/dist/documents/ocr.js +101 -0
- package/dist/documents/png.d.ts +9 -0
- package/dist/documents/png.js +75 -0
- package/dist/documents/read.d.ts +54 -0
- package/dist/documents/read.js +375 -0
- package/dist/extensions/api.d.ts +91 -9
- package/dist/extensions/extension.d.ts +28 -2
- package/dist/extensions/extension.js +49 -11
- package/dist/extensions/index.d.ts +5 -3
- package/dist/extensions/index.js +4 -2
- package/dist/extensions/packages.d.ts +13 -4
- package/dist/extensions/packages.js +114 -16
- package/dist/extensions/tarball.d.ts +6 -0
- package/dist/extensions/tarball.js +87 -0
- package/dist/extensions/words.d.ts +13 -0
- package/dist/extensions/words.js +42 -0
- package/dist/importer/index.d.ts +1 -0
- package/dist/importer/index.js +3 -0
- package/dist/importer/work.d.ts +132 -0
- package/dist/importer/work.js +306 -0
- package/dist/index.d.ts +3 -1
- package/dist/instructions/index.d.ts +7 -0
- package/dist/instructions/index.js +10 -0
- package/dist/languages/index.d.ts +1 -0
- package/dist/languages/index.js +3 -0
- package/dist/languages/language-pack.d.ts +32 -0
- package/dist/languages/language-pack.js +86 -0
- package/dist/library/books.d.ts +76 -0
- package/dist/library/books.js +378 -0
- package/dist/library/folders.d.ts +11 -0
- package/dist/library/folders.js +70 -0
- package/dist/library/index.d.ts +3 -0
- package/dist/library/index.js +5 -0
- package/dist/library/language.d.ts +2 -0
- package/dist/library/language.js +40 -0
- package/dist/library-reader.d.ts +7 -0
- package/dist/library-reader.js +36 -0
- package/dist/mcp-server.js +90 -7
- package/dist/money/index.d.ts +1 -1
- package/dist/money/index.js +1 -1
- package/dist/money/money.d.ts +6 -0
- package/dist/money/money.js +11 -0
- package/dist/page-words.js +4 -1
- package/dist/pages/check.d.ts +5 -0
- package/dist/pages/check.js +111 -5
- package/dist/pages/containers.d.ts +19 -1
- package/dist/pages/containers.js +50 -7
- package/dist/pages/index.d.ts +8 -5
- package/dist/pages/index.js +8 -5
- package/dist/pages/load.d.ts +11 -0
- package/dist/pages/load.js +69 -0
- package/dist/pages/markdown.d.ts +7 -0
- package/dist/pages/markdown.js +27 -3
- package/dist/pages/page-file.d.ts +2 -0
- package/dist/pages/page-file.js +28 -5
- package/dist/pages/rename-page.js +3 -2
- package/dist/pages/stack-entry.d.ts +47 -0
- package/dist/pages/stack-entry.js +83 -0
- package/dist/pages/stack-writes.d.ts +22 -0
- package/dist/pages/stack-writes.js +128 -0
- package/dist/pages/stacks.d.ts +52 -0
- package/dist/pages/stacks.js +168 -0
- package/dist/pages/standard-fields.js +1 -1
- package/dist/pages/system-pages.d.ts +5 -2
- package/dist/pages/system-pages.js +11 -5
- package/dist/pages/world.d.ts +29 -3
- package/dist/pages/world.js +66 -12
- package/dist/pages/write-page.js +15 -6
- package/dist/pictures/chosen.d.ts +5 -1
- package/dist/pictures/chosen.js +12 -3
- package/dist/pictures/claude.d.ts +3 -1
- package/dist/pictures/claude.js +38 -0
- package/dist/pictures/codex.d.ts +3 -1
- package/dist/pictures/codex.js +32 -0
- package/dist/pictures/helpers.d.ts +10 -0
- package/dist/pictures/helpers.js +53 -6
- package/dist/pictures/index.d.ts +5 -4
- package/dist/pictures/index.js +5 -4
- package/dist/pictures/stop.d.ts +2 -0
- package/dist/pictures/stop.js +18 -0
- package/dist/player-acts.d.ts +27 -0
- package/dist/player-acts.js +56 -0
- package/dist/rules/index.d.ts +1 -0
- package/dist/rules/index.js +3 -1
- package/dist/rules/page-search.d.ts +36 -0
- package/dist/rules/page-search.js +216 -0
- package/dist/rules/search.d.ts +7 -0
- package/dist/rules/search.js +2 -2
- package/dist/scene/scene.d.ts +2 -0
- package/dist/scene/scene.js +1 -0
- package/dist/systems/game-system.d.ts +161 -4
- package/dist/systems/game-system.js +237 -34
- package/dist/systems/index.d.ts +3 -1
- package/dist/systems/index.js +3 -1
- package/dist/systems/system-code.d.ts +97 -0
- package/dist/systems/system-code.js +62 -0
- package/dist/systems/system-folders.d.ts +11 -0
- package/dist/systems/system-folders.js +11 -0
- package/dist/systems/words.d.ts +2 -0
- package/dist/systems/words.js +3 -3
- package/instructions/author.md +1 -1
- package/instructions/buttons-physical-dice.md +1 -1
- package/instructions/buttons.md +1 -1
- package/instructions/character.md +15 -0
- package/instructions/combat.md +3 -1
- package/instructions/core.md +4 -4
- package/instructions/dashboard.md +4 -4
- package/instructions/import.md +14 -0
- package/instructions/mentor-hints.md +1 -1
- package/instructions/party.md +11 -0
- package/instructions/play.md +5 -5
- package/instructions/session-zero.md +1 -1
- package/instructions/setup.md +1 -1
- package/instructions/voices-always.md +1 -0
- package/instructions/voices-important.md +1 -0
- package/instructions/voices.md +14 -0
- package/package.json +6 -2
- package/systems/5e/LICENSE.md +1 -1
- package/systems/5e/dist/dying.js +193 -0
- package/systems/5e/dist/index.js +3 -0
- package/systems/5e/images/abacus.svg +1 -0
- package/systems/5e/images/acid-tube.svg +1 -0
- package/systems/5e/images/animal-hide.svg +1 -0
- package/systems/5e/images/anvil.svg +1 -0
- package/systems/5e/images/arrow-cluster.svg +1 -0
- package/systems/5e/images/backpack.svg +1 -0
- package/systems/5e/images/bagpipes.svg +1 -0
- package/systems/5e/images/barbed-spear.svg +1 -0
- package/systems/5e/images/barrel.svg +1 -0
- package/systems/5e/images/basket.svg +1 -0
- package/systems/5e/images/battle-axe.svg +1 -0
- package/systems/5e/images/beer-horn.svg +1 -0
- package/systems/5e/images/belt-buckles.svg +1 -0
- package/systems/5e/images/bird-scepter.svg +1 -0
- package/systems/5e/images/blanket.svg +1 -0
- package/systems/5e/images/book-cover.svg +1 -0
- package/systems/5e/images/boots.svg +1 -0
- package/systems/5e/images/bottle-vapors.svg +1 -0
- package/systems/5e/images/bow-arrow.svg +1 -0
- package/systems/5e/images/bowl-spiral.svg +1 -0
- package/systems/5e/images/bracer.svg +1 -0
- package/systems/5e/images/broadsword.svg +1 -0
- package/systems/5e/images/broom.svg +1 -0
- package/systems/5e/images/bullets.svg +1 -0
- package/systems/5e/images/caltrops.svg +1 -0
- package/systems/5e/images/camp-cooking-pot.svg +1 -0
- package/systems/5e/images/campfire.svg +1 -0
- package/systems/5e/images/camping-tent.svg +1 -0
- package/systems/5e/images/candle-flame.svg +1 -0
- package/systems/5e/images/candle-light.svg +1 -0
- package/systems/5e/images/canoe.svg +1 -0
- package/systems/5e/images/cape.svg +1 -0
- package/systems/5e/images/caravel.svg +1 -0
- package/systems/5e/images/card-pick.svg +1 -0
- package/systems/5e/images/chain-mail.svg +1 -0
- package/systems/5e/images/chained-arrow-heads.svg +1 -0
- package/systems/5e/images/chariot.svg +1 -0
- package/systems/5e/images/chest.svg +1 -0
- package/systems/5e/images/chisel.svg +1 -0
- package/systems/5e/images/claw-hammer.svg +1 -0
- package/systems/5e/images/colombian-statue.svg +1 -0
- package/systems/5e/images/cooking-pot.svg +1 -0
- package/systems/5e/images/crescent-staff.svg +1 -0
- package/systems/5e/images/crossbow.svg +1 -0
- package/systems/5e/images/crossed-chains.svg +1 -0
- package/systems/5e/images/crowbar.svg +1 -0
- package/systems/5e/images/crystal-ball.svg +1 -0
- package/systems/5e/images/crystal-cluster.svg +1 -0
- package/systems/5e/images/crystal-eye.svg +1 -0
- package/systems/5e/images/cubes.svg +1 -0
- package/systems/5e/images/dart.svg +1 -0
- package/systems/5e/images/dice-six-faces-five.svg +1 -0
- package/systems/5e/images/dragon-orb.svg +1 -0
- package/systems/5e/images/drakkar.svg +1 -0
- package/systems/5e/images/drum.svg +1 -0
- package/systems/5e/images/empty-wood-bucket-handle.svg +1 -0
- package/systems/5e/images/eye-shield.svg +1 -0
- package/systems/5e/images/fairy-wand.svg +1 -0
- package/systems/5e/images/feather.svg +1 -0
- package/systems/5e/images/feathered-wing.svg +1 -0
- package/systems/5e/images/fire-bottle.svg +1 -0
- package/systems/5e/images/fire-gem.svg +1 -0
- package/systems/5e/images/first-aid-kit.svg +1 -0
- package/systems/5e/images/fishing-hook.svg +1 -0
- package/systems/5e/images/fishing-net.svg +1 -0
- package/systems/5e/images/fishing-pole.svg +1 -0
- package/systems/5e/images/fist.svg +1 -0
- package/systems/5e/images/flail.svg +1 -0
- package/systems/5e/images/flanged-mace.svg +1 -0
- package/systems/5e/images/flat-hammer.svg +1 -0
- package/systems/5e/images/flint-spark.svg +1 -0
- package/systems/5e/images/floating-crystal.svg +1 -0
- package/systems/5e/images/flute.svg +1 -0
- package/systems/5e/images/galleon.svg +1 -0
- package/systems/5e/images/gauntlet.svg +1 -0
- package/systems/5e/images/gem-necklace.svg +1 -0
- package/systems/5e/images/gem-pendant.svg +1 -0
- package/systems/5e/images/gems.svg +1 -0
- package/systems/5e/images/gladius.svg +1 -0
- package/systems/5e/images/glaive.svg +1 -0
- package/systems/5e/images/glass-ball.svg +1 -0
- package/systems/5e/images/gloves.svg +1 -0
- package/systems/5e/images/gold-scarab.svg +1 -0
- package/systems/5e/images/grain-bundle.svg +1 -0
- package/systems/5e/images/halberd.svg +1 -0
- package/systems/5e/images/hand-saw.svg +1 -0
- package/systems/5e/images/handheld-fan.svg +1 -0
- package/systems/5e/images/harp.svg +1 -0
- package/systems/5e/images/hatchet.svg +1 -0
- package/systems/5e/images/headband-knot.svg +1 -0
- package/systems/5e/images/health-potion.svg +1 -0
- package/systems/5e/images/heart-bottle.svg +1 -0
- package/systems/5e/images/herbs-bundle.svg +1 -0
- package/systems/5e/images/hole-ladder.svg +1 -0
- package/systems/5e/images/holy-symbol.svg +1 -0
- package/systems/5e/images/holy-water.svg +1 -0
- package/systems/5e/images/honey-jar.svg +1 -0
- package/systems/5e/images/hood.svg +1 -0
- package/systems/5e/images/horseshoe.svg +1 -0
- package/systems/5e/images/hourglass.svg +1 -0
- package/systems/5e/images/hunting-horn.svg +1 -0
- package/systems/5e/images/jester-hat.svg +1 -0
- package/systems/5e/images/jug.svg +1 -0
- package/systems/5e/images/katana.svg +1 -0
- package/systems/5e/images/key-lock.svg +1 -0
- package/systems/5e/images/kitchen-scale.svg +1 -0
- package/systems/5e/images/knapsack.svg +1 -0
- package/systems/5e/images/ladder.svg +1 -0
- package/systems/5e/images/lantern.svg +1 -0
- package/systems/5e/images/leather-armor.svg +1 -0
- package/systems/5e/images/leather-boot.svg +1 -0
- package/systems/5e/images/leather-vest.svg +1 -0
- package/systems/5e/images/light-backpack.svg +1 -0
- package/systems/5e/images/light-helm.svg +1 -0
- package/systems/5e/images/locked-box.svg +1 -0
- package/systems/5e/images/locked-fortress.svg +1 -0
- package/systems/5e/images/lockpicks.svg +1 -0
- package/systems/5e/images/lunar-wand.svg +1 -0
- package/systems/5e/images/lyre.svg +1 -0
- package/systems/5e/images/magic-lamp.svg +1 -0
- package/systems/5e/images/magnifying-glass.svg +1 -0
- package/systems/5e/images/mail-shirt.svg +1 -0
- package/systems/5e/images/manacles.svg +1 -0
- package/systems/5e/images/marbles.svg +1 -0
- package/systems/5e/images/meat.svg +1 -0
- package/systems/5e/images/medal.svg +1 -0
- package/systems/5e/images/mirror-mirror.svg +1 -0
- package/systems/5e/images/mountain-climbing.svg +1 -0
- package/systems/5e/images/oil-can.svg +1 -0
- package/systems/5e/images/old-lantern.svg +1 -0
- package/systems/5e/images/old-wagon.svg +1 -0
- package/systems/5e/images/orb-wand.svg +1 -0
- package/systems/5e/images/oyster-pearl.svg +1 -0
- package/systems/5e/images/paint-brush.svg +1 -0
- package/systems/5e/images/painted-pottery.svg +1 -0
- package/systems/5e/images/palette.svg +1 -0
- package/systems/5e/images/paper.svg +1 -0
- package/systems/5e/images/pencil.svg +1 -0
- package/systems/5e/images/perfume-bottle.svg +1 -0
- package/systems/5e/images/pilgrim-hat.svg +1 -0
- package/systems/5e/images/pipes.svg +1 -0
- package/systems/5e/images/plain-arrow.svg +1 -0
- package/systems/5e/images/plain-dagger.svg +1 -0
- package/systems/5e/images/poison-bottle.svg +1 -0
- package/systems/5e/images/powder-bag.svg +1 -0
- package/systems/5e/images/prayer-beads.svg +1 -0
- package/systems/5e/images/pulley-hook.svg +1 -0
- package/systems/5e/images/quill-ink.svg +1 -0
- package/systems/5e/images/quill.svg +1 -0
- package/systems/5e/images/quiver.svg +1 -0
- package/systems/5e/images/red-carpet.svg +1 -0
- package/systems/5e/images/ring.svg +1 -0
- package/systems/5e/images/ringing-bell.svg +1 -0
- package/systems/5e/images/robe.svg +1 -0
- package/systems/5e/images/rope-coil.svg +1 -0
- package/systems/5e/images/round-bottom-flask.svg +1 -0
- package/systems/5e/images/round-potion.svg +1 -0
- package/systems/5e/images/rune-stone.svg +1 -0
- package/systems/5e/images/saddle.svg +1 -0
- package/systems/5e/images/scale-mail.svg +1 -0
- package/systems/5e/images/scroll-unfurled.svg +1 -0
- package/systems/5e/images/secret-book.svg +1 -0
- package/systems/5e/images/sewing-needle.svg +1 -0
- package/systems/5e/images/shield.svg +1 -0
- package/systems/5e/images/shirt-button.svg +1 -0
- package/systems/5e/images/sickle.svg +1 -0
- package/systems/5e/images/siege-ram.svg +1 -0
- package/systems/5e/images/skull-staff.svg +1 -0
- package/systems/5e/images/sleeping-bag.svg +1 -0
- package/systems/5e/images/sling.svg +1 -0
- package/systems/5e/images/slippers.svg +1 -0
- package/systems/5e/images/small-fishing-sailboat.svg +1 -0
- package/systems/5e/images/smoking-orb.svg +1 -0
- package/systems/5e/images/soap.svg +1 -0
- package/systems/5e/images/spade.svg +1 -0
- package/systems/5e/images/sparkling-sabre.svg +1 -0
- package/systems/5e/images/spell-book.svg +1 -0
- package/systems/5e/images/spiked-armor.svg +1 -0
- package/systems/5e/images/spiked-mace.svg +1 -0
- package/systems/5e/images/spikes.svg +1 -0
- package/systems/5e/images/spinning-wheel.svg +1 -0
- package/systems/5e/images/spyglass.svg +1 -0
- package/systems/5e/images/steampunk-goggles.svg +1 -0
- package/systems/5e/images/stone-block.svg +1 -0
- package/systems/5e/images/stone-pile.svg +1 -0
- package/systems/5e/images/stone-sphere.svg +1 -0
- package/systems/5e/images/straight-pipe.svg +1 -0
- package/systems/5e/images/swap-bag.svg +1 -0
- package/systems/5e/images/thor-hammer.svg +1 -0
- package/systems/5e/images/thrown-spear.svg +1 -0
- package/systems/5e/images/tiara.svg +1 -0
- package/systems/5e/images/tied-scroll.svg +1 -0
- package/systems/5e/images/tinker.svg +1 -0
- package/systems/5e/images/torch.svg +1 -0
- package/systems/5e/images/totem.svg +1 -0
- package/systems/5e/images/trap-mask.svg +1 -0
- package/systems/5e/images/treasure-map.svg +1 -0
- package/systems/5e/images/tribal-pendant.svg +1 -0
- package/systems/5e/images/trident.svg +1 -0
- package/systems/5e/images/two-handed-sword.svg +1 -0
- package/systems/5e/images/vial.svg +1 -0
- package/systems/5e/images/violin.svg +1 -0
- package/systems/5e/images/war-axe.svg +1 -0
- package/systems/5e/images/war-pick.svg +1 -0
- package/systems/5e/images/warhammer.svg +1 -0
- package/systems/5e/images/water-bottle.svg +1 -0
- package/systems/5e/images/waterskin.svg +1 -0
- package/systems/5e/images/wavy-chains.svg +1 -0
- package/systems/5e/images/wax-seal.svg +1 -0
- package/systems/5e/images/wheelbarrow.svg +1 -0
- package/systems/5e/images/whip.svg +1 -0
- package/systems/5e/images/whistle.svg +1 -0
- package/systems/5e/images/wing-cloak.svg +1 -0
- package/systems/5e/images/winged-scepter.svg +1 -0
- package/systems/5e/images/wizard-staff.svg +1 -0
- package/systems/5e/images/wolf-trap.svg +1 -0
- package/systems/5e/images/wood-canoe.svg +1 -0
- package/systems/5e/images/wood-club.svg +1 -0
- package/systems/5e/instructions/import.md +1 -0
- package/systems/5e/instructions/play.md +5 -0
- package/systems/5e/instructions/session-zero.md +1 -1
- package/systems/5e/package.json +11 -0
- package/systems/5e/system.yaml +231 -31
- package/systems/5e/words/ar.yaml +74 -0
- package/systems/5e/words/cs.yaml +74 -0
- package/systems/5e/words/da.yaml +74 -0
- package/systems/5e/words/de.yaml +74 -0
- package/systems/5e/words/el.yaml +74 -0
- package/systems/5e/words/en.yaml +20 -0
- package/systems/5e/words/es.yaml +74 -0
- package/systems/5e/words/fi.yaml +74 -0
- package/systems/5e/words/fr.yaml +74 -0
- package/systems/5e/words/he.yaml +74 -0
- package/systems/5e/words/hi.yaml +74 -0
- package/systems/5e/words/hu.yaml +74 -0
- package/systems/5e/words/is.yaml +74 -0
- package/systems/5e/words/it.yaml +84 -1
- package/systems/5e/words/ja.yaml +74 -0
- package/systems/5e/words/ko.yaml +74 -0
- package/systems/5e/words/nb.yaml +74 -0
- package/systems/5e/words/nl.yaml +74 -0
- package/systems/5e/words/pl.yaml +74 -0
- package/systems/5e/words/pt.yaml +74 -0
- package/systems/5e/words/ro.yaml +74 -0
- package/systems/5e/words/ru.yaml +74 -0
- package/systems/5e/words/sv.yaml +74 -0
- package/systems/5e/words/tr.yaml +74 -0
- package/systems/5e/words/uk.yaml +74 -0
- package/systems/5e/words/zh.yaml +74 -0
- package/systems/5e/world/creatures/Aboleth.md +1 -0
- package/systems/5e/world/creatures/Adult Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult White Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient White Dragon.md +2 -0
- package/systems/5e/world/creatures/Androsphinx.md +1 -0
- package/systems/5e/world/creatures/Dwarf.md +1 -0
- package/systems/5e/world/creatures/Gynosphinx.md +1 -0
- package/systems/5e/world/creatures/Kraken.md +1 -0
- package/systems/5e/world/creatures/Lich.md +2 -0
- package/systems/5e/world/creatures/Mummy Lord.md +1 -0
- package/systems/5e/world/creatures/Solar.md +1 -0
- package/systems/5e/world/creatures/Tarrasque.md +2 -0
- package/systems/5e/world/creatures/Unicorn.md +1 -0
- package/systems/5e/world/creatures/Vampire.md +2 -0
- package/systems/5e/world/items/Abacus.md +1 -0
- package/systems/5e/world/items/Acid.md +1 -0
- package/systems/5e/world/items/Adamantine Armor.md +1 -0
- package/systems/5e/world/items/Alchemist's Fire.md +1 -0
- package/systems/5e/world/items/Alchemist's Supplies.md +1 -0
- package/systems/5e/world/items/Ammunition, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Amulet of Health.md +2 -0
- package/systems/5e/world/items/Amulet of Proof against Detection and Location.md +1 -0
- package/systems/5e/world/items/Amulet of the Planes.md +1 -0
- package/systems/5e/world/items/Amulet.md +1 -0
- package/systems/5e/world/items/Animated Shield.md +1 -0
- package/systems/5e/world/items/Antitoxin.md +1 -0
- package/systems/5e/world/items/Apparatus of the Crab.md +1 -0
- package/systems/5e/world/items/Armor of Invulnerability.md +2 -0
- package/systems/5e/world/items/Armor of Resistance.md +1 -0
- package/systems/5e/world/items/Armor of Vulnerability.md +1 -0
- package/systems/5e/world/items/Armor, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Arrow of Slaying.md +1 -0
- package/systems/5e/world/items/Arrow-Catching Shield.md +1 -0
- package/systems/5e/world/items/Arrows.md +2 -0
- package/systems/5e/world/items/Backpack.md +1 -0
- package/systems/5e/world/items/Bag of Beans.md +1 -0
- package/systems/5e/world/items/Bag of Devouring.md +1 -0
- package/systems/5e/world/items/Bag of Holding.md +3 -0
- package/systems/5e/world/items/Bag of Tricks.md +1 -0
- package/systems/5e/world/items/Bagpipes.md +1 -0
- package/systems/5e/world/items/Ball Bearings.md +1 -0
- package/systems/5e/world/items/Barding.md +1 -0
- package/systems/5e/world/items/Barrel.md +1 -0
- package/systems/5e/world/items/Basic Poison.md +1 -0
- package/systems/5e/world/items/Basket.md +1 -0
- package/systems/5e/world/items/Battleaxe.md +1 -0
- package/systems/5e/world/items/Bead of Force.md +1 -0
- package/systems/5e/world/items/Bedroll.md +1 -0
- package/systems/5e/world/items/Bell.md +1 -0
- package/systems/5e/world/items/Belt of Dwarvenkind.md +1 -0
- package/systems/5e/world/items/Belt of Giant Strength.md +1 -0
- package/systems/5e/world/items/Berserker Axe.md +1 -0
- package/systems/5e/world/items/Bit and Bridle.md +1 -0
- package/systems/5e/world/items/Blanket.md +1 -0
- package/systems/5e/world/items/Block and Tackle.md +1 -0
- package/systems/5e/world/items/Blowgun Needles.md +2 -0
- package/systems/5e/world/items/Blowgun.md +1 -0
- package/systems/5e/world/items/Book.md +1 -0
- package/systems/5e/world/items/Boots of Elvenkind.md +1 -0
- package/systems/5e/world/items/Boots of Levitation.md +1 -0
- package/systems/5e/world/items/Boots of Speed.md +1 -0
- package/systems/5e/world/items/Boots of Striding and Springing.md +1 -0
- package/systems/5e/world/items/Boots of the Winterlands.md +2 -0
- package/systems/5e/world/items/Bowl of Commanding Water Elementals.md +1 -0
- package/systems/5e/world/items/Bracers of Archery.md +1 -0
- package/systems/5e/world/items/Bracers of Defense.md +1 -0
- package/systems/5e/world/items/Brazier of Commanding Fire Elementals.md +1 -0
- package/systems/5e/world/items/Breastplate.md +1 -0
- package/systems/5e/world/items/Brewer's Supplies.md +1 -0
- package/systems/5e/world/items/Brooch of Shielding.md +2 -0
- package/systems/5e/world/items/Broom of Flying.md +1 -0
- package/systems/5e/world/items/Bucket.md +1 -0
- package/systems/5e/world/items/Bullseye Lantern.md +1 -0
- package/systems/5e/world/items/Burglar's Pack.md +3 -0
- package/systems/5e/world/items/Calligrapher's Supplies.md +1 -0
- package/systems/5e/world/items/Caltrops.md +1 -0
- package/systems/5e/world/items/Candle of Invocation.md +1 -0
- package/systems/5e/world/items/Candle.md +1 -0
- package/systems/5e/world/items/Cape of the Mountebank.md +1 -0
- package/systems/5e/world/items/Carpenter's Tools.md +1 -0
- package/systems/5e/world/items/Carpet of Flying.md +1 -0
- package/systems/5e/world/items/Carriage.md +1 -0
- package/systems/5e/world/items/Cart.md +1 -0
- package/systems/5e/world/items/Cartographer's Tools.md +1 -0
- package/systems/5e/world/items/Censer of Controlling Air Elementals.md +1 -0
- package/systems/5e/world/items/Chain Mail.md +2 -0
- package/systems/5e/world/items/Chain Shirt.md +1 -0
- package/systems/5e/world/items/Chain.md +1 -0
- package/systems/5e/world/items/Chalk.md +1 -0
- package/systems/5e/world/items/Chariot.md +1 -0
- package/systems/5e/world/items/Chest.md +1 -0
- package/systems/5e/world/items/Chime of Opening.md +1 -0
- package/systems/5e/world/items/Circlet of Blasting.md +1 -0
- package/systems/5e/world/items/Climber's Kit.md +1 -0
- package/systems/5e/world/items/Cloak of Arachnida.md +2 -0
- package/systems/5e/world/items/Cloak of Displacement.md +1 -0
- package/systems/5e/world/items/Cloak of Elvenkind.md +1 -0
- package/systems/5e/world/items/Cloak of Protection.md +3 -0
- package/systems/5e/world/items/Cloak of the Bat.md +1 -0
- package/systems/5e/world/items/Cloak of the Manta Ray.md +1 -0
- package/systems/5e/world/items/Club.md +1 -0
- package/systems/5e/world/items/Cobbler's Tools.md +1 -0
- package/systems/5e/world/items/Common Clothes.md +1 -0
- package/systems/5e/world/items/Component Pouch.md +1 -0
- package/systems/5e/world/items/Cook's Utensils.md +1 -0
- package/systems/5e/world/items/Costume Clothes.md +1 -0
- package/systems/5e/world/items/Crossbow Bolt Case.md +1 -0
- package/systems/5e/world/items/Crossbow Bolts.md +2 -0
- package/systems/5e/world/items/Crowbar.md +1 -0
- package/systems/5e/world/items/Crystal Ball.md +1 -0
- package/systems/5e/world/items/Crystal.md +1 -0
- package/systems/5e/world/items/Cube of Force.md +2 -0
- package/systems/5e/world/items/Cubic Gate.md +2 -0
- package/systems/5e/world/items/Dagger of Venom.md +1 -0
- package/systems/5e/world/items/Dagger.md +1 -0
- package/systems/5e/world/items/Dancing Sword.md +1 -0
- package/systems/5e/world/items/Dart.md +1 -0
- package/systems/5e/world/items/Decanter of Endless Water.md +1 -0
- package/systems/5e/world/items/Deck of Illusions.md +1 -0
- package/systems/5e/world/items/Deck of Many Things.md +1 -0
- package/systems/5e/world/items/Defender.md +1 -0
- package/systems/5e/world/items/Demon Armor.md +1 -0
- package/systems/5e/world/items/Dice Set.md +1 -0
- package/systems/5e/world/items/Dimensional Shackles.md +1 -0
- package/systems/5e/world/items/Diplomat's Pack.md +3 -0
- package/systems/5e/world/items/Disguise Kit.md +1 -0
- package/systems/5e/world/items/Dragon Scale Mail.md +1 -0
- package/systems/5e/world/items/Dragon Slayer.md +1 -0
- package/systems/5e/world/items/Drum.md +1 -0
- package/systems/5e/world/items/Dulcimer.md +1 -0
- package/systems/5e/world/items/Dungeoneer's Pack.md +3 -0
- package/systems/5e/world/items/Dust of Disappearance.md +1 -0
- package/systems/5e/world/items/Dust of Dryness.md +1 -0
- package/systems/5e/world/items/Dust of Sneezing and Choking.md +1 -0
- package/systems/5e/world/items/Dwarven Plate.md +1 -0
- package/systems/5e/world/items/Dwarven Thrower.md +1 -0
- package/systems/5e/world/items/Efficient Quiver.md +1 -0
- package/systems/5e/world/items/Efreeti Bottle.md +1 -0
- package/systems/5e/world/items/Elemental Gem.md +1 -0
- package/systems/5e/world/items/Elven Chain.md +1 -0
- package/systems/5e/world/items/Emblem.md +1 -0
- package/systems/5e/world/items/Entertainer's Pack.md +3 -0
- package/systems/5e/world/items/Eversmoking Bottle.md +1 -0
- package/systems/5e/world/items/Exotic Saddle.md +1 -0
- package/systems/5e/world/items/Explorer's Pack.md +3 -0
- package/systems/5e/world/items/Eyes of Charming.md +1 -0
- package/systems/5e/world/items/Eyes of Minute Seeing.md +1 -0
- package/systems/5e/world/items/Eyes of the Eagle.md +1 -0
- package/systems/5e/world/items/Feather Token.md +1 -0
- package/systems/5e/world/items/Feed.md +1 -0
- package/systems/5e/world/items/Figurine of Wondrous Power.md +1 -0
- package/systems/5e/world/items/Fine Clothes.md +1 -0
- package/systems/5e/world/items/Fishing Tackle.md +1 -0
- package/systems/5e/world/items/Flail.md +1 -0
- package/systems/5e/world/items/Flame Tongue.md +1 -0
- package/systems/5e/world/items/Flask or Tankard.md +1 -0
- package/systems/5e/world/items/Flute.md +1 -0
- package/systems/5e/world/items/Folding Boat.md +1 -0
- package/systems/5e/world/items/Forgery Kit.md +1 -0
- package/systems/5e/world/items/Frost Brand.md +2 -0
- package/systems/5e/world/items/Galley.md +1 -0
- package/systems/5e/world/items/Gauntlets of Ogre Power.md +2 -0
- package/systems/5e/world/items/Gem of Brightness.md +2 -0
- package/systems/5e/world/items/Gem of Seeing.md +2 -0
- package/systems/5e/world/items/Giant Slayer.md +1 -0
- package/systems/5e/world/items/Glaive.md +1 -0
- package/systems/5e/world/items/Glamoured Studded Leather.md +1 -0
- package/systems/5e/world/items/Glass Bottle.md +1 -0
- package/systems/5e/world/items/Glassblower's Tools.md +1 -0
- package/systems/5e/world/items/Gloves of Missile Snaring.md +1 -0
- package/systems/5e/world/items/Gloves of Swimming and Climbing.md +1 -0
- package/systems/5e/world/items/Goggles of Night.md +1 -0
- package/systems/5e/world/items/Grappling Hook.md +1 -0
- package/systems/5e/world/items/Greataxe.md +1 -0
- package/systems/5e/world/items/Greatclub.md +1 -0
- package/systems/5e/world/items/Greatsword.md +1 -0
- package/systems/5e/world/items/Halberd.md +1 -0
- package/systems/5e/world/items/Half Plate Armor.md +1 -0
- package/systems/5e/world/items/Hammer of Thunderbolts.md +2 -0
- package/systems/5e/world/items/Hammer.md +1 -0
- package/systems/5e/world/items/Hand Crossbow.md +1 -0
- package/systems/5e/world/items/Handaxe.md +1 -0
- package/systems/5e/world/items/Handy Haversack.md +3 -0
- package/systems/5e/world/items/Hat of Disguise.md +1 -0
- package/systems/5e/world/items/Headband of Intellect.md +2 -0
- package/systems/5e/world/items/Healer's Kit.md +1 -0
- package/systems/5e/world/items/Heavy Crossbow.md +1 -0
- package/systems/5e/world/items/Helm of Brilliance.md +1 -0
- package/systems/5e/world/items/Helm of Comprehending Languages.md +1 -0
- package/systems/5e/world/items/Helm of Telepathy.md +1 -0
- package/systems/5e/world/items/Helm of Teleportation.md +2 -0
- package/systems/5e/world/items/Hempen Rope.md +1 -0
- package/systems/5e/world/items/Herbalism Kit.md +1 -0
- package/systems/5e/world/items/Hide Armor.md +1 -0
- package/systems/5e/world/items/Holy Avenger.md +1 -0
- package/systems/5e/world/items/Holy Water.md +1 -0
- package/systems/5e/world/items/Hooded Lantern.md +1 -0
- package/systems/5e/world/items/Horn of Blasting.md +1 -0
- package/systems/5e/world/items/Horn of Valhalla.md +1 -0
- package/systems/5e/world/items/Horn.md +1 -0
- package/systems/5e/world/items/Horseshoes of Speed.md +1 -0
- package/systems/5e/world/items/Horseshoes of a Zephyr.md +1 -0
- package/systems/5e/world/items/Hourglass.md +1 -0
- package/systems/5e/world/items/Hunting Trap.md +1 -0
- package/systems/5e/world/items/Immovable Rod.md +1 -0
- package/systems/5e/world/items/Ink Pen.md +1 -0
- package/systems/5e/world/items/Ink.md +1 -0
- package/systems/5e/world/items/Instant Fortress.md +1 -0
- package/systems/5e/world/items/Ioun Stone.md +1 -0
- package/systems/5e/world/items/Iron Bands of Binding.md +1 -0
- package/systems/5e/world/items/Iron Flask.md +1 -0
- package/systems/5e/world/items/Iron Pot.md +1 -0
- package/systems/5e/world/items/Iron Spikes.md +2 -0
- package/systems/5e/world/items/Javelin of Lightning.md +1 -0
- package/systems/5e/world/items/Javelin.md +1 -0
- package/systems/5e/world/items/Jeweler's Tools.md +1 -0
- package/systems/5e/world/items/Jug or Pitcher.md +1 -0
- package/systems/5e/world/items/Keelboat.md +1 -0
- package/systems/5e/world/items/Ladder.md +1 -0
- package/systems/5e/world/items/Lamp.md +1 -0
- package/systems/5e/world/items/Lance.md +1 -0
- package/systems/5e/world/items/Lantern of Revealing.md +1 -0
- package/systems/5e/world/items/Leather Armor.md +1 -0
- package/systems/5e/world/items/Leatherworker's Tools.md +1 -0
- package/systems/5e/world/items/Light Crossbow.md +1 -0
- package/systems/5e/world/items/Light Hammer.md +1 -0
- package/systems/5e/world/items/Lock.md +1 -0
- package/systems/5e/world/items/Longbow.md +1 -0
- package/systems/5e/world/items/Longship.md +1 -0
- package/systems/5e/world/items/Longsword.md +1 -0
- package/systems/5e/world/items/Luck Blade.md +1 -0
- package/systems/5e/world/items/Lute.md +1 -0
- package/systems/5e/world/items/Lyre.md +1 -0
- package/systems/5e/world/items/Mace of Disruption.md +1 -0
- package/systems/5e/world/items/Mace of Smiting.md +1 -0
- package/systems/5e/world/items/Mace of Terror.md +2 -0
- package/systems/5e/world/items/Mace.md +1 -0
- package/systems/5e/world/items/Magnifying Glass.md +1 -0
- package/systems/5e/world/items/Manacles.md +1 -0
- package/systems/5e/world/items/Mantle of Spell Resistance.md +1 -0
- package/systems/5e/world/items/Manual of Bodily Health.md +1 -0
- package/systems/5e/world/items/Manual of Gainful Exercise.md +1 -0
- package/systems/5e/world/items/Manual of Golems.md +1 -0
- package/systems/5e/world/items/Manual of Quickness of Action.md +1 -0
- package/systems/5e/world/items/Map or Scroll Case.md +1 -0
- package/systems/5e/world/items/Marvelous Pigments.md +1 -0
- package/systems/5e/world/items/Mason's Tools.md +1 -0
- package/systems/5e/world/items/Maul.md +1 -0
- package/systems/5e/world/items/Medallion of Thoughts.md +2 -0
- package/systems/5e/world/items/Merchant's Scale.md +1 -0
- package/systems/5e/world/items/Mess Kit.md +1 -0
- package/systems/5e/world/items/Military Saddle.md +1 -0
- package/systems/5e/world/items/Miner's Pick.md +1 -0
- package/systems/5e/world/items/Mirror of Life Trapping.md +1 -0
- package/systems/5e/world/items/Mithral Armor.md +1 -0
- package/systems/5e/world/items/Morningstar.md +1 -0
- package/systems/5e/world/items/Navigator's Tools.md +1 -0
- package/systems/5e/world/items/Necklace of Adaptation.md +1 -0
- package/systems/5e/world/items/Necklace of Fireballs.md +1 -0
- package/systems/5e/world/items/Necklace of Prayer Beads.md +1 -0
- package/systems/5e/world/items/Net.md +1 -0
- package/systems/5e/world/items/Nine Lives Stealer.md +1 -0
- package/systems/5e/world/items/Oathbow.md +1 -0
- package/systems/5e/world/items/Oil of Etherealness.md +1 -0
- package/systems/5e/world/items/Oil of Sharpness.md +1 -0
- package/systems/5e/world/items/Oil of Slipperiness.md +1 -0
- package/systems/5e/world/items/Oil.md +1 -0
- package/systems/5e/world/items/Orb of Dragonkind.md +2 -0
- package/systems/5e/world/items/Orb.md +1 -0
- package/systems/5e/world/items/Pack Saddle.md +1 -0
- package/systems/5e/world/items/Padded Armor.md +1 -0
- package/systems/5e/world/items/Painter's Supplies.md +1 -0
- package/systems/5e/world/items/Pan Flute.md +1 -0
- package/systems/5e/world/items/Paper.md +1 -0
- package/systems/5e/world/items/Parchment.md +1 -0
- package/systems/5e/world/items/Pearl of Power.md +1 -0
- package/systems/5e/world/items/Perfume.md +1 -0
- package/systems/5e/world/items/Periapt of Health.md +1 -0
- package/systems/5e/world/items/Periapt of Proof against Poison.md +1 -0
- package/systems/5e/world/items/Periapt of Wound Closure.md +1 -0
- package/systems/5e/world/items/Philter of Love.md +1 -0
- package/systems/5e/world/items/Pike.md +1 -0
- package/systems/5e/world/items/Pipes of Haunting.md +1 -0
- package/systems/5e/world/items/Pipes of the Sewers.md +1 -0
- package/systems/5e/world/items/Piton.md +1 -0
- package/systems/5e/world/items/Plate Armor of Etherealness.md +1 -0
- package/systems/5e/world/items/Plate Armor.md +2 -0
- package/systems/5e/world/items/Playing Card Set.md +1 -0
- package/systems/5e/world/items/Poisoner's Kit.md +1 -0
- package/systems/5e/world/items/Pole.md +1 -0
- package/systems/5e/world/items/Portable Hole.md +2 -0
- package/systems/5e/world/items/Portable Ram.md +1 -0
- package/systems/5e/world/items/Potion of Animal Friendship.md +1 -0
- package/systems/5e/world/items/Potion of Clairvoyance.md +1 -0
- package/systems/5e/world/items/Potion of Climbing.md +1 -0
- package/systems/5e/world/items/Potion of Diminution.md +1 -0
- package/systems/5e/world/items/Potion of Flying.md +1 -0
- package/systems/5e/world/items/Potion of Gaseous Form.md +1 -0
- package/systems/5e/world/items/Potion of Giant Strength.md +1 -0
- package/systems/5e/world/items/Potion of Growth.md +1 -0
- package/systems/5e/world/items/Potion of Healing.md +1 -0
- package/systems/5e/world/items/Potion of Heroism.md +1 -0
- package/systems/5e/world/items/Potion of Invisibility.md +1 -0
- package/systems/5e/world/items/Potion of Mind Reading.md +1 -0
- package/systems/5e/world/items/Potion of Poison.md +1 -0
- package/systems/5e/world/items/Potion of Resistance.md +1 -0
- package/systems/5e/world/items/Potion of Speed.md +1 -0
- package/systems/5e/world/items/Potion of Water Breathing.md +1 -0
- package/systems/5e/world/items/Potter's Tools.md +1 -0
- package/systems/5e/world/items/Pouch.md +1 -0
- package/systems/5e/world/items/Priest's Pack.md +3 -0
- package/systems/5e/world/items/Quarterstaff.md +1 -0
- package/systems/5e/world/items/Quiver.md +1 -0
- package/systems/5e/world/items/Rapier.md +1 -0
- package/systems/5e/world/items/Rations.md +1 -0
- package/systems/5e/world/items/Reliquary.md +1 -0
- package/systems/5e/world/items/Restorative Ointment.md +1 -0
- package/systems/5e/world/items/Riding Saddle.md +1 -0
- package/systems/5e/world/items/Ring Mail.md +1 -0
- package/systems/5e/world/items/Ring of Animal Influence.md +2 -0
- package/systems/5e/world/items/Ring of Djinni Summoning.md +1 -0
- package/systems/5e/world/items/Ring of Elemental Command.md +2 -0
- package/systems/5e/world/items/Ring of Evasion.md +2 -0
- package/systems/5e/world/items/Ring of Feather Falling.md +1 -0
- package/systems/5e/world/items/Ring of Free Action.md +1 -0
- package/systems/5e/world/items/Ring of Invisibility.md +1 -0
- package/systems/5e/world/items/Ring of Jumping.md +1 -0
- package/systems/5e/world/items/Ring of Mind Shielding.md +1 -0
- package/systems/5e/world/items/Ring of Protection.md +3 -0
- package/systems/5e/world/items/Ring of Regeneration.md +1 -0
- package/systems/5e/world/items/Ring of Resistance.md +1 -0
- package/systems/5e/world/items/Ring of Shooting Stars.md +2 -0
- package/systems/5e/world/items/Ring of Spell Storing.md +1 -0
- package/systems/5e/world/items/Ring of Spell Turning.md +1 -0
- package/systems/5e/world/items/Ring of Swimming.md +1 -0
- package/systems/5e/world/items/Ring of Telekinesis.md +1 -0
- package/systems/5e/world/items/Ring of Three Wishes.md +1 -0
- package/systems/5e/world/items/Ring of Warmth.md +2 -0
- package/systems/5e/world/items/Ring of Water Walking.md +1 -0
- package/systems/5e/world/items/Ring of X-ray Vision.md +1 -0
- package/systems/5e/world/items/Ring of the Ram.md +2 -0
- package/systems/5e/world/items/Robe of Eyes.md +1 -0
- package/systems/5e/world/items/Robe of Scintillating Colors.md +2 -0
- package/systems/5e/world/items/Robe of Stars.md +1 -0
- package/systems/5e/world/items/Robe of Useful Items.md +1 -0
- package/systems/5e/world/items/Robe of the Archmagi.md +3 -0
- package/systems/5e/world/items/Robes.md +1 -0
- package/systems/5e/world/items/Rod of Absorption.md +1 -0
- package/systems/5e/world/items/Rod of Alertness.md +1 -0
- package/systems/5e/world/items/Rod of Lordly Might.md +1 -0
- package/systems/5e/world/items/Rod of Rulership.md +1 -0
- package/systems/5e/world/items/Rod of Security.md +1 -0
- package/systems/5e/world/items/Rod.md +1 -0
- package/systems/5e/world/items/Rope of Climbing.md +1 -0
- package/systems/5e/world/items/Rope of Entanglement.md +1 -0
- package/systems/5e/world/items/Rowboat.md +1 -0
- package/systems/5e/world/items/Sack.md +1 -0
- package/systems/5e/world/items/Saddlebags.md +1 -0
- package/systems/5e/world/items/Sailing Ship.md +1 -0
- package/systems/5e/world/items/Scale Mail.md +1 -0
- package/systems/5e/world/items/Scarab of Protection.md +2 -0
- package/systems/5e/world/items/Scholar's Pack.md +3 -0
- package/systems/5e/world/items/Scimitar of Speed.md +1 -0
- package/systems/5e/world/items/Scimitar.md +1 -0
- package/systems/5e/world/items/Sealing Wax.md +1 -0
- package/systems/5e/world/items/Shawm.md +1 -0
- package/systems/5e/world/items/Shield of Missile Attraction.md +2 -0
- package/systems/5e/world/items/Shield, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Shield.md +1 -0
- package/systems/5e/world/items/Shortbow.md +1 -0
- package/systems/5e/world/items/Shortsword.md +1 -0
- package/systems/5e/world/items/Shovel.md +1 -0
- package/systems/5e/world/items/Sickle.md +1 -0
- package/systems/5e/world/items/Signal Whistle.md +1 -0
- package/systems/5e/world/items/Signet Ring.md +1 -0
- package/systems/5e/world/items/Silk Rope.md +1 -0
- package/systems/5e/world/items/Sled.md +1 -0
- package/systems/5e/world/items/Sledgehammer.md +1 -0
- package/systems/5e/world/items/Sling Bullets.md +2 -0
- package/systems/5e/world/items/Sling.md +1 -0
- package/systems/5e/world/items/Slippers of Spider Climbing.md +1 -0
- package/systems/5e/world/items/Smith's Tools.md +1 -0
- package/systems/5e/world/items/Soap.md +1 -0
- package/systems/5e/world/items/Sovereign Glue.md +1 -0
- package/systems/5e/world/items/Spear.md +1 -0
- package/systems/5e/world/items/Spell Scroll.md +1 -0
- package/systems/5e/world/items/Spellbook.md +1 -0
- package/systems/5e/world/items/Spellguard Shield.md +1 -0
- package/systems/5e/world/items/Sphere of Annihilation.md +1 -0
- package/systems/5e/world/items/Splint Armor.md +2 -0
- package/systems/5e/world/items/Sprig of Mistletoe.md +1 -0
- package/systems/5e/world/items/Spyglass.md +1 -0
- package/systems/5e/world/items/Staff of Charming.md +1 -0
- package/systems/5e/world/items/Staff of Fire.md +3 -0
- package/systems/5e/world/items/Staff of Frost.md +3 -0
- package/systems/5e/world/items/Staff of Healing.md +2 -0
- package/systems/5e/world/items/Staff of Power.md +5 -0
- package/systems/5e/world/items/Staff of Striking.md +2 -0
- package/systems/5e/world/items/Staff of Swarming Insects.md +2 -0
- package/systems/5e/world/items/Staff of Thunder and Lightning.md +1 -0
- package/systems/5e/world/items/Staff of Withering.md +2 -0
- package/systems/5e/world/items/Staff of the Magi.md +3 -0
- package/systems/5e/world/items/Staff of the Python.md +1 -0
- package/systems/5e/world/items/Staff of the Woodlands.md +2 -0
- package/systems/5e/world/items/Staff.md +1 -0
- package/systems/5e/world/items/Steel Mirror.md +1 -0
- package/systems/5e/world/items/Stone of Controlling Earth Elementals.md +1 -0
- package/systems/5e/world/items/Stone of Good Luck.md +4 -0
- package/systems/5e/world/items/Studded Leather Armor.md +1 -0
- package/systems/5e/world/items/Sun Blade.md +1 -0
- package/systems/5e/world/items/Sword of Life Stealing.md +1 -0
- package/systems/5e/world/items/Sword of Sharpness.md +1 -0
- package/systems/5e/world/items/Sword of Wounding.md +1 -0
- package/systems/5e/world/items/Talisman of Pure Good.md +2 -0
- package/systems/5e/world/items/Talisman of Ultimate Evil.md +2 -0
- package/systems/5e/world/items/Talisman of the Sphere.md +1 -0
- package/systems/5e/world/items/Thieves' Tools.md +1 -0
- package/systems/5e/world/items/Tinderbox.md +1 -0
- package/systems/5e/world/items/Tinker's Tools.md +1 -0
- package/systems/5e/world/items/Tome of Clear Thought.md +1 -0
- package/systems/5e/world/items/Tome of Leadership and Influence.md +1 -0
- package/systems/5e/world/items/Tome of Understanding.md +1 -0
- package/systems/5e/world/items/Torch.md +1 -0
- package/systems/5e/world/items/Totem.md +1 -0
- package/systems/5e/world/items/Traveler's Clothes.md +1 -0
- package/systems/5e/world/items/Trident of Fish Command.md +2 -0
- package/systems/5e/world/items/Trident.md +1 -0
- package/systems/5e/world/items/Two-Person Tent.md +1 -0
- package/systems/5e/world/items/Unarmed Strike.md +1 -0
- package/systems/5e/world/items/Universal Solvent.md +1 -0
- package/systems/5e/world/items/Vial.md +1 -0
- package/systems/5e/world/items/Vicious Weapon.md +1 -0
- package/systems/5e/world/items/Viol.md +1 -0
- package/systems/5e/world/items/Vorpal Sword.md +1 -0
- package/systems/5e/world/items/Wagon.md +1 -0
- package/systems/5e/world/items/Wand of Binding.md +2 -0
- package/systems/5e/world/items/Wand of Enemy Detection.md +2 -0
- package/systems/5e/world/items/Wand of Fear.md +2 -0
- package/systems/5e/world/items/Wand of Fireballs.md +2 -0
- package/systems/5e/world/items/Wand of Lightning Bolts.md +2 -0
- package/systems/5e/world/items/Wand of Magic Detection.md +2 -0
- package/systems/5e/world/items/Wand of Magic Missiles.md +2 -0
- package/systems/5e/world/items/Wand of Paralysis.md +2 -0
- package/systems/5e/world/items/Wand of Polymorph.md +2 -0
- package/systems/5e/world/items/Wand of Secrets.md +2 -0
- package/systems/5e/world/items/Wand of Web.md +2 -0
- package/systems/5e/world/items/Wand of Wonder.md +2 -0
- package/systems/5e/world/items/Wand of the War Mage, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Wand.md +1 -0
- package/systems/5e/world/items/War Pick.md +1 -0
- package/systems/5e/world/items/Warhammer.md +1 -0
- package/systems/5e/world/items/Warship.md +1 -0
- package/systems/5e/world/items/Waterskin.md +1 -0
- package/systems/5e/world/items/Weapon, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Weaver's Tools.md +1 -0
- package/systems/5e/world/items/Well of Many Worlds.md +1 -0
- package/systems/5e/world/items/Whetstone.md +1 -0
- package/systems/5e/world/items/Whip.md +1 -0
- package/systems/5e/world/items/Wind Fan.md +1 -0
- package/systems/5e/world/items/Winged Boots.md +1 -0
- package/systems/5e/world/items/Wings of Flying.md +1 -0
- package/systems/5e/world/items/Woodcarver's Tools.md +1 -0
- package/systems/5e/world/items/Wooden Staff.md +1 -0
- package/systems/5e/world/items/Yew Wand.md +1 -0
- package/systems/free/instructions/play.md +5 -0
- package/systems/free/instructions/session-zero.md +1 -0
- package/systems/free/system.yaml +12 -0
- package/dist/dashboard/combat.js +0 -72
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export type { CalendarDay, ExtensionCode, ExtensionCommand, ExtensionEntry, ExtensionKit, Game, GameMoment, TimePassage } from "./api.ts";
|
|
2
|
-
export { type Extension, extensionApi, extensionFileName, findExtension, installedExtensions, readExtension, shortName } from "./extension.ts";
|
|
3
|
-
export {
|
|
1
|
+
export type { CalendarDay, ExtensionCode, ExtensionCommand, ExtensionEntry, ExtensionKit, Game, GameMoment, GameView, TimePassage, Widget, WidgetPart, WidgetText, WidgetValue } from "./api.ts";
|
|
2
|
+
export { type DeclaredWidget, type Extension, extensionApi, extensionFileName, findExtension, installedExtensions, readExtension, readsApi, shortName, type WidgetPage, widgetPages, type WidgetPlace, widgetPlaces } from "./extension.ts";
|
|
3
|
+
export { isLocalSpec, isVerified, npmPackages, packageKeyword, verifiedScope } from "./packages.ts";
|
|
4
|
+
export { isTarball } from "./tarball.ts";
|
|
5
|
+
export { type ExtensionWords, extensionWords, wordIn } from "./words.ts";
|
package/dist/extensions/index.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { extensionApi, extensionFileName, findExtension, installedExtensions, readExtension, shortName } from "./extension.js";
|
|
2
|
-
export {
|
|
1
|
+
export { extensionApi, extensionFileName, findExtension, installedExtensions, readExtension, readsApi, shortName, widgetPages, widgetPlaces } from "./extension.js";
|
|
2
|
+
export { isLocalSpec, isVerified, npmPackages, packageKeyword, verifiedScope } from "./packages.js";
|
|
3
|
+
export { isTarball } from "./tarball.js";
|
|
4
|
+
export { extensionWords, wordIn } from "./words.js";
|
|
@@ -3,9 +3,18 @@ import type { PackageManager } from "../core/context.ts";
|
|
|
3
3
|
export declare const packageKeyword = "rpg-engine-package";
|
|
4
4
|
/** The npm scope of the packages we publish, the verified ones (D-428, D-441). */
|
|
5
5
|
export declare const verifiedScope = "@rpgengine/";
|
|
6
|
-
/**
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/** What running npm gave: its exit code and what it wrote. */
|
|
7
|
+
export interface NpmRun {
|
|
8
|
+
code: number | null;
|
|
9
|
+
out: string;
|
|
10
|
+
errors: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* npm on this computer, installing in this folder (D-436): never globally, never running a package's scripts, always linking a folder (D-441 tells a package
|
|
14
|
+
* from a folder by its link). Its registry is read directly; `run` runs npm, a fake in tests.
|
|
15
|
+
*/
|
|
16
|
+
export declare function npmPackages(folder: string, run?: (args: string) => Promise<NpmRun>): PackageManager;
|
|
17
|
+
/** Whether a package is given by its folder or its .tgz on this computer rather than by its name on npm (D-452): a .tgz by its file name alone too. */
|
|
18
|
+
export declare function isLocalSpec(spec: string): boolean;
|
|
10
19
|
/** Whether an installed package is ours, verified: in our scope and installed from npm, never from a folder, which anyone can name so (D-428, D-441). */
|
|
11
20
|
export declare function isVerified(name: string, linked: boolean): boolean;
|
|
@@ -1,27 +1,58 @@
|
|
|
1
1
|
import { spawn, spawnSync } from "node:child_process";
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
2
|
+
import { cpSync, existsSync, readdirSync, readFileSync, renameSync, rmSync } from "node:fs";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { isAbsolute, join, resolve } from "node:path";
|
|
5
|
+
import { isTarball, tarballText, unpackTarball } from "./tarball.js";
|
|
5
6
|
/** The keyword of the packages for rpg-engine on npm, by which they are found (D-439). */
|
|
6
7
|
export const packageKeyword = "rpg-engine-package";
|
|
7
8
|
/** The npm scope of the packages we publish, the verified ones (D-428, D-441). */
|
|
8
9
|
export const verifiedScope = "@rpgengine/";
|
|
9
10
|
const registry = "https://registry.npmjs.org";
|
|
11
|
+
// Where the packages given as a .tgz are unpacked, in the packages' folder (D-452).
|
|
12
|
+
const localFolder = "local";
|
|
10
13
|
// An npm name with a version or a tag, or nothing a shell would read otherwise: the master writes it, and npm runs in a shell.
|
|
11
14
|
const npmSpec = /^(@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*(@[0-9A-Za-z.+-]+)?$/;
|
|
12
15
|
const installWait = 5 * 60 * 1000;
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
// An npm package's name alone, without a version: a .tgz's becomes the name of its folder.
|
|
17
|
+
const packageName = /^(@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/;
|
|
18
|
+
// A folder's copy installed as files, never as a link, which Node may not follow where the app keeps the player's data; npm's package.json still names it
|
|
19
|
+
// as file:, by which D-441 tells it from a package of npm's.
|
|
20
|
+
const installOptions = "--install-links=true --ignore-scripts --save-exact --no-audit --no-fund --json --loglevel=error";
|
|
21
|
+
/**
|
|
22
|
+
* npm on this computer, installing in this folder (D-436): never globally, never running a package's scripts, always linking a folder (D-441 tells a package
|
|
23
|
+
* from a folder by its link). Its registry is read directly; `run` runs npm, a fake in tests.
|
|
24
|
+
*/
|
|
25
|
+
export function npmPackages(folder, run = npm) {
|
|
26
|
+
// What each .tgz said of itself when it was described, before the player's yes: the file installed must still say the same.
|
|
27
|
+
const described = new Map();
|
|
15
28
|
return {
|
|
16
|
-
describe: async (spec) =>
|
|
29
|
+
describe: async (spec) => {
|
|
30
|
+
const read = isLocalSpec(spec) ? localPackage(spec) : await registryPackage(spec);
|
|
31
|
+
if (isLocalSpec(spec) && !("failed" in read)) {
|
|
32
|
+
described.set(resolve(spec), `${read.name}@${read.version}`);
|
|
33
|
+
}
|
|
34
|
+
return read;
|
|
35
|
+
},
|
|
17
36
|
install: async (spec) => {
|
|
18
|
-
|
|
19
|
-
|
|
37
|
+
// A file or a folder is copied, so that the yes holds for the code it held then, whatever the folder holds later (D-452, D-478).
|
|
38
|
+
if (isLocalSpec(spec)) {
|
|
39
|
+
return await installCopy(folder, spec, described.get(resolve(spec)), run);
|
|
40
|
+
}
|
|
41
|
+
const ran = await run(`install --prefix ${quotedFolder(folder)} ${isLocalSpec(spec) ? quotedFolder(spec) : checkedSpec(spec)} ${installOptions}`);
|
|
20
42
|
return ran.code === 0 ? undefined : `npm said: ${npmError(ran)}`;
|
|
21
43
|
},
|
|
22
44
|
uninstall: async (name) => {
|
|
23
|
-
const ran = await
|
|
24
|
-
|
|
45
|
+
const ran = await run(`uninstall --prefix ${quotedFolder(folder)} ${checkedSpec(name)} --ignore-scripts --no-audit --no-fund --json --loglevel=error`);
|
|
46
|
+
if (ran.code !== 0) {
|
|
47
|
+
return `npm said: ${npmError(ran)}`;
|
|
48
|
+
}
|
|
49
|
+
// What a .tgz was unpacked to goes with it, and its scope's folder when nothing else is left in it (D-452).
|
|
50
|
+
rmSync(join(folder, localFolder, name), { recursive: true, force: true });
|
|
51
|
+
const scope = join(folder, localFolder, name.split("/")[0]);
|
|
52
|
+
if (name.includes("/") && existsSync(scope) && readdirSync(scope).length === 0) {
|
|
53
|
+
rmSync(scope, { recursive: true, force: true });
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
25
56
|
},
|
|
26
57
|
search: async () => {
|
|
27
58
|
try {
|
|
@@ -41,9 +72,9 @@ export function npmPackages(folder) {
|
|
|
41
72
|
},
|
|
42
73
|
};
|
|
43
74
|
}
|
|
44
|
-
/** Whether a package is given by its folder on this computer rather than by its name on npm. */
|
|
45
|
-
export function
|
|
46
|
-
return spec.startsWith(".") || isAbsolute(spec);
|
|
75
|
+
/** Whether a package is given by its folder or its .tgz on this computer rather than by its name on npm (D-452): a .tgz by its file name alone too. */
|
|
76
|
+
export function isLocalSpec(spec) {
|
|
77
|
+
return spec.startsWith(".") || isAbsolute(spec) || isTarball(spec);
|
|
47
78
|
}
|
|
48
79
|
/** Whether an installed package is ours, verified: in our scope and installed from npm, never from a folder, which anyone can name so (D-428, D-441). */
|
|
49
80
|
export function isVerified(name, linked) {
|
|
@@ -62,15 +93,79 @@ async function registryPackage(spec) {
|
|
|
62
93
|
return { failed: `npm's registry could not be reached: ${error instanceof Error ? error.message : String(error)}` };
|
|
63
94
|
}
|
|
64
95
|
}
|
|
65
|
-
/** What a package's folder says of it, by its package.json. */
|
|
66
|
-
function
|
|
96
|
+
/** What a package's folder or .tgz says of it, by its package.json: a .tgz's name must be one npm takes, as it becomes a folder's. */
|
|
97
|
+
function localPackage(spec) {
|
|
98
|
+
const what = isTarball(spec) ? "the .tgz of a package" : "the folder of a package";
|
|
99
|
+
if (!existsSync(spec)) {
|
|
100
|
+
return { failed: `There is no ${isTarball(spec) ? "file" : "folder"} ${spec} on this computer (${resolve(spec)}): give its full path` };
|
|
101
|
+
}
|
|
102
|
+
let text;
|
|
67
103
|
try {
|
|
68
|
-
|
|
69
|
-
|
|
104
|
+
text = isTarball(spec) ? tarballText(spec, "package.json") : readFileSync(join(resolve(spec), "package.json"), "utf8");
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
// An archive refused whole says why; a folder without the file is simply not a package's.
|
|
108
|
+
return { failed: isTarball(spec) && error instanceof Error ? error.message : `${spec} is not ${what}: it has no package.json that reads` };
|
|
109
|
+
}
|
|
110
|
+
let read;
|
|
111
|
+
try {
|
|
112
|
+
read = JSON.parse(text ?? "");
|
|
70
113
|
}
|
|
71
114
|
catch {
|
|
72
|
-
return { failed: `${spec} is not
|
|
115
|
+
return { failed: `${spec} is not ${what}: it has no package.json that reads` };
|
|
116
|
+
}
|
|
117
|
+
if (read.name === undefined || read.version === undefined) {
|
|
118
|
+
return { failed: `${spec} has a package.json without its name and version` };
|
|
119
|
+
}
|
|
120
|
+
return isTarball(spec) && !packageName.test(read.name) ? { failed: `${spec} is named "${read.name}", which is not an npm package's name, such as notes or @me/notes` } : infoOf(read);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Installs a .tgz or a folder of this computer (D-452, D-478): unpacked or copied beside the copy it replaces, swapped in, then linked by npm as a folder of the
|
|
124
|
+
* player's; when npm fails, the copy before comes back. The file or the folder may then be moved, changed or deleted: what runs is the copy.
|
|
125
|
+
*/
|
|
126
|
+
async function installCopy(folder, spec, expected, run) {
|
|
127
|
+
let read;
|
|
128
|
+
try {
|
|
129
|
+
read = JSON.parse((isTarball(spec) ? tarballText(spec, "package.json") : readFileSync(join(resolve(spec), "package.json"), "utf8")) ?? "{}");
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
return error instanceof Error ? error.message : String(error);
|
|
133
|
+
}
|
|
134
|
+
if (read.name === undefined || !packageName.test(read.name) || (expected !== undefined && expected !== `${read.name}@${read.version}`)) {
|
|
135
|
+
return `${spec} is no longer the package that was asked about: install it again`;
|
|
136
|
+
}
|
|
137
|
+
const target = join(folder, localFolder, read.name);
|
|
138
|
+
const [staged, before] = [`${target}.new`, `${target}.old`];
|
|
139
|
+
rmSync(staged, { recursive: true, force: true });
|
|
140
|
+
rmSync(before, { recursive: true, force: true });
|
|
141
|
+
try {
|
|
142
|
+
if (isTarball(spec)) {
|
|
143
|
+
unpackTarball(spec, staged);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
// What npm or git keep beside a package's own files is no part of it.
|
|
147
|
+
cpSync(resolve(spec), staged, { recursive: true, filter: (path) => !/[\\/](node_modules|\.git)([\\/]|$)/.test(path.slice(resolve(spec).length)) });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
rmSync(staged, { recursive: true, force: true });
|
|
152
|
+
return error instanceof Error ? error.message : String(error);
|
|
153
|
+
}
|
|
154
|
+
const had = existsSync(target);
|
|
155
|
+
if (had) {
|
|
156
|
+
renameSync(target, before);
|
|
157
|
+
}
|
|
158
|
+
renameSync(staged, target);
|
|
159
|
+
const ran = await run(`install --prefix ${quotedFolder(folder)} ${quotedFolder(target)} ${installOptions}`);
|
|
160
|
+
if (ran.code === 0) {
|
|
161
|
+
rmSync(before, { recursive: true, force: true });
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
164
|
+
rmSync(target, { recursive: true, force: true });
|
|
165
|
+
if (had) {
|
|
166
|
+
renameSync(before, target);
|
|
73
167
|
}
|
|
168
|
+
return `npm said: ${npmError(ran)}`;
|
|
74
169
|
}
|
|
75
170
|
function infoOf(read) {
|
|
76
171
|
const marker = read["rpg-engine"];
|
|
@@ -81,6 +176,9 @@ function infoOf(read) {
|
|
|
81
176
|
...(typeof marker?.api === "number" ? { api: marker.api } : {}),
|
|
82
177
|
...(read.description === undefined ? {} : { description: read.description }),
|
|
83
178
|
...(authorOf(read) === undefined ? {} : { author: authorOf(read) }),
|
|
179
|
+
// What runs: a main, exports or a command; a package of texts alone has none.
|
|
180
|
+
code: read.main !== undefined || read.exports !== undefined || read.bin !== undefined,
|
|
181
|
+
dependencies: Object.keys(read.dependencies ?? {}).length > 0,
|
|
84
182
|
};
|
|
85
183
|
}
|
|
86
184
|
/** Who wrote a package, as its package.json or the registry gives it. */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Whether a package is given as a .tgz file. */
|
|
2
|
+
export declare function isTarball(spec: string): boolean;
|
|
3
|
+
/** The text of one file of the package, such as package.json; undefined when it has none. It throws, saying why, when the archive is refused. */
|
|
4
|
+
export declare function tarballText(archive: string, path: string): string | undefined;
|
|
5
|
+
/** Unpacks the package into this folder, which must not exist yet; every path is checked before the first is written. */
|
|
6
|
+
export declare function unpackTarball(archive: string, folder: string): void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// A package's .tgz as npm pack makes it (D-452): a gzipped tar with its files under package/. Read with Node alone and checked whole before anything is
|
|
2
|
+
// written: a path that would leave the folder or that Windows reads otherwise, a link, a device, a duplicate or an archive cut short refuse it.
|
|
3
|
+
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
import { gunzipSync } from "node:zlib";
|
|
6
|
+
import { archivePathParts, insideFolder, refuseTwice } from "../core/archive-paths.js";
|
|
7
|
+
// The most an archive may unpack to: a package is never this big, a malicious archive could be.
|
|
8
|
+
const largest = 512 * 1024 * 1024;
|
|
9
|
+
const block = 512;
|
|
10
|
+
/** Whether a package is given as a .tgz file. */
|
|
11
|
+
export function isTarball(spec) {
|
|
12
|
+
return /\.(tgz|tar\.gz)$/i.test(spec);
|
|
13
|
+
}
|
|
14
|
+
/** The text of one file of the package, such as package.json; undefined when it has none. It throws, saying why, when the archive is refused. */
|
|
15
|
+
export function tarballText(archive, path) {
|
|
16
|
+
return entries(archive).find((entry) => !entry.directory && entry.path === path)?.data.toString("utf8");
|
|
17
|
+
}
|
|
18
|
+
/** Unpacks the package into this folder, which must not exist yet; every path is checked before the first is written. */
|
|
19
|
+
export function unpackTarball(archive, folder) {
|
|
20
|
+
const root = resolve(folder);
|
|
21
|
+
const placed = entries(archive).map((entry) => ({ ...entry, target: insideFolder(root, entry.path, "the package") }));
|
|
22
|
+
mkdirSync(root, { recursive: true });
|
|
23
|
+
for (const entry of placed) {
|
|
24
|
+
if (entry.directory) {
|
|
25
|
+
mkdirSync(entry.target, { recursive: true });
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
mkdirSync(resolve(entry.target, ".."), { recursive: true });
|
|
29
|
+
writeFileSync(entry.target, entry.data);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** The files and folders of the archive, refused whole when one is not a plain file or folder, its path is not a safe one, or the archive does not read to its end. */
|
|
34
|
+
function entries(archive) {
|
|
35
|
+
let tar;
|
|
36
|
+
try {
|
|
37
|
+
tar = gunzipSync(readFileSync(archive), { maxOutputLength: largest });
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
const big = error instanceof RangeError || (error instanceof Error && /larger than|maxOutputLength/i.test(error.message));
|
|
41
|
+
throw new Error(big ? `${archive} unpacks to more than ${largest / 1024 / 1024} MB, more than a package may.` : `${archive} is not a package's .tgz that reads: ${error instanceof Error ? error.message : String(error)}`);
|
|
42
|
+
}
|
|
43
|
+
const found = [];
|
|
44
|
+
let longName;
|
|
45
|
+
for (let at = 0; at + block <= tar.length;) {
|
|
46
|
+
const header = tar.subarray(at, at + block);
|
|
47
|
+
if (header.every((byte) => byte === 0)) {
|
|
48
|
+
return unique(archive, found.filter((entry) => entry.path !== ""));
|
|
49
|
+
}
|
|
50
|
+
const sizeField = text(header, 124, 12).trim();
|
|
51
|
+
const size = /^[0-7]*$/.test(sizeField) ? Number.parseInt(sizeField || "0", 8) : Number.NaN;
|
|
52
|
+
if (!Number.isSafeInteger(size) || at + block + size > tar.length) {
|
|
53
|
+
throw new Error(`${archive} is cut short, or is not a .tgz npm pack made: it is refused whole.`);
|
|
54
|
+
}
|
|
55
|
+
const type = String.fromCharCode(header[156] || 48);
|
|
56
|
+
const data = tar.subarray(at + block, at + block + size);
|
|
57
|
+
const prefix = text(header, 345, 155);
|
|
58
|
+
const name = longName ?? (prefix === "" ? text(header, 0, 100) : `${prefix}/${text(header, 0, 100)}`);
|
|
59
|
+
at += block + Math.ceil(size / block) * block;
|
|
60
|
+
longName = undefined;
|
|
61
|
+
// A pax or GNU header may give the next entry's long path; a global one, and npm's other metadata, change nothing here.
|
|
62
|
+
if (type === "x" || type === "L") {
|
|
63
|
+
longName = type === "L" ? data.toString("utf8").replace(/\0+$/, "") : /(?:^|\n)\d+ path=([^\n]*)\n/.exec(data.toString("utf8"))?.[1];
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (type === "g") {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (type !== "0" && type !== "5") {
|
|
70
|
+
throw new Error(`${archive} holds ${name}, which is not a plain file or folder (a link or a device): it is refused whole.`);
|
|
71
|
+
}
|
|
72
|
+
found.push({ path: packagePath(archive, name), directory: type === "5", data });
|
|
73
|
+
}
|
|
74
|
+
throw new Error(`${archive} is cut short, or is not a .tgz npm pack made: it is refused whole.`);
|
|
75
|
+
}
|
|
76
|
+
/** The entries, refused when a file comes twice: what was read would not be what is written. */
|
|
77
|
+
function unique(archive, found) {
|
|
78
|
+
refuseTwice(archive, found.filter((one) => !one.directory).map((one) => one.path));
|
|
79
|
+
return found;
|
|
80
|
+
}
|
|
81
|
+
/** A path inside the package, without its first folder (package/), refused when it is absolute, climbs out, or has a part Windows reads otherwise. */
|
|
82
|
+
function packagePath(archive, name) {
|
|
83
|
+
return archivePathParts(archive, name, "the package").slice(1).join("/");
|
|
84
|
+
}
|
|
85
|
+
function text(header, start, length) {
|
|
86
|
+
return header.subarray(start, start + length).toString("utf8").replace(/\0.*$/s, "");
|
|
87
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** An extension's words in one language: its title and about, and its other words and phrases by the text its code writes. */
|
|
2
|
+
export interface ExtensionWords {
|
|
3
|
+
title?: string;
|
|
4
|
+
about?: string;
|
|
5
|
+
words: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
/** The words of the extension in this folder for a language, or for its base language (pt for pt-BR); undefined when it has none in it. It throws when they do not read. */
|
|
8
|
+
export declare function extensionWords(folder: string, language: string): ExtensionWords | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* A text in the words' language: the whole text as the list gives it, else with its first letter's case aside, the translation's first letter taken to the
|
|
11
|
+
* text's case, so that "Rain" and "rain" need one entry; the text as written where the list lacks it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function wordIn(words: ExtensionWords | undefined, text: string): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// An extension's words in the languages it ships (D-502): beside its extension.yaml, words/<code>.yaml gives its title and its line in the Packages page, and
|
|
2
|
+
// any word or phrase its widgets write, by the English as its code writes it. The core hands them on: a word the list lacks stays as written.
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { files } from "../core/store.js";
|
|
6
|
+
import { readYamlValues } from "../core/yaml-file.js";
|
|
7
|
+
const wordsSchema = z.object({
|
|
8
|
+
title: z.string().trim().min(1).optional(),
|
|
9
|
+
about: z.string().trim().min(1).optional(),
|
|
10
|
+
words: z.record(z.string().min(1), z.string().min(1)).optional(),
|
|
11
|
+
}, { error: "write its title, its about and its words, each word from the text the code writes to the language's own, such as {words: {Weather: Meteo}}" }).strict();
|
|
12
|
+
/** The words of the extension in this folder for a language, or for its base language (pt for pt-BR); undefined when it has none in it. It throws when they do not read. */
|
|
13
|
+
export function extensionWords(folder, language) {
|
|
14
|
+
const file = [language, language.split("-")[0]].map((code) => join(folder, "words", `${code.toLowerCase()}.yaml`)).find((path) => files().exists(path));
|
|
15
|
+
if (file === undefined) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
const parsed = wordsSchema.safeParse(readYamlValues(file, 'the extension\'s words in a language, such as "words: {Weather: Meteo}"'));
|
|
19
|
+
if (!parsed.success) {
|
|
20
|
+
throw new Error(`The words of the extension in ${file} cannot be read: ${parsed.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ")}. Fix the file.`);
|
|
21
|
+
}
|
|
22
|
+
const { title, about, words = {} } = parsed.data;
|
|
23
|
+
return { ...(title === undefined ? {} : { title }), ...(about === undefined ? {} : { about }), words };
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A text in the words' language: the whole text as the list gives it, else with its first letter's case aside, the translation's first letter taken to the
|
|
27
|
+
* text's case, so that "Rain" and "rain" need one entry; the text as written where the list lacks it.
|
|
28
|
+
*/
|
|
29
|
+
export function wordIn(words, text) {
|
|
30
|
+
const list = words?.words ?? {};
|
|
31
|
+
if (Object.hasOwn(list, text)) {
|
|
32
|
+
return list[text];
|
|
33
|
+
}
|
|
34
|
+
const first = text.charAt(0);
|
|
35
|
+
const other = first === first.toLowerCase() ? first.toUpperCase() : first.toLowerCase();
|
|
36
|
+
const found = list[`${other}${text.slice(1)}`];
|
|
37
|
+
if (found === undefined) {
|
|
38
|
+
return text;
|
|
39
|
+
}
|
|
40
|
+
const head = found.charAt(0);
|
|
41
|
+
return `${first === first.toUpperCase() && first !== first.toLowerCase() ? head.toUpperCase() : head.toLowerCase()}${found.slice(1)}`;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { beginOpening, claimImport, clearOpening, doneImports, dropDocumentText, dropImport, finishAdventure, hasImport, importAge, importDate, importedPages, type ImportedText, importFile, importFolder, importPiece, importsFolderName, type ImportStart, importStarts, type ImportState, importStyle, isOwnOpening, markOpening, openImport, type OpeningImport, openingImport, openLicense, pieceName, prepareImport, readImportState, releaseImport, runElsewhere, textSize, writeImportState, } from "./work.ts";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// The importer's folder (D-489): the player's document in pieces, how far the import is, and the adventure the helper writes. Depends on nothing else in
|
|
2
|
+
// rpg-engine.
|
|
3
|
+
export { beginOpening, claimImport, clearOpening, doneImports, dropDocumentText, dropImport, finishAdventure, hasImport, importAge, importDate, importedPages, importFile, importFolder, importPiece, importsFolderName, importStarts, importStyle, isOwnOpening, markOpening, openImport, openingImport, openLicense, pieceName, prepareImport, readImportState, releaseImport, runElsewhere, textSize, writeImportState, } from "./work.js";
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/** A document as the importer takes it: its parts, each with how it is cited, and its pictures. */
|
|
2
|
+
export interface ImportedText {
|
|
3
|
+
parts: {
|
|
4
|
+
label: string;
|
|
5
|
+
text: string;
|
|
6
|
+
}[];
|
|
7
|
+
pictures: {
|
|
8
|
+
name: string;
|
|
9
|
+
data: Uint8Array;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
/** The folder of the campaign where imports are worked on, apart from its world. */
|
|
13
|
+
export declare const importsFolderName = ".imports";
|
|
14
|
+
/** Where an import stands (D-489): reading the pieces, waiting for the player's start, setting the world there, or done. */
|
|
15
|
+
export interface ImportState {
|
|
16
|
+
title: string;
|
|
17
|
+
/** The document as the player gave it. */
|
|
18
|
+
document: string;
|
|
19
|
+
pieces: number;
|
|
20
|
+
phase: "reading" | "choosing" | "writing" | "done";
|
|
21
|
+
/** The steps done in this phase: pieces read, or folders set. */
|
|
22
|
+
done: number;
|
|
23
|
+
/** The steps of the writing: the folders of pages, then the opening. */
|
|
24
|
+
steps?: string[];
|
|
25
|
+
start?: number;
|
|
26
|
+
/** The character of the document the player plays, when they chose one. */
|
|
27
|
+
character?: string;
|
|
28
|
+
/** Why the last run stopped; the next call of import tries it again. */
|
|
29
|
+
failed?: string;
|
|
30
|
+
/** What the engine's check found wrong in the adventure, for the helper's one more try. */
|
|
31
|
+
fix?: string;
|
|
32
|
+
/** Read by the master in the chat, a piece at each call, where no helper is on this computer: its pages go straight into the world. */
|
|
33
|
+
inChat?: boolean;
|
|
34
|
+
/** How the book is told, which the narration follows (Stefano, 21 October): set when the player had chosen nothing, else asked. */
|
|
35
|
+
followed?: {
|
|
36
|
+
author: string;
|
|
37
|
+
story?: string;
|
|
38
|
+
set: boolean;
|
|
39
|
+
};
|
|
40
|
+
/** The day of the world's calendar the story starts on, as the book gives it (Stefano, 21 October): set when the campaign had none, else asked. */
|
|
41
|
+
dated?: {
|
|
42
|
+
date: string;
|
|
43
|
+
set: boolean;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** A starting point the reading proposed, as notes/starts.md writes it. */
|
|
47
|
+
export interface ImportStart {
|
|
48
|
+
number: number;
|
|
49
|
+
title: string;
|
|
50
|
+
text: string;
|
|
51
|
+
}
|
|
52
|
+
/** The folder of an import, by the name its title gives a folder. */
|
|
53
|
+
export declare function importFolder(root: string, name: string): string;
|
|
54
|
+
/** The import not yet done, if any: one at a time. */
|
|
55
|
+
export declare function openImport(root: string): {
|
|
56
|
+
folder: string;
|
|
57
|
+
state: ImportState;
|
|
58
|
+
} | undefined;
|
|
59
|
+
/** The titles of the imports done, which package install may add. */
|
|
60
|
+
export declare function doneImports(root: string): string[];
|
|
61
|
+
/** How far an import is; one whose import.yaml does not read is stopped, under its folder's name, for the master to drop it. */
|
|
62
|
+
export declare function readImportState(folder: string): ImportState | undefined;
|
|
63
|
+
/** How long ago the import's mark was last written, in milliseconds; undefined without one. */
|
|
64
|
+
export declare function importAge(folder: string): number | undefined;
|
|
65
|
+
/** The mark written; never once the import was dropped, so that a run ending late does not bring its folder back. */
|
|
66
|
+
export declare function writeImportState(folder: string, state: ImportState): void;
|
|
67
|
+
/**
|
|
68
|
+
* Takes the import for this process, so that a second one, a command line beside the MCP server, never reads the same piece at the same time: false while
|
|
69
|
+
* another live process holds it.
|
|
70
|
+
*/
|
|
71
|
+
export declare function claimImport(folder: string): boolean;
|
|
72
|
+
/** The live process that runs the import now, other than this one, as the runner the MCP server started apart; undefined when none does. */
|
|
73
|
+
export declare function runElsewhere(folder: string): number | undefined;
|
|
74
|
+
/** Lets the import go, once this process stops running it. */
|
|
75
|
+
export declare function releaseImport(folder: string): void;
|
|
76
|
+
/** The import's folder made from a document: its text in pieces, each part headed by its label, its pictures, and the mark at the start of the reading. */
|
|
77
|
+
export declare function prepareImport(folder: string, title: string, document: string, text: ImportedText): ImportState;
|
|
78
|
+
/** The starting points the reading proposed, in their order. */
|
|
79
|
+
export declare function importStarts(folder: string): ImportStart[];
|
|
80
|
+
/** The pages written so far, by their folder, each with its other names. */
|
|
81
|
+
export declare function importedPages(folder: string): Record<string, string[]>;
|
|
82
|
+
/** How a novel or a story is told, as the reading wrote it in notes/style.yaml: its author, and how it is built; nothing for a module or notes. */
|
|
83
|
+
export declare function importStyle(folder: string): {
|
|
84
|
+
author?: string;
|
|
85
|
+
story?: string;
|
|
86
|
+
};
|
|
87
|
+
/** The day of the world's calendar the chosen start falls on, as notes/start.yaml writes it; undefined when the document gives none. */
|
|
88
|
+
export declare function importDate(folder: string): string | undefined;
|
|
89
|
+
/** A piece of the document as it was written in the import's folder. */
|
|
90
|
+
export declare function importPiece(folder: string, index: number): string;
|
|
91
|
+
/** Whether the campaign has an import in this folder, done or not. */
|
|
92
|
+
export declare function hasImport(folder: string): boolean;
|
|
93
|
+
/** A document being opened for an import, before its folder is made (D-491 (11)): its title, the process that reads it, and how far the OCR is. */
|
|
94
|
+
export interface OpeningImport {
|
|
95
|
+
title: string;
|
|
96
|
+
pid: number;
|
|
97
|
+
/** Its pages read from their pictures so far, of those that have no readable text. */
|
|
98
|
+
ocr?: {
|
|
99
|
+
done: number;
|
|
100
|
+
of: number;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/** Marks a document being opened for an import by this process, as the dashboard tells it while the master waits: false while another live process opens one. */
|
|
104
|
+
export declare function beginOpening(root: string, title: string): boolean;
|
|
105
|
+
/** Marks again how far the OCR is, while the mark is still this process's: one dropped by cancel stays dropped. */
|
|
106
|
+
export declare function markOpening(root: string, opening: OpeningImport): void;
|
|
107
|
+
/** The document being opened for an import now, if a live process is opening one; a mark left by a process that is gone is taken away. */
|
|
108
|
+
export declare function openingImport(root: string): OpeningImport | undefined;
|
|
109
|
+
/** Whether the document being opened is still this process's: false once cancel dropped it. */
|
|
110
|
+
export declare function isOwnOpening(root: string): boolean;
|
|
111
|
+
/** The mark taken away: this process's once its document is open or failed to open, or any, as cancel drops it. */
|
|
112
|
+
export declare function clearOpening(root: string, own?: boolean): void;
|
|
113
|
+
/** The import's folder gone, the player's document untouched. */
|
|
114
|
+
export declare function dropImport(folder: string): void;
|
|
115
|
+
/**
|
|
116
|
+
* The document's text taken out of the import's folder once the import is done (LIB-8); its pictures too when the adventure has copied those its pages show,
|
|
117
|
+
* else they stay for the master writing them in the chat.
|
|
118
|
+
*/
|
|
119
|
+
export declare function dropDocumentText(folder: string, pictures?: boolean): void;
|
|
120
|
+
/** A file the helper wrote in the import's folder, such as notes/invented.md; undefined when it wrote none. */
|
|
121
|
+
export declare function importFile(folder: string, path: string): string | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The adventure finished: the pictures its pages show copied into it, its manifest given the campaign's language and the document's license, as an open one
|
|
124
|
+
* allows sharing and anything else keeps it to the player (D-489 (6)).
|
|
125
|
+
*/
|
|
126
|
+
export declare function finishAdventure(folder: string, title: string, language: string): void;
|
|
127
|
+
/** The license as a shared adventure may carry it: public domain or a Creative Commons one that allows adapting; undefined for any other or none. */
|
|
128
|
+
export declare function openLicense(license: string): string | undefined;
|
|
129
|
+
/** The file of a piece of the document, from the first. */
|
|
130
|
+
export declare function pieceName(index: number): string;
|
|
131
|
+
/** How long a text is, in words: a Chinese, Japanese or Korean letter counts as one, as a model reads it; else about six letters a word. */
|
|
132
|
+
export declare function textSize(text: string): number;
|