rpg-engine 0.7.0 → 0.9.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/dist/adventures/index.d.ts +1 -1
- package/dist/adventures/index.js +1 -1
- package/dist/adventures/source.js +13 -13
- package/dist/campaign/create-campaign.js +10 -1
- package/dist/campaign/host-files.d.ts +2 -1
- package/dist/campaign/host-files.js +11 -11
- package/dist/campaign/index.d.ts +1 -1
- package/dist/campaign/index.js +1 -1
- package/dist/campaign/settings.d.ts +55 -64
- package/dist/campaign/settings.js +171 -174
- package/dist/{cli.js → cli/cli.js} +3 -3
- package/dist/{command-line.d.ts → cli/command-line.d.ts} +1 -1
- package/dist/{command-line.js → cli/command-line.js} +21 -20
- package/dist/commands/advance.d.ts +1 -1
- package/dist/commands/advance.js +7 -7
- package/dist/commands/ask.d.ts +1 -8
- package/dist/commands/ask.js +16 -29
- package/dist/commands/{change.d.ts → change/change.d.ts} +2 -2
- package/dist/commands/{change.js → change/change.js} +46 -52
- package/dist/commands/{game-damage.d.ts → change/damage.d.ts} +2 -2
- package/dist/commands/{game-damage.js → change/damage.js} +3 -3
- package/dist/commands/{game-recipe-pace.d.ts → change/recipe-pace.d.ts} +2 -2
- package/dist/commands/{game-recipe-pace.js → change/recipe-pace.js} +4 -4
- package/dist/commands/config.d.ts +4 -4
- package/dist/commands/config.js +142 -138
- package/dist/commands/effect.d.ts +1 -1
- package/dist/commands/effect.js +11 -12
- package/dist/commands/find.d.ts +4 -4
- package/dist/commands/find.js +2 -2
- package/dist/commands/image.js +6 -6
- package/dist/commands/{import.d.ts → import/import.d.ts} +2 -2
- package/dist/commands/{import.js → import/import.js} +101 -101
- package/dist/commands/{game-import.d.ts → import/run.d.ts} +3 -3
- package/dist/commands/{game-import.js → import/run.js} +13 -12
- package/dist/commands/index.js +7 -7
- package/dist/commands/init.js +3 -3
- package/dist/commands/install.js +1 -1
- package/dist/commands/instructions.js +6 -6
- package/dist/commands/mode.d.ts +2 -2
- package/dist/commands/mode.js +8 -8
- package/dist/commands/mood.js +4 -4
- package/dist/commands/move.js +13 -20
- package/dist/commands/package.d.ts +2 -2
- package/dist/commands/package.js +138 -93
- package/dist/commands/rename.js +3 -3
- package/dist/commands/reveal.js +29 -18
- package/dist/commands/{roll.d.ts → roll/roll.d.ts} +4 -4
- package/dist/commands/{roll.js → roll/roll.js} +69 -69
- package/dist/commands/{game-tables.d.ts → roll/tables.d.ts} +2 -2
- package/dist/commands/{game-tables.js → roll/tables.js} +4 -4
- package/dist/commands/rules.d.ts +2 -2
- package/dist/commands/rules.js +17 -9
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/save.js +18 -18
- package/dist/commands/scene.d.ts +4 -4
- package/dist/commands/scene.js +31 -28
- package/dist/commands/{game-advance.d.ts → shared/advance.d.ts} +4 -4
- package/dist/commands/{game-advance.js → shared/advance.js} +27 -27
- package/dist/commands/{game-adventures.d.ts → shared/adventures.d.ts} +3 -3
- package/dist/commands/{game-adventures.js → shared/adventures.js} +20 -27
- package/dist/commands/{game-bonds.d.ts → shared/bonds.d.ts} +3 -3
- package/dist/commands/{game-bonds.js → shared/bonds.js} +2 -2
- package/dist/commands/{game-checks.d.ts → shared/checks.d.ts} +3 -3
- package/dist/commands/{game-checks.js → shared/checks.js} +7 -7
- package/dist/commands/{game-dice-pool.d.ts → shared/dice-pool.d.ts} +3 -3
- package/dist/commands/{game-dice-pool.js → shared/dice-pool.js} +19 -12
- package/dist/commands/{effect-layer.d.ts → shared/effect-layer.d.ts} +2 -2
- package/dist/commands/{effect-layer.js → shared/effect-layer.js} +12 -12
- package/dist/commands/{game-effects.d.ts → shared/effects.d.ts} +7 -7
- package/dist/commands/{game-effects.js → shared/effects.js} +19 -19
- package/dist/commands/{game-environment.d.ts → shared/environment.d.ts} +1 -1
- package/dist/commands/{game-environment.js → shared/environment.js} +3 -3
- package/dist/commands/{game-events.d.ts → shared/events.d.ts} +5 -5
- package/dist/commands/{game-events.js → shared/events.js} +20 -22
- package/dist/commands/{game-examples.d.ts → shared/examples.d.ts} +4 -8
- package/dist/commands/{game-examples.js → shared/examples.js} +23 -23
- package/dist/commands/{game-experience.d.ts → shared/experience.d.ts} +2 -2
- package/dist/commands/{game-experience.js → shared/experience.js} +8 -11
- package/dist/commands/{game-grid-moves.d.ts → shared/grid-moves.d.ts} +6 -6
- package/dist/commands/{game-grid-moves.js → shared/grid-moves.js} +5 -5
- package/dist/commands/{game-grids.d.ts → shared/grids.d.ts} +4 -9
- package/dist/commands/{game-grids.js → shared/grids.js} +20 -19
- package/dist/commands/{game-images.d.ts → shared/images.d.ts} +3 -3
- package/dist/commands/{game-images.js → shared/images.js} +7 -6
- package/dist/commands/shared/inputs.d.ts +9 -0
- package/dist/commands/shared/inputs.js +12 -0
- package/dist/commands/{game-journey.d.ts → shared/journey.d.ts} +4 -6
- package/dist/commands/{game-journey.js → shared/journey.js} +13 -15
- package/dist/commands/{game-knowledge.d.ts → shared/knowledge.d.ts} +15 -8
- package/dist/commands/{game-knowledge.js → shared/knowledge.js} +56 -44
- package/dist/{library-reader.js → commands/shared/library-reader.js} +4 -4
- package/dist/commands/{game-library.d.ts → shared/library.d.ts} +7 -4
- package/dist/commands/{game-library.js → shared/library.js} +70 -50
- package/dist/commands/{game-limits.d.ts → shared/limits.d.ts} +3 -3
- package/dist/commands/{game-limits.js → shared/limits.js} +3 -3
- package/dist/commands/{game-loot.d.ts → shared/loot.d.ts} +2 -2
- package/dist/commands/{game-loot.js → shared/loot.js} +3 -3
- package/dist/commands/{game-master-rolls.d.ts → shared/master-rolls.d.ts} +2 -2
- package/dist/commands/{game-master-rolls.js → shared/master-rolls.js} +6 -6
- package/dist/commands/{game-mode.d.ts → shared/mode.d.ts} +4 -6
- package/dist/commands/{game-mode.js → shared/mode.js} +10 -10
- package/dist/commands/{game-money.d.ts → shared/money.d.ts} +3 -3
- package/dist/commands/{game-money.js → shared/money.js} +4 -4
- package/dist/commands/{game-moods.d.ts → shared/moods.d.ts} +3 -3
- package/dist/commands/{game-moods.js → shared/moods.js} +3 -3
- package/dist/commands/{game-moves.d.ts → shared/moves.d.ts} +2 -2
- package/dist/commands/{game-moves.js → shared/moves.js} +5 -5
- package/dist/commands/{game-offers.d.ts → shared/offers.d.ts} +3 -3
- package/dist/commands/{game-offers.js → shared/offers.js} +9 -12
- package/dist/commands/{game-outside.d.ts → shared/outside.d.ts} +3 -3
- package/dist/commands/{game-outside.js → shared/outside.js} +9 -9
- package/dist/commands/{game-catalog.d.ts → shared/packages/catalog.d.ts} +1 -3
- package/dist/commands/{game-catalog.js → shared/packages/catalog.js} +17 -22
- package/dist/commands/{game-package-code.d.ts → shared/packages/code.d.ts} +10 -14
- package/dist/commands/{game-package-code.js → shared/packages/code.js} +156 -59
- package/dist/commands/{game-extension-list.d.ts → shared/packages/extensions.d.ts} +6 -6
- package/dist/commands/{game-extension-list.js → shared/packages/extensions.js} +43 -22
- package/dist/commands/{game-package-hooks.d.ts → shared/packages/hooks.d.ts} +3 -3
- package/dist/commands/{game-package-hooks.js → shared/packages/hooks.js} +3 -3
- package/dist/commands/{game-widgets.d.ts → shared/packages/widgets.d.ts} +6 -10
- package/dist/commands/{game-widgets.js → shared/packages/widgets.js} +57 -57
- package/dist/commands/{page-counters.d.ts → shared/page-counters.d.ts} +3 -3
- package/dist/commands/{page-counters.js → shared/page-counters.js} +5 -5
- package/dist/{page-words.d.ts → commands/shared/page-words.d.ts} +2 -2
- package/dist/{page-words.js → commands/shared/page-words.js} +5 -4
- package/dist/commands/{parts.d.ts → shared/parts.d.ts} +3 -3
- package/dist/commands/{parts.js → shared/parts.js} +4 -4
- package/dist/commands/{game-positions.d.ts → shared/positions.d.ts} +3 -5
- package/dist/commands/{game-positions.js → shared/positions.js} +6 -7
- package/dist/commands/{problems.d.ts → shared/problems.d.ts} +3 -3
- package/dist/commands/{problems.js → shared/problems.js} +21 -22
- package/dist/commands/{progression.d.ts → shared/progression.d.ts} +2 -2
- package/dist/commands/{progression.js → shared/progression.js} +4 -4
- package/dist/commands/{game-quests.d.ts → shared/quests.d.ts} +4 -4
- package/dist/commands/{game-quests.js → shared/quests.js} +6 -6
- package/dist/commands/{game-recipes.d.ts → shared/recipes.d.ts} +3 -3
- package/dist/commands/{game-recipes.js → shared/recipes.js} +3 -3
- package/dist/commands/{game-reminders.d.ts → shared/reminders.d.ts} +4 -4
- package/dist/commands/{game-reminders.js → shared/reminders.js} +4 -4
- package/dist/commands/{game-roads.d.ts → shared/roads.d.ts} +5 -5
- package/dist/commands/{game-roads.js → shared/roads.js} +43 -44
- package/dist/commands/{game-rules.d.ts → shared/rules.d.ts} +13 -5
- package/dist/commands/shared/rules.js +66 -0
- package/dist/commands/{game-saves.d.ts → shared/saves.d.ts} +4 -4
- package/dist/commands/{game-saves.js → shared/saves.js} +51 -51
- package/dist/commands/{game-scene.d.ts → shared/scene.d.ts} +13 -3
- package/dist/commands/{game-scene.js → shared/scene.js} +41 -13
- package/dist/commands/{sheet.d.ts → shared/sheet.d.ts} +5 -5
- package/dist/commands/{sheet.js → shared/sheet.js} +76 -76
- package/dist/commands/{game-stacks.d.ts → shared/stacks.d.ts} +2 -9
- package/dist/commands/{game-stacks.js → shared/stacks.js} +22 -22
- package/dist/commands/{game-theme.d.ts → shared/theme.d.ts} +3 -3
- package/dist/commands/{game-theme.js → shared/theme.js} +2 -2
- package/dist/commands/{game-thoughts.d.ts → shared/thoughts.d.ts} +2 -4
- package/dist/commands/{game-thoughts.js → shared/thoughts.js} +6 -8
- package/dist/commands/{game-thresholds.d.ts → shared/thresholds.d.ts} +1 -1
- package/dist/commands/{game-thresholds.js → shared/thresholds.js} +4 -4
- package/dist/commands/{game-time.d.ts → shared/time.d.ts} +4 -4
- package/dist/commands/{game-time.js → shared/time.js} +6 -6
- package/dist/commands/{game-turn-uses.d.ts → shared/turn-uses.d.ts} +3 -3
- package/dist/commands/{game-turn-uses.js → shared/turn-uses.js} +12 -15
- package/dist/commands/{game-upkeep.d.ts → shared/upkeep.d.ts} +3 -3
- package/dist/commands/{game-upkeep.js → shared/upkeep.js} +69 -57
- package/dist/commands/{game-voices.d.ts → shared/voices.d.ts} +1 -1
- package/dist/commands/{game-voices.js → shared/voices.js} +2 -2
- package/dist/commands/{worked-out.d.ts → shared/worked-out.d.ts} +3 -8
- package/dist/commands/{worked-out.js → shared/worked-out.js} +238 -238
- package/dist/commands/{game-world.d.ts → shared/world.d.ts} +5 -14
- package/dist/commands/{game-world.js → shared/world.js} +72 -76
- package/dist/commands/show.d.ts +4 -1
- package/dist/commands/show.js +36 -18
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.js +28 -28
- package/dist/commands/thoughts.js +3 -3
- package/dist/commands/trade.js +9 -10
- package/dist/commands/translate.d.ts +1 -1
- package/dist/commands/translate.js +3 -3
- package/dist/commands/{game-open.d.ts → travel/open.d.ts} +3 -3
- package/dist/commands/{game-open.js → travel/open.js} +4 -5
- package/dist/commands/{route.d.ts → travel/route.d.ts} +1 -1
- package/dist/commands/{route.js → travel/route.js} +9 -10
- package/dist/commands/{travel.d.ts → travel/travel.d.ts} +2 -2
- package/dist/commands/{travel.js → travel/travel.js} +19 -21
- package/dist/commands/validate.js +5 -5
- package/dist/commands/{game-view-journal.d.ts → view/journal.d.ts} +5 -5
- package/dist/commands/{game-view-journal.js → view/journal.js} +5 -5
- package/dist/commands/{game-view-map.d.ts → view/map.d.ts} +3 -3
- package/dist/commands/{game-view-map.js → view/map.js} +15 -16
- package/dist/commands/{game-view-place.d.ts → view/place.d.ts} +6 -6
- package/dist/commands/{game-view-place.js → view/place.js} +108 -108
- package/dist/commands/{view.d.ts → view/view.d.ts} +16 -16
- package/dist/commands/{view.js → view/view.js} +41 -36
- package/dist/commands/{game-view-world.d.ts → view/world.d.ts} +4 -4
- package/dist/commands/{game-view-world.js → view/world.js} +7 -7
- package/dist/commands/{game-here.d.ts → write/here.d.ts} +5 -3
- package/dist/commands/{game-here.js → write/here.js} +18 -12
- package/dist/commands/{write.d.ts → write/write.d.ts} +6 -6
- package/dist/commands/{write.js → write/write.js} +44 -41
- package/dist/confirm/confirm.d.ts +2 -0
- package/dist/confirm/confirm.js +15 -5
- package/dist/core/consents.d.ts +3 -2
- package/dist/core/consents.js +43 -4
- package/dist/core/context.d.ts +8 -6
- package/dist/core/context.js +4 -2
- package/dist/core/download.js +16 -5
- package/dist/core/files.d.ts +8 -1
- package/dist/core/files.js +53 -21
- package/dist/core/formula.d.ts +7 -2
- package/dist/core/formula.js +63 -66
- package/dist/core/instruction-parts.js +1 -1
- package/dist/core/mood.d.ts +0 -1
- package/dist/core/mood.js +3 -3
- package/dist/core/package-api.d.ts +11 -0
- package/dist/core/package-api.js +2 -1
- package/dist/core/package-declarations.d.ts +9 -9
- package/dist/core/package-declarations.js +3 -3
- package/dist/core/process-mark.d.ts +8 -0
- package/dist/core/process-mark.js +72 -0
- package/dist/core/registry.d.ts +5 -0
- package/dist/core/registry.js +10 -0
- package/dist/core/session-store.d.ts +0 -1
- package/dist/core/session-store.js +11 -14
- package/dist/core/store.d.ts +4 -0
- package/dist/core/store.js +29 -8
- package/dist/core/text.d.ts +4 -0
- package/dist/core/text.js +11 -2
- package/dist/core/yaml-file.js +2 -2
- package/dist/dashboard/{acts.js → acts/acts.js} +2 -2
- package/dist/dashboard/{act-names.js → acts/names.js} +1 -1
- package/dist/dashboard/{act-sheet.js → acts/sheet.js} +3 -3
- package/dist/dashboard/{act-strip.js → acts/strip.js} +2 -2
- package/dist/dashboard/app.js +13 -13
- package/dist/dashboard/asked.js +1 -1
- package/dist/dashboard/dice/burn.js +1 -1
- package/dist/dashboard/dice/stage.js +1 -1
- package/dist/dashboard/game-words.js +4 -4
- package/dist/dashboard/{guide-blocks.js → help/blocks.js} +1 -1
- package/dist/dashboard/{help.js → help/help.js} +6 -6
- package/dist/dashboard/journal.js +1 -1
- package/dist/dashboard/kit.js +6 -5
- package/dist/dashboard/labels.js +7 -3
- package/dist/dashboard/markdown.js +1 -1
- package/dist/dashboard/{ask-card.js → packages/ask-card.js} +6 -6
- package/dist/dashboard/{package-page.js → packages/package-page.js} +3 -3
- package/dist/dashboard/{packages.js → packages/packages.js} +12 -12
- package/dist/dashboard/{page-code.js → packages/page-code.js} +4 -4
- package/dist/dashboard/{extension-widgets.js → packages/widgets.js} +5 -5
- package/dist/dashboard/party.js +1 -1
- package/dist/dashboard/person-panel.js +2 -13
- package/dist/dashboard/{map-sheet.js → place/map-sheet.js} +4 -4
- package/dist/dashboard/{place-map-view.js → place/map-view.js} +11 -11
- package/dist/dashboard/scene.js +4 -4
- package/dist/dashboard/settings.js +1 -1
- package/dist/dashboard/sheet.js +4 -4
- package/dist/dashboard/text.js +6 -0
- package/dist/dashboard/top.js +2 -2
- package/dist/dashboard/turns.js +2 -2
- package/dist/dashboard/widgets.js +1 -1
- package/dist/dashboard/{world-calendar.js → world/calendar.js} +7 -7
- package/dist/dashboard/{lore.js → world/known.js} +1 -1
- package/dist/dashboard/{world-lore.js → world/lore.js} +9 -9
- package/dist/dashboard/{world-map.js → world/map.js} +1 -1
- package/dist/dashboard/{world.js → world/world.js} +14 -14
- package/dist/dice/evaluate.js +1 -1
- package/dist/dice/index.d.ts +2 -2
- package/dist/dice/index.js +2 -2
- package/dist/dice/notation.d.ts +2 -0
- package/dist/dice/notation.js +22 -4
- package/dist/documents/markup.js +2 -2
- package/dist/documents/read.js +29 -13
- package/dist/effects/effect.js +2 -5
- package/dist/extensions/extension.js +6 -8
- package/dist/extensions/index.d.ts +1 -4
- package/dist/extensions/index.js +1 -4
- package/dist/extensions/words.js +2 -1
- package/dist/{pictures → helpers}/briefs.js +17 -14
- package/dist/{pictures → helpers}/claude.js +8 -18
- package/dist/{pictures → helpers}/codex.js +3 -15
- package/dist/helpers/index.d.ts +7 -0
- package/dist/helpers/index.js +9 -0
- package/dist/{pictures/helpers.d.ts → helpers/programs.d.ts} +6 -1
- package/dist/{pictures/helpers.js → helpers/programs.js} +16 -2
- package/dist/images/images.js +7 -5
- package/dist/images/index.d.ts +1 -1
- package/dist/images/index.js +1 -1
- package/dist/importer/index.d.ts +1 -1
- package/dist/importer/index.js +1 -1
- package/dist/importer/work.d.ts +0 -2
- package/dist/importer/work.js +9 -30
- package/dist/instructions/index.d.ts +2 -0
- package/dist/instructions/index.js +10 -0
- package/dist/languages/index.d.ts +1 -1
- package/dist/languages/index.js +1 -1
- package/dist/languages/language-pack.js +15 -3
- package/dist/library/books.js +29 -83
- package/dist/{extensions → packages}/engine.d.ts +1 -1
- package/dist/{extensions → packages}/engine.js +1 -1
- package/dist/packages/index.d.ts +3 -0
- package/dist/packages/index.js +4 -0
- package/dist/{extensions/packages.d.ts → packages/npm.d.ts} +2 -0
- package/dist/{extensions/packages.js → packages/npm.js} +74 -45
- package/dist/page.d.ts +9 -11
- package/dist/page.js +1 -2
- package/dist/pages/check.js +31 -40
- package/dist/pages/containers.js +20 -20
- package/dist/pages/environment.js +15 -15
- package/dist/pages/index.d.ts +9 -9
- package/dist/pages/index.js +9 -9
- package/dist/pages/inheritance.d.ts +2 -1
- package/dist/pages/inheritance.js +24 -24
- package/dist/pages/load.js +7 -7
- package/dist/pages/maps.d.ts +20 -0
- package/dist/pages/maps.js +51 -1
- package/dist/pages/markdown.d.ts +2 -0
- package/dist/pages/markdown.js +110 -79
- package/dist/pages/page-file.d.ts +2 -1
- package/dist/pages/page-file.js +31 -29
- package/dist/pages/rename-page.d.ts +4 -1
- package/dist/pages/rename-page.js +7 -3
- package/dist/pages/{stack-entry.d.ts → stacks/entry.d.ts} +0 -2
- package/dist/pages/{stack-entry.js → stacks/entry.js} +2 -6
- package/dist/pages/{stacks.d.ts → stacks/kinds.d.ts} +8 -1
- package/dist/pages/{stacks.js → stacks/kinds.js} +36 -41
- package/dist/pages/{stack-writes.d.ts → stacks/writes.d.ts} +2 -2
- package/dist/pages/{stack-writes.js → stacks/writes.js} +32 -32
- package/dist/pages/system-pages.js +15 -15
- package/dist/pages/world.d.ts +4 -0
- package/dist/pages/world.js +52 -20
- package/dist/pages/write-page.js +35 -34
- package/dist/player-notes/index.d.ts +1 -1
- package/dist/player-notes/index.js +1 -1
- package/dist/rules/page-search.js +3 -4
- package/dist/rules/rule-book.js +1 -1
- package/dist/rules/search.js +21 -21
- package/dist/rules/shown.js +1 -3
- package/dist/saves/saves.d.ts +2 -2
- package/dist/saves/saves.js +15 -3
- package/dist/{bell-listener.js → server/bell-listener.js} +3 -3
- package/dist/server/dashboard/files.d.ts +59 -0
- package/dist/server/dashboard/files.js +326 -0
- package/dist/server/dashboard/index.d.ts +114 -0
- package/dist/server/dashboard/index.js +419 -0
- package/dist/server/dashboard/news.d.ts +39 -0
- package/dist/server/dashboard/news.js +390 -0
- package/dist/server/dashboard/player.d.ts +48 -0
- package/dist/server/dashboard/player.js +242 -0
- package/dist/server/dashboard/ports.d.ts +10 -0
- package/dist/server/dashboard/ports.js +15 -0
- package/dist/server/dashboard/writes.d.ts +58 -0
- package/dist/server/dashboard/writes.js +492 -0
- package/dist/{mcp-server.d.ts → server/mcp.d.ts} +2 -2
- package/dist/{mcp-server.js → server/mcp.js} +57 -42
- package/dist/systems/game-system.d.ts +5 -3
- package/dist/systems/game-system.js +178 -149
- package/dist/systems/index.d.ts +1 -1
- package/dist/systems/index.js +1 -1
- package/dist/{testing.d.ts → testing/index.d.ts} +6 -6
- package/dist/{testing.js → testing/index.js} +32 -18
- package/dist/{system-checks.js → testing/system-checks.js} +18 -12
- package/dist/themes/theme.d.ts +3 -3
- package/dist/themes/theme.js +14 -14
- package/dist/time/calendar.js +5 -2
- package/dist/triggers/trigger.js +5 -8
- package/instructions/dashboard-guide.md +2 -1
- package/instructions/play.md +1 -1
- package/package.json +5 -5
- package/dist/commands/game-maps.d.ts +0 -20
- package/dist/commands/game-maps.js +0 -51
- package/dist/commands/game-rules.js +0 -36
- package/dist/dashboard-server.d.ts +0 -47
- package/dist/dashboard-server.js +0 -1830
- package/dist/pictures/index.d.ts +0 -7
- package/dist/pictures/index.js +0 -9
- /package/dist/{cli.d.ts → cli/cli.d.ts} +0 -0
- /package/dist/{library-reader.d.ts → commands/shared/library-reader.d.ts} +0 -0
- /package/dist/commands/{notes.d.ts → shared/notes.d.ts} +0 -0
- /package/dist/commands/{notes.js → shared/notes.js} +0 -0
- /package/dist/dashboard/{guide-markdown.js → help/markdown.js} +0 -0
- /package/dist/dashboard/{pack-card.js → packages/card.js} +0 -0
- /package/dist/dashboard/{people.js → packages/people.js} +0 -0
- /package/dist/dashboard/{place-map.js → place/map.js} +0 -0
- /package/dist/dashboard/{calendar.js → world/days.js} +0 -0
- /package/dist/{pictures → helpers}/briefs.d.ts +0 -0
- /package/dist/{pictures → helpers}/chosen.d.ts +0 -0
- /package/dist/{pictures → helpers}/chosen.js +0 -0
- /package/dist/{pictures → helpers}/claude.d.ts +0 -0
- /package/dist/{pictures → helpers}/codex.d.ts +0 -0
- /package/dist/{pictures → helpers}/stop.d.ts +0 -0
- /package/dist/{pictures → helpers}/stop.js +0 -0
- /package/dist/{pictures → helpers}/svg.d.ts +0 -0
- /package/dist/{pictures → helpers}/svg.js +0 -0
- /package/dist/{extensions → packages}/tarball.d.ts +0 -0
- /package/dist/{extensions → packages}/tarball.js +0 -0
- /package/dist/{bell-listener.d.ts → server/bell-listener.d.ts} +0 -0
- /package/dist/{player-acts.d.ts → server/player-acts.d.ts} +0 -0
- /package/dist/{player-acts.js → server/player-acts.js} +0 -0
- /package/dist/{system-checks.d.ts → testing/system-checks.d.ts} +0 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
// The player through the page (D-279): the master's question on every page open, the click, the words or the square that settle it, and the pages it
|
|
2
|
+
// waits on, seen or not (D-455).
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { findCampaign, readTextSetting } from "../../campaign/index.js";
|
|
6
|
+
import { campaignSystem } from "../../commands/shared/world.js";
|
|
7
|
+
import { playerWait } from "../../core/context.js";
|
|
8
|
+
import { withFiles } from "../../core/store.js";
|
|
9
|
+
import { rollName } from "../../systems/index.js";
|
|
10
|
+
import { mostSaid, readBody, securityHeaders, sendJson } from "./files.js";
|
|
11
|
+
/**
|
|
12
|
+
* The player through the page (D-279): the question shows on every page open, and the first click settles it; with no page open, "absent", so that ask turns to
|
|
13
|
+
* the form or to words. A stop of the call takes the question away and nothing is logged (ASK-9).
|
|
14
|
+
*/
|
|
15
|
+
export function pagePlayer(served) {
|
|
16
|
+
// The card the last question on the page was asked in, which the call that asked it leaves as it ends, and how many were put (D-507).
|
|
17
|
+
let cardKey;
|
|
18
|
+
let questions = 0;
|
|
19
|
+
const put = (question, title, labels, signal, more = {}) => {
|
|
20
|
+
if (served.pages.size === 0) {
|
|
21
|
+
return Promise.resolve("absent");
|
|
22
|
+
}
|
|
23
|
+
// A call stopped before its question was put on the page asks nothing (ASK-9).
|
|
24
|
+
if (signal?.aborted === true) {
|
|
25
|
+
return Promise.resolve(undefined);
|
|
26
|
+
}
|
|
27
|
+
// A question asked again, as after a summary, takes the place of the one before; and of a card left from before.
|
|
28
|
+
served.asked?.settle(undefined);
|
|
29
|
+
served.card = undefined;
|
|
30
|
+
return new Promise((done) => {
|
|
31
|
+
const timer = setTimeout(() => settle(undefined), playerWait).unref();
|
|
32
|
+
const settle = (choice) => {
|
|
33
|
+
clearTimeout(timer);
|
|
34
|
+
signal?.removeEventListener("abort", stop);
|
|
35
|
+
if (served.asked?.id === asked.id) {
|
|
36
|
+
served.asked = undefined;
|
|
37
|
+
served.notify();
|
|
38
|
+
}
|
|
39
|
+
done(choice);
|
|
40
|
+
};
|
|
41
|
+
const stop = () => settle(undefined);
|
|
42
|
+
const asked = { id: randomUUID(), question, title, labels, ...more, settle };
|
|
43
|
+
served.asked = asked;
|
|
44
|
+
questions += 1;
|
|
45
|
+
cardKey = more.rows?.card?.key ?? cardKey;
|
|
46
|
+
readCard(served, more.rows?.card, (card) => {
|
|
47
|
+
if (served.asked === asked) {
|
|
48
|
+
asked.card = card;
|
|
49
|
+
served.notify();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
signal?.addEventListener("abort", stop);
|
|
53
|
+
served.notify();
|
|
54
|
+
watchHidden(served);
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
return {
|
|
58
|
+
asking: () => served.asked !== undefined,
|
|
59
|
+
cardEnded(card) {
|
|
60
|
+
// Only a card its questions were asked in on the page.
|
|
61
|
+
if (card.key !== cardKey) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const at = questions;
|
|
65
|
+
readCard(served, card, (read) => {
|
|
66
|
+
// Only while no other question came meanwhile, answered or not.
|
|
67
|
+
if (served.asked === undefined && questions === at) {
|
|
68
|
+
served.card = { ...read, ended: true };
|
|
69
|
+
served.notify();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
async choose(question, title, labels, signal, rows) {
|
|
74
|
+
const chosen = await put(question, title, labels, signal, rows === undefined ? {} : { rows });
|
|
75
|
+
return typeof chosen === "object" && "square" in chosen ? undefined : chosen;
|
|
76
|
+
},
|
|
77
|
+
async chooseSquare(question, title, change, who, signal) {
|
|
78
|
+
// Whose move it is, for the page to show the map of where they stand (D-480 (7)).
|
|
79
|
+
const chosen = await put(question, title, [change], signal, { square: true, rows: { who, fields: [] } });
|
|
80
|
+
return typeof chosen === "number" ? (chosen === 0 ? 0 : undefined) : chosen;
|
|
81
|
+
},
|
|
82
|
+
async spendDice(question, title, done, spending, signal, card) {
|
|
83
|
+
const chosen = await put(question, title, [done], signal, { spending, ...(card === undefined ? {} : { rows: { who: spending.shown().who, fields: [], card } }) });
|
|
84
|
+
// The call stopped, its answer never goes: the dice spent reach the master at the next one, as the player's other news (ASK-14).
|
|
85
|
+
const told = signal?.aborted === true ? spending.spent() : undefined;
|
|
86
|
+
if (told !== undefined) {
|
|
87
|
+
served.events.push(told);
|
|
88
|
+
}
|
|
89
|
+
return chosen === 0 || chosen === "absent" ? chosen : undefined;
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/** By button, the name the campaign's game gives its roll, in the campaign's language (D-399): a check's dice of one kind, as (2d20kh1+5); else null. */
|
|
94
|
+
export function rollNamesOf(labels, served) {
|
|
95
|
+
return withFiles(served.session, () => {
|
|
96
|
+
const root = findCampaign(served.context.folder);
|
|
97
|
+
const system = root === undefined ? undefined : campaignSystem(root, served.context);
|
|
98
|
+
const language = (root === undefined ? undefined : readTextSetting(root, "language")) ?? system?.language ?? "en";
|
|
99
|
+
return labels.map((label) => {
|
|
100
|
+
const dice = (/\(([^()]+)\)$/.exec(label)?.[1] ?? "").split(/[+-]/).filter((term) => /d/i.test(term));
|
|
101
|
+
return system === undefined || dice.length !== 1 ? null : (rollName(system, dice[0] ?? "", language) ?? null);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/** The dice of a rest as the page draws them now (ASK-14); undefined when the campaign does not read, as the question then waits for nothing to show. */
|
|
106
|
+
export function spendShown(spending, served) {
|
|
107
|
+
try {
|
|
108
|
+
return withFiles(served.session, () => spending.shown());
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The page's answer to what the master asks: which button, by its place, or the player's own words (ASK-10); refused for a question no longer asked, so that a
|
|
116
|
+
* late click counts for nothing.
|
|
117
|
+
*/
|
|
118
|
+
export async function answerAsked(request, response, served) {
|
|
119
|
+
const body = await readBody(request);
|
|
120
|
+
const parsed = z.union([
|
|
121
|
+
z.object({ asked: z.string(), choice: z.number().int().min(0) }).strict(),
|
|
122
|
+
z.object({ asked: z.string(), text: z.string().trim().min(1).max(mostSaid) }).strict(),
|
|
123
|
+
z.object({ asked: z.string(), square: z.string().regex(/^[A-Za-z]{1,3}\d{1,3}$/) }).strict(),
|
|
124
|
+
z.object({ asked: z.string(), spend: z.string().trim().min(1).max(100) }).strict(),
|
|
125
|
+
]).safeParse(body);
|
|
126
|
+
const asked = served.asked;
|
|
127
|
+
if (!parsed.success) {
|
|
128
|
+
sendJson(response, 400, {
|
|
129
|
+
error: `Send which button was clicked, { asked, choice }, the player's words, { asked, text }, up to ${mostSaid} characters, a square of the map, { asked, square }, or a die of a rest to spend, { asked, spend }.`,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else if ("spend" in parsed.data) {
|
|
133
|
+
await spendOne(response, served, parsed.data.asked, parsed.data.spend);
|
|
134
|
+
}
|
|
135
|
+
else if (asked === undefined || asked.id !== parsed.data.asked || ("choice" in parsed.data && parsed.data.choice >= asked.labels.length) || ("square" in parsed.data && asked.square !== true)
|
|
136
|
+
// The dice of a rest take no words, which the master would never hear (ASK-14).
|
|
137
|
+
|| ("text" in parsed.data && asked.spending !== undefined)) {
|
|
138
|
+
sendJson(response, 409, { error: "The master no longer asks this." });
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
asked.settle("choice" in parsed.data ? parsed.data.choice : "square" in parsed.data ? { square: parsed.data.square.toUpperCase() } : { said: parsed.data.text });
|
|
142
|
+
sendJson(response, 202, {});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/** The player closed a package's card that its call left (D-507): it is gone on every page and every device, and after a reload. */
|
|
146
|
+
export async function closeCard(request, response, served) {
|
|
147
|
+
const parsed = z.object({ close: z.string().min(1).max(200) }).strict().safeParse(await readBody(request));
|
|
148
|
+
if (!parsed.success) {
|
|
149
|
+
sendJson(response, 400, { error: "Send the key of the card to close: { close }." });
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (served.card?.key === parsed.data.close) {
|
|
153
|
+
served.card = undefined;
|
|
154
|
+
served.notify();
|
|
155
|
+
}
|
|
156
|
+
sendJson(response, 202, {});
|
|
157
|
+
}
|
|
158
|
+
/** Whether a page is seen now, as it says when it comes in sight or goes out of it (D-455): a question on pages no one sees goes to the chat. */
|
|
159
|
+
export async function pageSeen(request, response, served) {
|
|
160
|
+
const parsed = z.object({ page: z.string().min(1).max(64), seen: z.boolean() }).strict().safeParse(await readBody(request));
|
|
161
|
+
if (!parsed.success) {
|
|
162
|
+
sendJson(response, 400, { error: "Send the page's id and whether it is seen: { page, seen }." });
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
served.seen.set(parsed.data.page, parsed.data.seen);
|
|
166
|
+
watchHidden(served);
|
|
167
|
+
sendJson(response, 202, {});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Keeps the page's request open, to tell it "changed" whenever a file of the campaign changes; the page reads again, and comes back by itself after a pause.
|
|
171
|
+
* When the last page closes while the master asks and none comes back soon, the question goes to the form or to words (ASK-1).
|
|
172
|
+
*/
|
|
173
|
+
export function listenForChanges(request, response, served) {
|
|
174
|
+
response.writeHead(200, { ...securityHeaders, "Content-Type": "text/event-stream; charset=utf-8", "Cache-Control": "no-store" });
|
|
175
|
+
response.write("retry: 2000\n\n");
|
|
176
|
+
served.pages.add(response);
|
|
177
|
+
const id = new URL(request.url ?? "/", "http://localhost").searchParams.get("page");
|
|
178
|
+
if (id !== null && id !== "") {
|
|
179
|
+
served.pageIds.set(response, id);
|
|
180
|
+
}
|
|
181
|
+
clearTimeout(served.returning);
|
|
182
|
+
request.on("close", () => {
|
|
183
|
+
served.pages.delete(response);
|
|
184
|
+
served.pageIds.delete(response);
|
|
185
|
+
served.seen.delete(id ?? "");
|
|
186
|
+
watchHidden(served);
|
|
187
|
+
const asked = served.asked;
|
|
188
|
+
if (served.pages.size === 0 && asked !== undefined) {
|
|
189
|
+
clearTimeout(served.returning);
|
|
190
|
+
served.returning = setTimeout(() => served.pages.size === 0 && served.asked === asked && asked.settle("absent"), served.pageReturn).unref();
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/** Reads what a package's card shows, never in the way of its question: given once it answers, with nothing to show when it fails or is late (D-507). */
|
|
195
|
+
function readCard(served, card, read) {
|
|
196
|
+
if (card === undefined) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
void card.shows().then((shows) => read({ widget: card.widget, key: card.key, ...(shows === undefined ? {} : { shows }) }), () => read({ widget: card.widget, key: card.key }));
|
|
200
|
+
}
|
|
201
|
+
/** A die of a rest spent from the page (ASK-14): the engine rolls it and the question stays, read again; refused for a question that asks no dice, or no longer. */
|
|
202
|
+
async function spendOne(response, served, id, field) {
|
|
203
|
+
const asked = served.asked;
|
|
204
|
+
if (asked?.spending === undefined || asked.id !== id) {
|
|
205
|
+
sendJson(response, 409, { error: "The master no longer asks this." });
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
await served.session.ready();
|
|
209
|
+
// The question may have ended while the files were read again, as with the button that ends it from another page.
|
|
210
|
+
if (served.asked !== asked) {
|
|
211
|
+
sendJson(response, 409, { error: "The master no longer asks this." });
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const refused = withFiles(served.session, () => asked.spending?.spend(field));
|
|
215
|
+
served.notify();
|
|
216
|
+
if (refused === undefined) {
|
|
217
|
+
sendJson(response, 202, {});
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
sendJson(response, 409, { error: refused });
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* While a question waits and every open page says no one sees it, as in a tab behind, it goes to the form or to words after a short while (D-455); a page
|
|
225
|
+
* seen again, or one that says nothing of itself, keeps it on the page.
|
|
226
|
+
*/
|
|
227
|
+
function watchHidden(served) {
|
|
228
|
+
const asked = served.asked;
|
|
229
|
+
const unseen = served.pages.size > 0 && [...served.pages].every((page) => served.seen.get(served.pageIds.get(page) ?? "") === false);
|
|
230
|
+
if (asked === undefined || !unseen) {
|
|
231
|
+
clearTimeout(served.hiding);
|
|
232
|
+
served.hiding = undefined;
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
served.hiding ??= setTimeout(() => {
|
|
236
|
+
served.hiding = undefined;
|
|
237
|
+
const still = served.pages.size > 0 && [...served.pages].every((page) => served.seen.get(served.pageIds.get(page) ?? "") === false);
|
|
238
|
+
if (still && served.asked === asked) {
|
|
239
|
+
asked.settle("absent");
|
|
240
|
+
}
|
|
241
|
+
}, served.pageHidden).unref();
|
|
242
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ports the dashboard tries in turn, taking the first that is free: the same link from one chat to the next (D-272). Windows may keep ranges of ports
|
|
3
|
+
* from boot to boot (netsh int ipv4 show excludedportrange): then the next range, and at last any free port, whose link status gives all the same (D-338).
|
|
4
|
+
*/
|
|
5
|
+
export declare const dashboardPorts: number[];
|
|
6
|
+
/**
|
|
7
|
+
* The ports for a campaign's dashboard: its own in each range first, worked out from its folder, then the others (D-353). Its link stays the same from one
|
|
8
|
+
* chat to the next, as long as no other program holds that port, so that the player can keep it, and a page left open comes back by itself.
|
|
9
|
+
*/
|
|
10
|
+
export declare function campaignPorts(root: string): number[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// The ports of the dashboard, apart from its server, so that the doorbell reads them without loading the server and its commands (D-495).
|
|
2
|
+
/**
|
|
3
|
+
* The ports the dashboard tries in turn, taking the first that is free: the same link from one chat to the next (D-272). Windows may keep ranges of ports
|
|
4
|
+
* from boot to boot (netsh int ipv4 show excludedportrange): then the next range, and at last any free port, whose link status gives all the same (D-338).
|
|
5
|
+
*/
|
|
6
|
+
export const dashboardPorts = [...[4747, 5747, 6747, 7747, 8747].flatMap((first) => Array.from({ length: 10 }, (_, index) => first + index)), 0];
|
|
7
|
+
/**
|
|
8
|
+
* The ports for a campaign's dashboard: its own in each range first, worked out from its folder, then the others (D-353). Its link stays the same from one
|
|
9
|
+
* chat to the next, as long as no other program holds that port, so that the player can keep it, and a page left open comes back by itself.
|
|
10
|
+
*/
|
|
11
|
+
export function campaignPorts(root) {
|
|
12
|
+
const offset = [...root.replaceAll("\\", "/").toLowerCase()].reduce((sum, letter) => (sum * 31 + letter.charCodeAt(0)) % 100003, 0) % 10;
|
|
13
|
+
const own = [4747, 5747, 6747, 7747, 8747].map((first) => first + offset);
|
|
14
|
+
return [...own, ...dashboardPorts.filter((port) => !own.includes(port))];
|
|
15
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { Served } from "./index.ts";
|
|
3
|
+
/** What the player does with a package on the page (D-475), or with the library (D-491 (13)). */
|
|
4
|
+
export type PackageAction = "add" | "update" | "remove" | "uninstall" | "library" | "engine";
|
|
5
|
+
/** Where a package's work on the page is: at work, or waiting for the player's yes in a window of their computer (D-478). */
|
|
6
|
+
export type PackagePhase = "working" | "yes";
|
|
7
|
+
/**
|
|
8
|
+
* Runs a command of a package the player may run from its page code (D-510, D-514): one the campaign's packages give with player, whose code runs; as the
|
|
9
|
+
* player's, its output among what the master hears at their next call, quoted as another's words.
|
|
10
|
+
*/
|
|
11
|
+
export declare function runForPlayer(request: IncomingMessage, response: ServerResponse, served: Served): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* One of the player's settings changed on the page (D-341): a value, or an item added to or taken off a list, as config takes it, with the player as who
|
|
14
|
+
* changed it; the master hears of it at the head of their next call. A setting of the master's is refused.
|
|
15
|
+
*/
|
|
16
|
+
export declare function changeSetting(request: IncomingMessage, response: ServerResponse, served: Served): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* A save the player makes on the page, one they go back to, or the campaign started over from its first, as save does, with the player as who did it; the
|
|
19
|
+
* mode of saves allows it or refuses it as in the chat, and starting over needs the campaign's name written. The master hears of it at their next call (D-359).
|
|
20
|
+
*/
|
|
21
|
+
export declare function changeSaves(request: IncomingMessage, response: ServerResponse, served: Served): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* The packages as the page shows them (D-475): the game system, those on this computer with whether the campaign uses them, those it lists and lacks, what npm
|
|
24
|
+
* has when asked, and the one the player is working on now.
|
|
25
|
+
*/
|
|
26
|
+
export declare function packagesNow(response: ServerResponse, served: Served, npm: boolean): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* A package the player updates, takes out of the campaign or off this computer on the page (D-475, D-485), as package does with the player as who did it; the
|
|
29
|
+
* master hears of it at the head of their next call. One not ours is updated with the player's yes in a window of their computer, never the page's click (D-478).
|
|
30
|
+
*/
|
|
31
|
+
export declare function changePackage(request: IncomingMessage, response: ServerResponse, served: Served): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Something the player adds on the page (D-485 (1)): a .zip or a .tgz as the request's body, named by its X-File-Name, or { source }: a link, an npm name or a
|
|
34
|
+
* folder of this computer. The engine tells the kind by what it holds; an adventure is read in memory, a .tgz kept in the player's data folder while npm installs it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function addPackage(request: IncomingMessage, response: ServerResponse, served: Served): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* This computer's library as the page shows it (D-491 (13)): each entry with its books read, being read and skipped, and whether the campaign uses it; and the
|
|
39
|
+
* work under way, if any.
|
|
40
|
+
*/
|
|
41
|
+
export declare function libraryNow(response: ServerResponse, served: Served): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* A folder or a book of the library the player turns on in the campaign on the page, off, or takes off this computer (D-491 (13)), as config does with the
|
|
44
|
+
* player as who did it: one new to the computer with their yes in a window of their computer, never the page's click (D-477); the books are never touched.
|
|
45
|
+
* One work at a time, as the packages'.
|
|
46
|
+
*/
|
|
47
|
+
export declare function changeLibrary(request: IncomingMessage, response: ServerResponse, served: Served): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* rpg-engine itself on the Packages page (D-515 (3)): its version, npm's latest and whether it is newer, and how it is installed, read at each look; its update,
|
|
50
|
+
* from the page alone, globally with npm as it was installed, a development link or another install told and never touched; then how the chat takes it.
|
|
51
|
+
*/
|
|
52
|
+
export declare function engineNow(request: IncomingMessage, response: ServerResponse, served: Served): Promise<void>;
|
|
53
|
+
/** What the page may add (D-485, D-486), from npm and GitHub, read again at most every ten minutes, or when the page asks it fresh. */
|
|
54
|
+
export declare function catalogNow(response: ServerResponse, served: Served, fresh: boolean): Promise<void>;
|
|
55
|
+
/** The campaign exported as an adventure on the page (ADV-7), with the credits the player gives: the name of its file, which the page then downloads. */
|
|
56
|
+
export declare function exportCampaign(request: IncomingMessage, response: ServerResponse, served: Served): Promise<void>;
|
|
57
|
+
/** A zip of the campaign's exports/ folder, for the browser to save: by its name alone, never a path. */
|
|
58
|
+
export declare function exportedFile(response: ServerResponse, served: Served, name: string): void;
|