@jsprismarine/script-host 0.0.0 → 0.23.0-unstable-20261120210452
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/CHANGELOG.md +99 -0
- package/LICENSE +21 -0
- package/README.md +667 -28
- package/dist/ScriptEngine.d.ts +250 -0
- package/dist/ScriptEngine.d.ts.map +1 -0
- package/dist/ScriptEngine.js +427 -0
- package/dist/ScriptEngine.js.map +1 -0
- package/dist/absentGlobals.d.ts +29 -0
- package/dist/absentGlobals.d.ts.map +1 -0
- package/dist/absentGlobals.js +94 -0
- package/dist/absentGlobals.js.map +1 -0
- package/dist/debugger/DebugSession.d.ts +189 -0
- package/dist/debugger/DebugSession.d.ts.map +1 -0
- package/dist/debugger/DebugSession.js +588 -0
- package/dist/debugger/DebugSession.js.map +1 -0
- package/dist/debugger/EngineDebugger.d.ts +158 -0
- package/dist/debugger/EngineDebugger.d.ts.map +1 -0
- package/dist/debugger/EngineDebugger.js +174 -0
- package/dist/debugger/EngineDebugger.js.map +1 -0
- package/dist/debugger/channel.d.ts +67 -0
- package/dist/debugger/channel.d.ts.map +1 -0
- package/dist/debugger/channel.js +120 -0
- package/dist/debugger/channel.js.map +1 -0
- package/dist/debugger/connectionWorker.d.ts +2 -0
- package/dist/debugger/connectionWorker.d.ts.map +1 -0
- package/dist/debugger/connectionWorker.js +98 -0
- package/dist/debugger/connectionWorker.js.map +1 -0
- package/dist/debugger/framing.d.ts +46 -0
- package/dist/debugger/framing.d.ts.map +1 -0
- package/dist/debugger/framing.js +106 -0
- package/dist/debugger/framing.js.map +1 -0
- package/dist/debugger/profiler.d.ts +72 -0
- package/dist/debugger/profiler.d.ts.map +1 -0
- package/dist/debugger/profiler.js +92 -0
- package/dist/debugger/profiler.js.map +1 -0
- package/dist/debugger/protocol.d.ts +170 -0
- package/dist/debugger/protocol.d.ts.map +1 -0
- package/dist/debugger/protocol.js +141 -0
- package/dist/debugger/protocol.js.map +1 -0
- package/dist/debugger/thread.d.ts +85 -0
- package/dist/debugger/thread.d.ts.map +1 -0
- package/dist/debugger/thread.js +134 -0
- package/dist/debugger/thread.js.map +1 -0
- package/dist/debugger/transport.d.ts +80 -0
- package/dist/debugger/transport.d.ts.map +1 -0
- package/dist/debugger/transport.js +150 -0
- package/dist/debugger/transport.js.map +1 -0
- package/dist/engineSource.d.ts +14 -0
- package/dist/engineSource.d.ts.map +1 -0
- package/dist/engineSource.js +17 -0
- package/dist/engineSource.js.map +1 -0
- package/dist/errors.d.ts +62 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +62 -0
- package/dist/errors.js.map +1 -0
- package/dist/ffi.d.ts +63 -0
- package/dist/ffi.d.ts.map +1 -0
- package/dist/ffi.js +156 -0
- package/dist/ffi.js.map +1 -0
- package/dist/generated/script-modules/common.d.ts +2 -0
- package/dist/generated/script-modules/common.js +262 -0
- package/dist/generated/script-modules/common.js.map +1 -0
- package/dist/generated/script-modules/common.json.d.ts +2 -0
- package/dist/generated/script-modules/debug-utilities.d.ts +2 -0
- package/dist/generated/script-modules/debug-utilities.js +23 -0
- package/dist/generated/script-modules/debug-utilities.js.map +1 -0
- package/dist/generated/script-modules/debug-utilities.json.d.ts +2 -0
- package/dist/generated/script-modules/diagnostics.d.ts +2 -0
- package/dist/generated/script-modules/diagnostics.js +281 -0
- package/dist/generated/script-modules/diagnostics.js.map +1 -0
- package/dist/generated/script-modules/diagnostics.json.d.ts +2 -0
- package/dist/generated/script-modules/server-admin.d.ts +2 -0
- package/dist/generated/script-modules/server-admin.js +23 -0
- package/dist/generated/script-modules/server-admin.js.map +1 -0
- package/dist/generated/script-modules/server-admin.json.d.ts +2 -0
- package/dist/generated/script-modules/server-gametest.d.ts +2 -0
- package/dist/generated/script-modules/server-gametest.js +23 -0
- package/dist/generated/script-modules/server-gametest.js.map +1 -0
- package/dist/generated/script-modules/server-gametest.json.d.ts +2 -0
- package/dist/generated/script-modules/server-graphics.d.ts +2 -0
- package/dist/generated/script-modules/server-graphics.js +30 -0
- package/dist/generated/script-modules/server-graphics.js.map +1 -0
- package/dist/generated/script-modules/server-graphics.json.d.ts +2 -0
- package/dist/generated/script-modules/server-net.d.ts +2 -0
- package/dist/generated/script-modules/server-net.js +24 -0
- package/dist/generated/script-modules/server-net.js.map +1 -0
- package/dist/generated/script-modules/server-net.json.d.ts +2 -0
- package/dist/generated/script-modules/server-ui.d.ts +2 -0
- package/dist/generated/script-modules/server-ui.js +110 -0
- package/dist/generated/script-modules/server-ui.js.map +1 -0
- package/dist/generated/script-modules/server-ui.json.d.ts +2 -0
- package/dist/generated/script-modules/server.d.ts +2 -0
- package/dist/generated/script-modules/server.js +251 -0
- package/dist/generated/script-modules/server.js.map +1 -0
- package/dist/generated/script-modules/server.json.d.ts +2 -0
- package/dist/generated/scriptApi.d.ts +3233 -0
- package/dist/generated/scriptApi.d.ts.map +1 -0
- package/dist/generated/scriptApi.js +0 -0
- package/dist/generated/scriptModules.d.ts +13 -0
- package/dist/generated/scriptModules.d.ts.map +1 -0
- package/dist/generated/scriptModules.js +34 -0
- package/dist/generated/scriptModules.js.map +1 -0
- package/dist/host/PackForms.d.ts +71 -0
- package/dist/host/PackForms.d.ts.map +1 -0
- package/dist/host/PackForms.js +164 -0
- package/dist/host/PackForms.js.map +1 -0
- package/dist/host/ScriptForms.d.ts +51 -0
- package/dist/host/ScriptForms.d.ts.map +1 -0
- package/dist/host/ScriptForms.js +103 -0
- package/dist/host/ScriptForms.js.map +1 -0
- package/dist/host/ScriptHttp.d.ts +54 -0
- package/dist/host/ScriptHttp.d.ts.map +1 -0
- package/dist/host/ScriptHttp.js +82 -0
- package/dist/host/ScriptHttp.js.map +1 -0
- package/dist/host/WorldScripts.d.ts +350 -0
- package/dist/host/WorldScripts.d.ts.map +1 -0
- package/dist/host/WorldScripts.js +1421 -0
- package/dist/host/WorldScripts.js.map +1 -0
- package/dist/host/blocksItems/blockComponents.d.ts +27 -0
- package/dist/host/blocksItems/blockComponents.d.ts.map +1 -0
- package/dist/host/blocksItems/blockComponents.js +73 -0
- package/dist/host/blocksItems/blockComponents.js.map +1 -0
- package/dist/host/blocksItems/blocks.d.ts +12 -0
- package/dist/host/blocksItems/blocks.d.ts.map +1 -0
- package/dist/host/blocksItems/blocks.js +247 -0
- package/dist/host/blocksItems/blocks.js.map +1 -0
- package/dist/host/blocksItems/componentFacts.d.ts +14 -0
- package/dist/host/blocksItems/componentFacts.d.ts.map +1 -0
- package/dist/host/blocksItems/componentFacts.js +34 -0
- package/dist/host/blocksItems/componentFacts.js.map +1 -0
- package/dist/host/blocksItems/containers.d.ts +18 -0
- package/dist/host/blocksItems/containers.d.ts.map +1 -0
- package/dist/host/blocksItems/containers.js +128 -0
- package/dist/host/blocksItems/containers.js.map +1 -0
- package/dist/host/blocksItems/handles.d.ts +10 -0
- package/dist/host/blocksItems/handles.d.ts.map +1 -0
- package/dist/host/blocksItems/handles.js +30 -0
- package/dist/host/blocksItems/handles.js.map +1 -0
- package/dist/host/blocksItems/implement.d.ts +22 -0
- package/dist/host/blocksItems/implement.d.ts.map +1 -0
- package/dist/host/blocksItems/implement.js +23 -0
- package/dist/host/blocksItems/implement.js.map +1 -0
- package/dist/host/blocksItems/itemExtras.d.ts +8 -0
- package/dist/host/blocksItems/itemExtras.d.ts.map +1 -0
- package/dist/host/blocksItems/itemExtras.js +106 -0
- package/dist/host/blocksItems/itemExtras.js.map +1 -0
- package/dist/host/blocksItems/itemLink.d.ts +12 -0
- package/dist/host/blocksItems/itemLink.d.ts.map +1 -0
- package/dist/host/blocksItems/itemLink.js +38 -0
- package/dist/host/blocksItems/itemLink.js.map +1 -0
- package/dist/host/blocksItems/items.d.ts +25 -0
- package/dist/host/blocksItems/items.d.ts.map +1 -0
- package/dist/host/blocksItems/items.js +427 -0
- package/dist/host/blocksItems/items.js.map +1 -0
- package/dist/host/blocksItems/tags.d.ts +24 -0
- package/dist/host/blocksItems/tags.d.ts.map +1 -0
- package/dist/host/blocksItems/tags.js +27 -0
- package/dist/host/blocksItems/tags.js.map +1 -0
- package/dist/host/blocksItems/types.d.ts +13 -0
- package/dist/host/blocksItems/types.d.ts.map +1 -0
- package/dist/host/blocksItems/types.js +83 -0
- package/dist/host/blocksItems/types.js.map +1 -0
- package/dist/host/blocksItems/volumes.d.ts +37 -0
- package/dist/host/blocksItems/volumes.d.ts.map +1 -0
- package/dist/host/blocksItems/volumes.js +361 -0
- package/dist/host/blocksItems/volumes.js.map +1 -0
- package/dist/host/coverage.d.ts +28 -0
- package/dist/host/coverage.d.ts.map +1 -0
- package/dist/host/coverage.js +45 -0
- package/dist/host/coverage.js.map +1 -0
- package/dist/host/customContent.d.ts +81 -0
- package/dist/host/customContent.d.ts.map +1 -0
- package/dist/host/customContent.js +213 -0
- package/dist/host/customContent.js.map +1 -0
- package/dist/host/debugUtilities.d.ts +192 -0
- package/dist/host/debugUtilities.d.ts.map +1 -0
- package/dist/host/debugUtilities.js +503 -0
- package/dist/host/debugUtilities.js.map +1 -0
- package/dist/host/entities/aimAssist.d.ts +11 -0
- package/dist/host/entities/aimAssist.d.ts.map +1 -0
- package/dist/host/entities/aimAssist.js +195 -0
- package/dist/host/entities/aimAssist.js.map +1 -0
- package/dist/host/entities/area.d.ts +14 -0
- package/dist/host/entities/area.d.ts.map +1 -0
- package/dist/host/entities/area.js +19 -0
- package/dist/host/entities/area.js.map +1 -0
- package/dist/host/entities/components.d.ts +61 -0
- package/dist/host/entities/components.d.ts.map +1 -0
- package/dist/host/entities/components.js +642 -0
- package/dist/host/entities/components.js.map +1 -0
- package/dist/host/entities/entityMembers.d.ts +35 -0
- package/dist/host/entities/entityMembers.d.ts.map +1 -0
- package/dist/host/entities/entityMembers.js +494 -0
- package/dist/host/entities/entityMembers.js.map +1 -0
- package/dist/host/entities/playerMembers.d.ts +23 -0
- package/dist/host/entities/playerMembers.d.ts.map +1 -0
- package/dist/host/entities/playerMembers.js +576 -0
- package/dist/host/entities/playerMembers.js.map +1 -0
- package/dist/host/entities/world.d.ts +315 -0
- package/dist/host/entities/world.d.ts.map +1 -0
- package/dist/host/entities/world.js +0 -0
- package/dist/host/events/componentEvents.d.ts +11 -0
- package/dist/host/events/componentEvents.d.ts.map +1 -0
- package/dist/host/events/componentEvents.js +23 -0
- package/dist/host/events/componentEvents.js.map +1 -0
- package/dist/host/events/eventOptions.d.ts +14 -0
- package/dist/host/events/eventOptions.d.ts.map +1 -0
- package/dist/host/events/eventOptions.js +224 -0
- package/dist/host/events/eventOptions.js.map +1 -0
- package/dist/host/events/eventValues.d.ts +41 -0
- package/dist/host/events/eventValues.d.ts.map +1 -0
- package/dist/host/events/eventValues.js +89 -0
- package/dist/host/events/eventValues.js.map +1 -0
- package/dist/host/events/worldEvents.d.ts +30 -0
- package/dist/host/events/worldEvents.d.ts.map +1 -0
- package/dist/host/events/worldEvents.js +207 -0
- package/dist/host/events/worldEvents.js.map +1 -0
- package/dist/host/formJson.d.ts +35 -0
- package/dist/host/formJson.d.ts.map +1 -0
- package/dist/host/formJson.js +84 -0
- package/dist/host/formJson.js.map +1 -0
- package/dist/host/formKit.d.ts +40 -0
- package/dist/host/formKit.d.ts.map +1 -0
- package/dist/host/formKit.js +124 -0
- package/dist/host/formKit.js.map +1 -0
- package/dist/host/forms.d.ts +92 -0
- package/dist/host/forms.d.ts.map +1 -0
- package/dist/host/forms.js +361 -0
- package/dist/host/forms.js.map +1 -0
- package/dist/host/gametest.d.ts +202 -0
- package/dist/host/gametest.d.ts.map +1 -0
- package/dist/host/gametest.js +316 -0
- package/dist/host/gametest.js.map +1 -0
- package/dist/host/inputs.d.ts +29 -0
- package/dist/host/inputs.d.ts.map +1 -0
- package/dist/host/inputs.js +110 -0
- package/dist/host/inputs.js.map +1 -0
- package/dist/host/jobs.d.ts +48 -0
- package/dist/host/jobs.d.ts.map +1 -0
- package/dist/host/jobs.js +62 -0
- package/dist/host/jobs.js.map +1 -0
- package/dist/host/jsprismarineServer.d.ts +65 -0
- package/dist/host/jsprismarineServer.d.ts.map +1 -0
- package/dist/host/jsprismarineServer.js +83 -0
- package/dist/host/jsprismarineServer.js.map +1 -0
- package/dist/host/minecraftServer.d.ts +229 -0
- package/dist/host/minecraftServer.d.ts.map +1 -0
- package/dist/host/minecraftServer.js +304 -0
- package/dist/host/minecraftServer.js.map +1 -0
- package/dist/host/minecraftServerUi.d.ts +30 -0
- package/dist/host/minecraftServerUi.d.ts.map +1 -0
- package/dist/host/minecraftServerUi.js +89 -0
- package/dist/host/minecraftServerUi.js.map +1 -0
- package/dist/host/netKit.d.ts +44 -0
- package/dist/host/netKit.d.ts.map +1 -0
- package/dist/host/netKit.js +87 -0
- package/dist/host/netKit.js.map +1 -0
- package/dist/host/pack.d.ts +71 -0
- package/dist/host/pack.d.ts.map +1 -0
- package/dist/host/pack.js +157 -0
- package/dist/host/pack.js.map +1 -0
- package/dist/host/serverAdmin.d.ts +44 -0
- package/dist/host/serverAdmin.d.ts.map +1 -0
- package/dist/host/serverAdmin.js +96 -0
- package/dist/host/serverAdmin.js.map +1 -0
- package/dist/host/serverBlocks.d.ts +32 -0
- package/dist/host/serverBlocks.d.ts.map +1 -0
- package/dist/host/serverBlocks.js +93 -0
- package/dist/host/serverBlocks.js.map +1 -0
- package/dist/host/serverComponents.d.ts +46 -0
- package/dist/host/serverComponents.d.ts.map +1 -0
- package/dist/host/serverComponents.js +297 -0
- package/dist/host/serverComponents.js.map +1 -0
- package/dist/host/serverCustom.d.ts +16 -0
- package/dist/host/serverCustom.d.ts.map +1 -0
- package/dist/host/serverCustom.js +161 -0
- package/dist/host/serverCustom.js.map +1 -0
- package/dist/host/serverEntities.d.ts +49 -0
- package/dist/host/serverEntities.d.ts.map +1 -0
- package/dist/host/serverEntities.js +358 -0
- package/dist/host/serverEntities.js.map +1 -0
- package/dist/host/serverFeedback.d.ts +15 -0
- package/dist/host/serverFeedback.d.ts.map +1 -0
- package/dist/host/serverFeedback.js +413 -0
- package/dist/host/serverFeedback.js.map +1 -0
- package/dist/host/serverGametest.d.ts +43 -0
- package/dist/host/serverGametest.d.ts.map +1 -0
- package/dist/host/serverGametest.js +246 -0
- package/dist/host/serverGametest.js.map +1 -0
- package/dist/host/serverItems.d.ts +17 -0
- package/dist/host/serverItems.d.ts.map +1 -0
- package/dist/host/serverItems.js +71 -0
- package/dist/host/serverItems.js.map +1 -0
- package/dist/host/serverNet.d.ts +41 -0
- package/dist/host/serverNet.d.ts.map +1 -0
- package/dist/host/serverNet.js +289 -0
- package/dist/host/serverNet.js.map +1 -0
- package/dist/host/serverObjects.d.ts +142 -0
- package/dist/host/serverObjects.d.ts.map +1 -0
- package/dist/host/serverObjects.js +326 -0
- package/dist/host/serverObjects.js.map +1 -0
- package/dist/host/serverProperties.d.ts +48 -0
- package/dist/host/serverProperties.d.ts.map +1 -0
- package/dist/host/serverProperties.js +193 -0
- package/dist/host/serverProperties.js.map +1 -0
- package/dist/host/serverScoreboard.d.ts +9 -0
- package/dist/host/serverScoreboard.d.ts.map +1 -0
- package/dist/host/serverScoreboard.js +198 -0
- package/dist/host/serverScoreboard.js.map +1 -0
- package/dist/host/serverStructures.d.ts +9 -0
- package/dist/host/serverStructures.d.ts.map +1 -0
- package/dist/host/serverStructures.js +243 -0
- package/dist/host/serverStructures.js.map +1 -0
- package/dist/host/tasks.d.ts +66 -0
- package/dist/host/tasks.d.ts.map +1 -0
- package/dist/host/tasks.js +107 -0
- package/dist/host/tasks.js.map +1 -0
- package/dist/host/world.d.ts +1359 -0
- package/dist/host/world.d.ts.map +1 -0
- package/dist/host/world.js +10 -0
- package/dist/host/world.js.map +1 -0
- package/dist/host/worldsystem/gameRules.d.ts +189 -0
- package/dist/host/worldsystem/gameRules.d.ts.map +1 -0
- package/dist/host/worldsystem/gameRules.js +86 -0
- package/dist/host/worldsystem/gameRules.js.map +1 -0
- package/dist/host/worldsystem/memoryWorldSystem.d.ts +18 -0
- package/dist/host/worldsystem/memoryWorldSystem.d.ts.map +1 -0
- package/dist/host/worldsystem/memoryWorldSystem.js +223 -0
- package/dist/host/worldsystem/memoryWorldSystem.js.map +1 -0
- package/dist/host/worldsystem/seam.d.ts +163 -0
- package/dist/host/worldsystem/seam.d.ts.map +1 -0
- package/dist/host/worldsystem/seam.js +0 -0
- package/dist/host/worldsystem/serverClocks.d.ts +18 -0
- package/dist/host/worldsystem/serverClocks.d.ts.map +1 -0
- package/dist/host/worldsystem/serverClocks.js +166 -0
- package/dist/host/worldsystem/serverClocks.js.map +1 -0
- package/dist/host/worldsystem/serverDimension.d.ts +10 -0
- package/dist/host/worldsystem/serverDimension.d.ts.map +1 -0
- package/dist/host/worldsystem/serverDimension.js +388 -0
- package/dist/host/worldsystem/serverDimension.js.map +1 -0
- package/dist/host/worldsystem/serverFog.d.ts +15 -0
- package/dist/host/worldsystem/serverFog.d.ts.map +1 -0
- package/dist/host/worldsystem/serverFog.js +66 -0
- package/dist/host/worldsystem/serverFog.js.map +1 -0
- package/dist/host/worldsystem/serverLoot.d.ts +9 -0
- package/dist/host/worldsystem/serverLoot.d.ts.map +1 -0
- package/dist/host/worldsystem/serverLoot.js +255 -0
- package/dist/host/worldsystem/serverLoot.js.map +1 -0
- package/dist/host/worldsystem/serverPrimitiveShapes.d.ts +9 -0
- package/dist/host/worldsystem/serverPrimitiveShapes.d.ts.map +1 -0
- package/dist/host/worldsystem/serverPrimitiveShapes.js +149 -0
- package/dist/host/worldsystem/serverPrimitiveShapes.js.map +1 -0
- package/dist/host/worldsystem/serverTickingAreas.d.ts +11 -0
- package/dist/host/worldsystem/serverTickingAreas.d.ts.map +1 -0
- package/dist/host/worldsystem/serverTickingAreas.js +176 -0
- package/dist/host/worldsystem/serverTickingAreas.js.map +1 -0
- package/dist/host/worldsystem/serverVolumes.d.ts +9 -0
- package/dist/host/worldsystem/serverVolumes.d.ts.map +1 -0
- package/dist/host/worldsystem/serverVolumes.js +248 -0
- package/dist/host/worldsystem/serverVolumes.js.map +1 -0
- package/dist/host/worldsystem/serverWorld.d.ts +18 -0
- package/dist/host/worldsystem/serverWorld.d.ts.map +1 -0
- package/dist/host/worldsystem/serverWorld.js +199 -0
- package/dist/host/worldsystem/serverWorld.js.map +1 -0
- package/dist/host/worldsystem/tags.d.ts +40 -0
- package/dist/host/worldsystem/tags.d.ts.map +1 -0
- package/dist/host/worldsystem/tags.js +43 -0
- package/dist/host/worldsystem/tags.js.map +1 -0
- package/dist/install.d.ts +39 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +83 -0
- package/dist/install.js.map +1 -0
- package/dist/isRecord.d.ts +3 -0
- package/dist/isRecord.d.ts.map +1 -0
- package/dist/isRecord.js +6 -0
- package/dist/isRecord.js.map +1 -0
- package/dist/library.d.ts +40 -0
- package/dist/library.d.ts.map +1 -0
- package/dist/library.js +101 -0
- package/dist/library.js.map +1 -0
- package/dist/manifest.d.ts +37 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +40 -0
- package/dist/manifest.js.map +1 -0
- package/dist/native/manifest.json.js +45 -0
- package/dist/native/manifest.json.js.map +1 -0
- package/dist/nativeHash.d.ts +16 -0
- package/dist/nativeHash.d.ts.map +1 -0
- package/dist/nativeHash.js +52 -0
- package/dist/nativeHash.js.map +1 -0
- package/dist/platform.d.ts +50 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +77 -0
- package/dist/platform.js.map +1 -0
- package/dist/shape/binding.d.ts +112 -0
- package/dist/shape/binding.d.ts.map +1 -0
- package/dist/shape/binding.js +558 -0
- package/dist/shape/binding.js.map +1 -0
- package/dist/shape/engineRuntime.d.ts +55 -0
- package/dist/shape/engineRuntime.d.ts.map +1 -0
- package/dist/shape/engineRuntime.js +451 -0
- package/dist/shape/engineRuntime.js.map +1 -0
- package/dist/shape/format.d.ts +249 -0
- package/dist/shape/format.d.ts.map +1 -0
- package/dist/shape/format.js +43 -0
- package/dist/shape/format.js.map +1 -0
- package/dist/shape/history.d.ts +24 -0
- package/dist/shape/history.d.ts.map +1 -0
- package/dist/shape/history.js +65 -0
- package/dist/shape/history.js.map +1 -0
- package/dist/shape/implementations.d.ts +105 -0
- package/dist/shape/implementations.d.ts.map +1 -0
- package/dist/shape/implementations.js +62 -0
- package/dist/shape/implementations.js.map +1 -0
- package/dist/shape/plan.d.ts +138 -0
- package/dist/shape/plan.d.ts.map +1 -0
- package/dist/shape/plan.js +0 -0
- package/dist/shape/resolve.d.ts +56 -0
- package/dist/shape/resolve.d.ts.map +1 -0
- package/dist/shape/resolve.js +78 -0
- package/dist/shape/resolve.js.map +1 -0
- package/dist/shape/version.d.ts +15 -0
- package/dist/shape/version.d.ts.map +1 -0
- package/dist/shape/version.js +35 -0
- package/dist/shape/version.js.map +1 -0
- package/dist/testing/debuggerWorker.d.ts +15 -0
- package/dist/testing/debuggerWorker.d.ts.map +1 -0
- package/dist/testing/debuggerWorker.js +29 -0
- package/dist/testing/debuggerWorker.js.map +1 -0
- package/dist/testing/engineWorker.d.ts +7 -0
- package/dist/testing/engineWorker.d.ts.map +1 -0
- package/dist/testing/engineWorker.js +31 -0
- package/dist/testing/engineWorker.js.map +1 -0
- package/dist/values.d.ts +94 -0
- package/dist/values.d.ts.map +1 -0
- package/dist/values.js +204 -0
- package/dist/values.js.map +1 -0
- package/native/manifest.json +49 -0
- package/package.json +177 -6
- package/scripts/postinstall.mjs +54 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { DebuggerChannelBridge } from "./channel.js";
|
|
2
|
+
import { connectToDebugger, listenForDebugger } from "./transport.js";
|
|
3
|
+
import { ScriptHostErrors } from "@jsprismarine/errors/script-host";
|
|
4
|
+
import { parentPort } from "node:worker_threads";
|
|
5
|
+
// src/debugger/connectionWorker.ts
|
|
6
|
+
/**
|
|
7
|
+
* The socket thread of {@link DebuggerThread}: it listens or connects with the transport, joins
|
|
8
|
+
* each connection to a {@link DebuggerChannelBridge}, and sends the bridge's endpoint to the thread
|
|
9
|
+
* that started it. It wakes that thread's event loop after each message the extension sends.
|
|
10
|
+
*/
|
|
11
|
+
var port = parentPort;
|
|
12
|
+
if (port === null) throw new ScriptHostErrors.ConnectionWorkerOnMainThread();
|
|
13
|
+
var post = (message, transfer = []) => port.postMessage(message, transfer);
|
|
14
|
+
var listener;
|
|
15
|
+
var connection;
|
|
16
|
+
/**
|
|
17
|
+
* Closes the listener and the connection, whichever are open. A connection whose session has
|
|
18
|
+
* already closed its end is left to the bridge, which closes the socket once it has passed on what
|
|
19
|
+
* the session sent last, such as the thread's exit.
|
|
20
|
+
*/
|
|
21
|
+
var closeAll = () => {
|
|
22
|
+
listener?.close();
|
|
23
|
+
listener = void 0;
|
|
24
|
+
if (connection !== void 0 && !connection.bridge.closed) {
|
|
25
|
+
connection.bridge.close();
|
|
26
|
+
connection.socket.close();
|
|
27
|
+
}
|
|
28
|
+
connection = void 0;
|
|
29
|
+
};
|
|
30
|
+
/** Joins a connection to a new bridge, and hands the bridge's endpoint to the other thread. */
|
|
31
|
+
var adopt = (socket) => {
|
|
32
|
+
const { address, port: peerPort } = socket.peer;
|
|
33
|
+
const bridge = new DebuggerChannelBridge();
|
|
34
|
+
bridge.connect(socket);
|
|
35
|
+
socket.onMessage(() => post({ kind: "activity" }));
|
|
36
|
+
socket.onClose(() => {
|
|
37
|
+
if (connection?.socket === socket) connection = void 0;
|
|
38
|
+
post({ kind: "activity" });
|
|
39
|
+
});
|
|
40
|
+
connection = {
|
|
41
|
+
socket,
|
|
42
|
+
bridge
|
|
43
|
+
};
|
|
44
|
+
post({
|
|
45
|
+
kind: "connected",
|
|
46
|
+
connection: {
|
|
47
|
+
endpoint: bridge.endpoint,
|
|
48
|
+
address,
|
|
49
|
+
port: peerPort
|
|
50
|
+
}
|
|
51
|
+
}, [bridge.endpoint.port]);
|
|
52
|
+
};
|
|
53
|
+
var errorText = (error) => error instanceof Error ? error.message : String(error);
|
|
54
|
+
var handle = async (request) => {
|
|
55
|
+
try {
|
|
56
|
+
switch (request.op) {
|
|
57
|
+
case "listen": {
|
|
58
|
+
closeAll();
|
|
59
|
+
const opened = await listenForDebugger(request.options);
|
|
60
|
+
listener = opened;
|
|
61
|
+
opened.connection.then((socket) => {
|
|
62
|
+
if (listener === opened) listener = void 0;
|
|
63
|
+
adopt(socket);
|
|
64
|
+
}, () => void 0);
|
|
65
|
+
post({
|
|
66
|
+
kind: "reply",
|
|
67
|
+
id: request.id,
|
|
68
|
+
port: opened.address.port
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
case "connect":
|
|
73
|
+
closeAll();
|
|
74
|
+
adopt(await connectToDebugger(request.options));
|
|
75
|
+
post({
|
|
76
|
+
kind: "reply",
|
|
77
|
+
id: request.id
|
|
78
|
+
});
|
|
79
|
+
return;
|
|
80
|
+
case "close":
|
|
81
|
+
closeAll();
|
|
82
|
+
post({
|
|
83
|
+
kind: "reply",
|
|
84
|
+
id: request.id
|
|
85
|
+
});
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
} catch (error) {
|
|
89
|
+
post({
|
|
90
|
+
kind: "reply",
|
|
91
|
+
id: request.id,
|
|
92
|
+
error: errorText(error)
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
port.on("message", (request) => void handle(request));
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=connectionWorker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectionWorker.js","names":[],"sources":["../../src/debugger/connectionWorker.ts"],"sourcesContent":["/**\n * The socket thread of {@link DebuggerThread}: it listens or connects with the transport, joins\n * each connection to a {@link DebuggerChannelBridge}, and sends the bridge's endpoint to the thread\n * that started it. It wakes that thread's event loop after each message the extension sends.\n */\nimport { parentPort } from 'node:worker_threads';\nimport type { MessagePort } from 'node:worker_threads';\n\nimport { ScriptHostErrors } from '@jsprismarine/errors/script-host';\n\nimport { DebuggerChannelBridge } from './channel';\nimport type { DebuggerThreadMessage, DebuggerThreadRequest } from './thread';\nimport { connectToDebugger, listenForDebugger } from './transport';\nimport type { DebuggerListener, DebuggerSocket } from './transport';\n\nconst port = parentPort;\nif (port === null) throw new ScriptHostErrors.ConnectionWorkerOnMainThread();\n\nconst post = (message: DebuggerThreadMessage, transfer: MessagePort[] = []): void =>\n port.postMessage(message, transfer);\n\nlet listener: DebuggerListener | undefined;\nlet connection: { readonly socket: DebuggerSocket; readonly bridge: DebuggerChannelBridge } | undefined;\n\n/**\n * Closes the listener and the connection, whichever are open. A connection whose session has\n * already closed its end is left to the bridge, which closes the socket once it has passed on what\n * the session sent last, such as the thread's exit.\n */\nconst closeAll = (): void => {\n listener?.close();\n listener = undefined;\n if (connection !== undefined && !connection.bridge.closed) {\n connection.bridge.close();\n connection.socket.close();\n }\n connection = undefined;\n};\n\n/** Joins a connection to a new bridge, and hands the bridge's endpoint to the other thread. */\nconst adopt = (socket: DebuggerSocket): void => {\n const { address, port: peerPort } = socket.peer;\n const bridge = new DebuggerChannelBridge();\n bridge.connect(socket);\n socket.onMessage(() => post({ kind: 'activity' }));\n socket.onClose(() => {\n if (connection?.socket === socket) connection = undefined;\n post({ kind: 'activity' });\n });\n connection = { socket, bridge };\n post({ kind: 'connected', connection: { endpoint: bridge.endpoint, address, port: peerPort } }, [\n bridge.endpoint.port\n ]);\n};\n\nconst errorText = (error: unknown): string => (error instanceof Error ? error.message : String(error));\n\nconst handle = async (request: DebuggerThreadRequest): Promise<void> => {\n try {\n switch (request.op) {\n case 'listen': {\n closeAll();\n const opened = await listenForDebugger(request.options);\n listener = opened;\n opened.connection.then(\n (socket) => {\n if (listener === opened) listener = undefined;\n adopt(socket);\n },\n () => undefined\n );\n post({ kind: 'reply', id: request.id, port: opened.address.port });\n return;\n }\n case 'connect': {\n closeAll();\n adopt(await connectToDebugger(request.options));\n post({ kind: 'reply', id: request.id });\n return;\n }\n case 'close':\n closeAll();\n post({ kind: 'reply', id: request.id });\n return;\n }\n } catch (error) {\n post({ kind: 'reply', id: request.id, error: errorText(error) });\n }\n};\n\nport.on('message', (request: DebuggerThreadRequest) => void handle(request));\n"],"mappings":";;;;;;;;;;AAeA,IAAM,OAAO;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AS;IACT,MAAM,MAAM,kBAAkB,QAAQ,OAAO,CAAC;IAC9C,KAAK;KAAE,MAAM;KAAS,IAAI,QAAQ;IAAG,CAAC;IACtC;GAEJ,KAAK;IACD,SAAS;IACT,KAAK;KAAE,MAAM;KAAS,IAAI,QAAQ;IAAG,CAAC;IACtC;EACR;CACJ,SAAS,OAAO;EACZ,KAAK;GAAE,MAAM;GAAS,IAAI,QAAQ;GAAI,OAAO,UAAU,KAAK;EAAE,CAAC;CACnE;AACJ;AAEA,KAAK,GAAG,YAAY,YAAmC,KAAK,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The debugger protocol's framing: each message is its length as 8 hexadecimal digits and a
|
|
3
|
+
* newline, then that many bytes of JSON that end in a newline. The extension writes it in
|
|
4
|
+
* `Session.sendDebuggeeMessage` and reads it in `src/message-stream-parser.ts`; koush's
|
|
5
|
+
* `quickjs-debugger.c` writes the same bytes ("length prefix is 8 hex followed by newline").
|
|
6
|
+
*/
|
|
7
|
+
/** The bytes of a frame's length header: 8 hexadecimal digits and a newline. */
|
|
8
|
+
export declare const FRAME_HEADER_BYTES = 9;
|
|
9
|
+
/** The largest length a header can state, its body's JSON and newline together. */
|
|
10
|
+
export declare const MAX_FRAME_LENGTH = 4294967295;
|
|
11
|
+
/**
|
|
12
|
+
* The largest body the host reads from the extension: 1 MiB. The extension's messages are small,
|
|
13
|
+
* and the largest carry what a person writes: an `evaluate` expression, a command, or one file's
|
|
14
|
+
* breakpoint lines in `setBreakpoints`. A breakpoint list reaches the engine through its transfer
|
|
15
|
+
* buffer, `DEFAULT_BUFFER_SIZE` (64 KiB) unless an engine sets another size, and the limit is 16
|
|
16
|
+
* times that, which leaves room for a pasted expression. A peer has given no passcode before its
|
|
17
|
+
* first message decodes, so a header that states more is refused before its body is buffered.
|
|
18
|
+
*/
|
|
19
|
+
export declare const MAX_RECEIVED_FRAME_LENGTH: number;
|
|
20
|
+
/**
|
|
21
|
+
* Frames one message.
|
|
22
|
+
* @param message - The message, which JSON can encode.
|
|
23
|
+
* @returns The header, the JSON and its trailing newline.
|
|
24
|
+
*/
|
|
25
|
+
export declare const encodeFrame: (message: unknown) => Buffer;
|
|
26
|
+
/**
|
|
27
|
+
* Splits the bytes of a connection into messages, whatever sizes the chunks arrive in. The
|
|
28
|
+
* extension reads each body as JSON whole, so a body's trailing newline is part of the JSON's
|
|
29
|
+
* whitespace and the decoder does not require it. Chunks wait in a list until a header or a body
|
|
30
|
+
* is complete, so each byte is copied at most once more however small the chunks are.
|
|
31
|
+
*/
|
|
32
|
+
export declare class FrameDecoder {
|
|
33
|
+
private readonly chunks;
|
|
34
|
+
private buffered;
|
|
35
|
+
private bodyLength;
|
|
36
|
+
/**
|
|
37
|
+
* Takes the next chunk of bytes.
|
|
38
|
+
* @returns The messages the bytes so far complete, in order.
|
|
39
|
+
* @throws {DebuggerFramingError} When a header is not 8 hexadecimal digits and a newline, a header states a body
|
|
40
|
+
* longer than {@link MAX_RECEIVED_FRAME_LENGTH}, or a body is not JSON.
|
|
41
|
+
*/
|
|
42
|
+
push(chunk: Uint8Array): unknown[];
|
|
43
|
+
/** Removes the first `length` buffered bytes, copying them only when they span chunks. */
|
|
44
|
+
private take;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=framing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framing.d.ts","sources":["../../src/debugger/framing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAAc,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,WAAW,YAAa,OAAO,KAAG,MAK9C,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,UAAU,CAAqB;IAEvC;;;;;OAKG;IACI,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,EAAE,CAgCxC;IAED,0FAA0F;IAC1F,OAAO,CAAC,IAAI;CAwBf"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ScriptHostErrors } from "@jsprismarine/errors/script-host";
|
|
2
|
+
// src/debugger/framing.ts
|
|
3
|
+
/**
|
|
4
|
+
* The debugger protocol's framing: each message is its length as 8 hexadecimal digits and a
|
|
5
|
+
* newline, then that many bytes of JSON that end in a newline. The extension writes it in
|
|
6
|
+
* `Session.sendDebuggeeMessage` and reads it in `src/message-stream-parser.ts`; koush's
|
|
7
|
+
* `quickjs-debugger.c` writes the same bytes ("length prefix is 8 hex followed by newline").
|
|
8
|
+
*/
|
|
9
|
+
/** The bytes of a frame's length header: 8 hexadecimal digits and a newline. */
|
|
10
|
+
var FRAME_HEADER_BYTES = 9;
|
|
11
|
+
/** The largest length a header can state, its body's JSON and newline together. */
|
|
12
|
+
var MAX_FRAME_LENGTH = 4294967295;
|
|
13
|
+
/**
|
|
14
|
+
* The largest body the host reads from the extension: 1 MiB. The extension's messages are small,
|
|
15
|
+
* and the largest carry what a person writes: an `evaluate` expression, a command, or one file's
|
|
16
|
+
* breakpoint lines in `setBreakpoints`. A breakpoint list reaches the engine through its transfer
|
|
17
|
+
* buffer, `DEFAULT_BUFFER_SIZE` (64 KiB) unless an engine sets another size, and the limit is 16
|
|
18
|
+
* times that, which leaves room for a pasted expression. A peer has given no passcode before its
|
|
19
|
+
* first message decodes, so a header that states more is refused before its body is buffered.
|
|
20
|
+
*/
|
|
21
|
+
var MAX_RECEIVED_FRAME_LENGTH = 1048576;
|
|
22
|
+
/**
|
|
23
|
+
* Frames one message.
|
|
24
|
+
* @param message - The message, which JSON can encode.
|
|
25
|
+
* @returns The header, the JSON and its trailing newline.
|
|
26
|
+
*/
|
|
27
|
+
var encodeFrame = (message) => {
|
|
28
|
+
const json = Buffer.from(JSON.stringify(message), "utf8");
|
|
29
|
+
const length = json.byteLength + 1;
|
|
30
|
+
if (length > 4294967295) throw new ScriptHostErrors.FrameTooLong({ length });
|
|
31
|
+
return Buffer.concat([
|
|
32
|
+
Buffer.from(`${length.toString(16).padStart(8, "0")}\n`, "ascii"),
|
|
33
|
+
json,
|
|
34
|
+
Buffer.from("\n")
|
|
35
|
+
]);
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Splits the bytes of a connection into messages, whatever sizes the chunks arrive in. The
|
|
39
|
+
* extension reads each body as JSON whole, so a body's trailing newline is part of the JSON's
|
|
40
|
+
* whitespace and the decoder does not require it. Chunks wait in a list until a header or a body
|
|
41
|
+
* is complete, so each byte is copied at most once more however small the chunks are.
|
|
42
|
+
*/
|
|
43
|
+
var FrameDecoder = class {
|
|
44
|
+
chunks = [];
|
|
45
|
+
buffered = 0;
|
|
46
|
+
bodyLength;
|
|
47
|
+
/**
|
|
48
|
+
* Takes the next chunk of bytes.
|
|
49
|
+
* @returns The messages the bytes so far complete, in order.
|
|
50
|
+
* @throws {DebuggerFramingError} When a header is not 8 hexadecimal digits and a newline, a header states a body
|
|
51
|
+
* longer than {@link MAX_RECEIVED_FRAME_LENGTH}, or a body is not JSON.
|
|
52
|
+
*/
|
|
53
|
+
push(chunk) {
|
|
54
|
+
if (chunk.byteLength > 0) {
|
|
55
|
+
this.chunks.push(Buffer.from(chunk));
|
|
56
|
+
this.buffered += chunk.byteLength;
|
|
57
|
+
}
|
|
58
|
+
const messages = [];
|
|
59
|
+
for (;;) {
|
|
60
|
+
if (this.bodyLength === void 0) {
|
|
61
|
+
if (this.buffered < 9) break;
|
|
62
|
+
const header = this.take(9).toString("ascii");
|
|
63
|
+
if (!/^[0-9a-fA-F]{8}\n$/.test(header)) throw new ScriptHostErrors.InvalidFrameHeader({ header: JSON.stringify(header) });
|
|
64
|
+
const length = Number.parseInt(header.slice(0, 8), 16);
|
|
65
|
+
if (length > 1048576) throw new ScriptHostErrors.ReceivedFrameTooLong({
|
|
66
|
+
length,
|
|
67
|
+
limit: MAX_RECEIVED_FRAME_LENGTH
|
|
68
|
+
});
|
|
69
|
+
this.bodyLength = length;
|
|
70
|
+
}
|
|
71
|
+
if (this.buffered < this.bodyLength) break;
|
|
72
|
+
const body = this.take(this.bodyLength).toString("utf8");
|
|
73
|
+
this.bodyLength = void 0;
|
|
74
|
+
try {
|
|
75
|
+
messages.push(JSON.parse(body));
|
|
76
|
+
} catch (error) {
|
|
77
|
+
throw new ScriptHostErrors.FrameBodyNotJson({ reason: error instanceof Error ? error.message : error }, { cause: error });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return messages;
|
|
81
|
+
}
|
|
82
|
+
/** Removes the first `length` buffered bytes, copying them only when they span chunks. */
|
|
83
|
+
take(length) {
|
|
84
|
+
this.buffered -= length;
|
|
85
|
+
const first = this.chunks[0];
|
|
86
|
+
if (first !== void 0 && first.byteLength >= length) {
|
|
87
|
+
if (first.byteLength === length) this.chunks.shift();
|
|
88
|
+
else this.chunks[0] = first.subarray(length);
|
|
89
|
+
return first.subarray(0, length);
|
|
90
|
+
}
|
|
91
|
+
let spanned = 0;
|
|
92
|
+
let covered = 0;
|
|
93
|
+
for (; covered < length && spanned < this.chunks.length; spanned++) covered += this.chunks[spanned]?.byteLength ?? 0;
|
|
94
|
+
const parts = this.chunks.splice(0, spanned);
|
|
95
|
+
const last = parts.pop();
|
|
96
|
+
if (last !== void 0) {
|
|
97
|
+
const kept = last.byteLength - (covered - length);
|
|
98
|
+
parts.push(last.subarray(0, kept));
|
|
99
|
+
if (kept < last.byteLength) this.chunks.unshift(last.subarray(kept));
|
|
100
|
+
}
|
|
101
|
+
return Buffer.concat(parts, length);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
export { FRAME_HEADER_BYTES, FrameDecoder, MAX_FRAME_LENGTH, MAX_RECEIVED_FRAME_LENGTH, encodeFrame };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=framing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framing.js","names":[],"sources":["../../src/debugger/framing.ts"],"sourcesContent":["/**\n * The debugger protocol's framing: each message is its length as 8 hexadecimal digits and a\n * newline, then that many bytes of JSON that end in a newline. The extension writes it in\n * `Session.sendDebuggeeMessage` and reads it in `src/message-stream-parser.ts`; koush's\n * `quickjs-debugger.c` writes the same bytes (\"length prefix is 8 hex followed by newline\").\n */\n\nimport { ScriptHostErrors } from '@jsprismarine/errors/script-host';\n\n/** The bytes of a frame's length header: 8 hexadecimal digits and a newline. */\nexport const FRAME_HEADER_BYTES = 9;\n\n/** The largest length a header can state, its body's JSON and newline together. */\nexport const MAX_FRAME_LENGTH = 0xffffffff;\n\n/**\n * The largest body the host reads from the extension: 1 MiB. The extension's messages are small,\n * and the largest carry what a person writes: an `evaluate` expression, a command, or one file's\n * breakpoint lines in `setBreakpoints`. A breakpoint list reaches the engine through its transfer\n * buffer, `DEFAULT_BUFFER_SIZE` (64 KiB) unless an engine sets another size, and the limit is 16\n * times that, which leaves room for a pasted expression. A peer has given no passcode before its\n * first message decodes, so a header that states more is refused before its body is buffered.\n */\nexport const MAX_RECEIVED_FRAME_LENGTH = 1024 * 1024;\n\n/**\n * Frames one message.\n * @param message - The message, which JSON can encode.\n * @returns The header, the JSON and its trailing newline.\n */\nexport const encodeFrame = (message: unknown): Buffer => {\n const json = Buffer.from(JSON.stringify(message), 'utf8');\n const length = json.byteLength + 1;\n if (length > MAX_FRAME_LENGTH) throw new ScriptHostErrors.FrameTooLong({ length });\n return Buffer.concat([Buffer.from(`${length.toString(16).padStart(8, '0')}\\n`, 'ascii'), json, Buffer.from('\\n')]);\n};\n\n/**\n * Splits the bytes of a connection into messages, whatever sizes the chunks arrive in. The\n * extension reads each body as JSON whole, so a body's trailing newline is part of the JSON's\n * whitespace and the decoder does not require it. Chunks wait in a list until a header or a body\n * is complete, so each byte is copied at most once more however small the chunks are.\n */\nexport class FrameDecoder {\n private readonly chunks: Buffer[] = [];\n private buffered = 0;\n private bodyLength: number | undefined;\n\n /**\n * Takes the next chunk of bytes.\n * @returns The messages the bytes so far complete, in order.\n * @throws {DebuggerFramingError} When a header is not 8 hexadecimal digits and a newline, a header states a body\n * longer than {@link MAX_RECEIVED_FRAME_LENGTH}, or a body is not JSON.\n */\n public push(chunk: Uint8Array): unknown[] {\n if (chunk.byteLength > 0) {\n this.chunks.push(Buffer.from(chunk));\n this.buffered += chunk.byteLength;\n }\n const messages: unknown[] = [];\n for (;;) {\n if (this.bodyLength === undefined) {\n if (this.buffered < FRAME_HEADER_BYTES) break;\n const header = this.take(FRAME_HEADER_BYTES).toString('ascii');\n if (!/^[0-9a-fA-F]{8}\\n$/.test(header)) {\n throw new ScriptHostErrors.InvalidFrameHeader({ header: JSON.stringify(header) });\n }\n const length = Number.parseInt(header.slice(0, 8), 16);\n if (length > MAX_RECEIVED_FRAME_LENGTH) {\n throw new ScriptHostErrors.ReceivedFrameTooLong({ length, limit: MAX_RECEIVED_FRAME_LENGTH });\n }\n this.bodyLength = length;\n }\n if (this.buffered < this.bodyLength) break;\n const body = this.take(this.bodyLength).toString('utf8');\n this.bodyLength = undefined;\n try {\n messages.push(JSON.parse(body));\n } catch (error) {\n throw new ScriptHostErrors.FrameBodyNotJson(\n { reason: error instanceof Error ? error.message : error },\n { cause: error }\n );\n }\n }\n return messages;\n }\n\n /** Removes the first `length` buffered bytes, copying them only when they span chunks. */\n private take(length: number): Buffer {\n this.buffered -= length;\n const first = this.chunks[0];\n if (first !== undefined && first.byteLength >= length) {\n if (first.byteLength === length) this.chunks.shift();\n else this.chunks[0] = first.subarray(length);\n return first.subarray(0, length);\n }\n // One splice takes every chunk the bytes span, and one copy joins them. The bytes of the\n // last chunk past `length` go back uncopied.\n let spanned = 0;\n let covered = 0;\n for (; covered < length && spanned < this.chunks.length; spanned++) {\n covered += this.chunks[spanned]?.byteLength ?? 0;\n }\n const parts = this.chunks.splice(0, spanned);\n const last = parts.pop();\n if (last !== undefined) {\n const kept = last.byteLength - (covered - length);\n parts.push(last.subarray(0, kept));\n if (kept < last.byteLength) this.chunks.unshift(last.subarray(kept));\n }\n return Buffer.concat(parts, length);\n }\n}\n"],"mappings":";;;;;;;;;AAUA,IAAa,qBAAqB;;AAGlC,IAAa,mBAAmB;;;;;;;;;AAUhC,IAAa,4BAA4B;;;;;;AAOzC,IAAa,eAAe,YAA6B;CACrD,MAAM,OAAO,OAAO,KAAK,KAAK,UAAU,OAAO,GAAG,MAAM;CACxD,MAAM,SAAS,KAAK,aAAa;CACjC,IAAI,SAAA,YAA2B,MAAM,IAAI,iBAAiB,aAAa,EAAE,OAAO,CAAC;CACjF,OAAO,OAAO,OAAO;EAAC,OAAO,KAAK,GAAG,OAAO,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,KAAK,OAAO;EAAG;EAAM,OAAO,KAAK,IAAI;CAAC,CAAC;AACrH;;;;;;;AAQA,IAAa,eAAb,MAA0B;CACtB,SAAoC,CAAC;CACrC,WAAmB;CACnB;;;;;;;CAQA,KAAY,OAA8B;EACtC,IAAI,MAAM,aAAa,GAAG;GACtB,KAAK,OAAO,KAAK,OAAO,KAAK,KAAK,CAAC;GACnC,KAAK,YAAY,MAAM;EAC3B;EACA,MAAM,WAAsB,CAAC;EAC7B,SAAS;GACL,IAAI,KAAK,eAAe,KAAA,GAAW;IAC/B,IAAI,KAAK,WAAA,GAA+B;IACxC,MAAM,SAAS,KAAK,KAAA,CAAuB,CAAC,CAAC,SAAS,OAAO;IAC7D,IAAI,CAAC,qBAAqB,KAAK,MAAM,GACjC,MAAM,IAAI,iBAAiB,mBAAmB,EAAE,QAAQ,KAAK,UAAU,MAAM,EAAE,CAAC;IAEpF,MAAM,SAAS,OAAO,SAAS,OAAO,MAAM,GAAG,CAAC,GAAG,EAAE;IACrD,IAAI,SAAA,SACA,MAAM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samples the stack of the debugged pack at each of the debugger's polls, which come every
|
|
4
|
+
* `pollLines` lines a script runs, and hands back a V8 `.cpuprofile`, the format the pinned
|
|
5
|
+
* Bedrock Dedicated Server (BDS) sends in its `ProfilerCapture` event and VS Code opens.
|
|
6
|
+
*
|
|
7
|
+
* The samples count lines rather than time: a script that runs fewer lines than the poll interval
|
|
8
|
+
* between two ticks is never sampled. The clock only labels the samples, as the format asks.
|
|
9
|
+
*/
|
|
10
|
+
import type { DebugFrame } from './EngineDebugger.js';
|
|
11
|
+
/** A node of a `.cpuprofile`'s call tree, as V8 and VS Code read it. */
|
|
12
|
+
interface ProfileNode {
|
|
13
|
+
readonly id: number;
|
|
14
|
+
readonly callFrame: {
|
|
15
|
+
readonly functionName: string;
|
|
16
|
+
readonly scriptId: string;
|
|
17
|
+
readonly url: string;
|
|
18
|
+
/** Zero-based, as in the Chrome DevTools Protocol. */
|
|
19
|
+
readonly lineNumber: number;
|
|
20
|
+
readonly columnNumber: number;
|
|
21
|
+
};
|
|
22
|
+
hitCount: number;
|
|
23
|
+
readonly children: number[];
|
|
24
|
+
}
|
|
25
|
+
/** A finished profile: the `.cpuprofile` JSON the extension writes to a file. */
|
|
26
|
+
export interface CpuProfile {
|
|
27
|
+
readonly nodes: readonly ProfileNode[];
|
|
28
|
+
readonly startTime: number;
|
|
29
|
+
readonly endTime: number;
|
|
30
|
+
readonly samples: readonly number[];
|
|
31
|
+
readonly timeDeltas: readonly number[];
|
|
32
|
+
/**
|
|
33
|
+
* VS Code's source locations. The extension reads `locations` to map a capture through source
|
|
34
|
+
* maps and fails without it; BDS sends `{ rootPath: '.', locations: [] }`.
|
|
35
|
+
*/
|
|
36
|
+
readonly $vscode: {
|
|
37
|
+
readonly rootPath: string;
|
|
38
|
+
readonly locations: readonly unknown[];
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** One profile, from `startProfiler` to `stopProfiler`. */
|
|
42
|
+
export declare class ScriptProfiler {
|
|
43
|
+
private readonly clock;
|
|
44
|
+
private readonly toPath;
|
|
45
|
+
private readonly startTime;
|
|
46
|
+
private last;
|
|
47
|
+
private readonly nodes;
|
|
48
|
+
/** The child of each node by its function's key, so a stack seen again reuses its nodes. */
|
|
49
|
+
private readonly childByKey;
|
|
50
|
+
private readonly samples;
|
|
51
|
+
private readonly timeDeltas;
|
|
52
|
+
/**
|
|
53
|
+
* @param clock - The time in microseconds, which labels each sample.
|
|
54
|
+
* @param toPath - Turns an engine file name into the path the extension knows it by.
|
|
55
|
+
*/
|
|
56
|
+
constructor(clock: () => number, toPath?: (file: string) => string);
|
|
57
|
+
/** How many stacks the profile holds. */
|
|
58
|
+
get sampleCount(): number;
|
|
59
|
+
/**
|
|
60
|
+
* Adds one sample: the stack a poll found, innermost frame first, as
|
|
61
|
+
* {@link EngineDebugger.frames} lists it. A function is one node under each caller, whatever
|
|
62
|
+
* line of it was running.
|
|
63
|
+
*/
|
|
64
|
+
sample(frames: readonly DebugFrame[]): void;
|
|
65
|
+
/** Ends the profile. */
|
|
66
|
+
finish(): CpuProfile;
|
|
67
|
+
private node;
|
|
68
|
+
}
|
|
69
|
+
/** The time in microseconds since the epoch, which BDS's captures use for their start and end. */
|
|
70
|
+
export declare const profilerClock: () => number;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=profiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiler.d.ts","sources":["../../src/debugger/profiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,wEAAwE;AACxE,UAAU,WAAW;IACjB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE;QAChB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAA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I,MAAM,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,IAAI,CAuBjD;IAED,wBAAwB;IACjB,MAAM,IAAI,UAAU,CAS1B;IAED,OAAO,CAAC,IAAI;CAQf;AAED,kGAAkG;AAClG,eAAO,MAAM,aAAa,QAAO,MAAyE,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// src/debugger/profiler.ts
|
|
2
|
+
/** The id of the call tree's root, `(root)`, which every stack hangs from. */
|
|
3
|
+
var ROOT = 1;
|
|
4
|
+
/** One profile, from `startProfiler` to `stopProfiler`. */
|
|
5
|
+
var ScriptProfiler = class {
|
|
6
|
+
clock;
|
|
7
|
+
toPath;
|
|
8
|
+
startTime;
|
|
9
|
+
last;
|
|
10
|
+
nodes = [];
|
|
11
|
+
/** The child of each node by its function's key, so a stack seen again reuses its nodes. */
|
|
12
|
+
childByKey = /* @__PURE__ */ new Map();
|
|
13
|
+
samples = [];
|
|
14
|
+
timeDeltas = [];
|
|
15
|
+
/**
|
|
16
|
+
* @param clock - The time in microseconds, which labels each sample.
|
|
17
|
+
* @param toPath - Turns an engine file name into the path the extension knows it by.
|
|
18
|
+
*/
|
|
19
|
+
constructor(clock, toPath = (file) => file) {
|
|
20
|
+
this.clock = clock;
|
|
21
|
+
this.toPath = toPath;
|
|
22
|
+
this.startTime = clock();
|
|
23
|
+
this.last = this.startTime;
|
|
24
|
+
this.nodes.push(this.node(ROOT, "(root)", "", 0, 0));
|
|
25
|
+
}
|
|
26
|
+
/** How many stacks the profile holds. */
|
|
27
|
+
get sampleCount() {
|
|
28
|
+
return this.samples.length;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Adds one sample: the stack a poll found, innermost frame first, as
|
|
32
|
+
* {@link EngineDebugger.frames} lists it. A function is one node under each caller, whatever
|
|
33
|
+
* line of it was running.
|
|
34
|
+
*/
|
|
35
|
+
sample(frames) {
|
|
36
|
+
let parent = ROOT;
|
|
37
|
+
for (let index = frames.length - 1; index >= 0; index--) {
|
|
38
|
+
const frame = frames[index];
|
|
39
|
+
if (frame === void 0) continue;
|
|
40
|
+
const name = frame.name === "" ? "(anonymous)" : frame.name;
|
|
41
|
+
const url = frame.file === "" ? "" : this.toPath(frame.file);
|
|
42
|
+
const key = `${parent}\0${name}\0${url}`;
|
|
43
|
+
let id = this.childByKey.get(key);
|
|
44
|
+
if (id === void 0) {
|
|
45
|
+
id = this.nodes.length + 1;
|
|
46
|
+
this.nodes.push(this.node(id, name, url, frame.line - 1, frame.column));
|
|
47
|
+
this.nodes[parent - 1]?.children.push(id);
|
|
48
|
+
this.childByKey.set(key, id);
|
|
49
|
+
}
|
|
50
|
+
parent = id;
|
|
51
|
+
}
|
|
52
|
+
const leaf = this.nodes[parent - 1];
|
|
53
|
+
if (leaf !== void 0) leaf.hitCount++;
|
|
54
|
+
const now = this.clock();
|
|
55
|
+
this.samples.push(parent);
|
|
56
|
+
this.timeDeltas.push(now - this.last);
|
|
57
|
+
this.last = now;
|
|
58
|
+
}
|
|
59
|
+
/** Ends the profile. */
|
|
60
|
+
finish() {
|
|
61
|
+
return {
|
|
62
|
+
nodes: this.nodes,
|
|
63
|
+
startTime: this.startTime,
|
|
64
|
+
endTime: this.clock(),
|
|
65
|
+
samples: this.samples,
|
|
66
|
+
timeDeltas: this.timeDeltas,
|
|
67
|
+
$vscode: {
|
|
68
|
+
rootPath: ".",
|
|
69
|
+
locations: []
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
node(id, functionName, url, lineNumber, columnNumber) {
|
|
74
|
+
return {
|
|
75
|
+
id,
|
|
76
|
+
callFrame: {
|
|
77
|
+
functionName,
|
|
78
|
+
scriptId: url === "" ? "0" : url,
|
|
79
|
+
url,
|
|
80
|
+
lineNumber,
|
|
81
|
+
columnNumber
|
|
82
|
+
},
|
|
83
|
+
hitCount: 0,
|
|
84
|
+
children: []
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
/** The time in microseconds since the epoch, which BDS's captures use for their start and end. */
|
|
89
|
+
var profilerClock = () => Math.round((performance.timeOrigin + performance.now()) * 1e3);
|
|
90
|
+
export { ScriptProfiler, profilerClock };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=profiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiler.js","names":[],"sources":["../../src/debugger/profiler.ts"],"sourcesContent":["/**\n * The script profiler the extension's `startProfiler` and `stopProfiler` messages drive. It\n * samples the stack of the debugged pack at each of the debugger's polls, which come every\n * `pollLines` lines a script runs, and hands back a V8 `.cpuprofile`, the format the pinned\n * Bedrock Dedicated Server (BDS) sends in its `ProfilerCapture` event and VS Code opens.\n *\n * The samples count lines rather than time: a script that runs fewer lines than the poll interval\n * between two ticks is never sampled. The clock only labels the samples, as the format asks.\n */\n\nimport type { DebugFrame } from './EngineDebugger';\n\n/** A node of a `.cpuprofile`'s call tree, as V8 and VS Code read it. */\ninterface ProfileNode {\n readonly id: number;\n readonly callFrame: {\n readonly functionName: string;\n readonly scriptId: string;\n readonly url: string;\n /** Zero-based, as in the Chrome DevTools Protocol. */\n readonly lineNumber: number;\n readonly columnNumber: number;\n };\n hitCount: number;\n readonly children: number[];\n}\n\n/** A finished profile: the `.cpuprofile` JSON the extension writes to a file. */\nexport interface CpuProfile {\n readonly nodes: readonly ProfileNode[];\n readonly startTime: number;\n readonly endTime: number;\n readonly samples: readonly number[];\n readonly timeDeltas: readonly number[];\n /**\n * VS Code's source locations. The extension reads `locations` to map a capture through source\n * maps and fails without it; BDS sends `{ rootPath: '.', locations: [] }`.\n */\n readonly $vscode: { readonly rootPath: string; readonly locations: readonly unknown[] };\n}\n\n/** The id of the call tree's root, `(root)`, which every stack hangs from. */\nconst ROOT = 1;\n\n/** One profile, from `startProfiler` to `stopProfiler`. */\nexport class ScriptProfiler {\n private readonly clock: () => number;\n private readonly toPath: (file: string) => string;\n private readonly startTime: number;\n private last: number;\n private readonly nodes: ProfileNode[] = [];\n /** The child of each node by its function's key, so a stack seen again reuses its nodes. */\n private readonly childByKey = new Map<string, number>();\n private readonly samples: number[] = [];\n private readonly timeDeltas: number[] = [];\n\n /**\n * @param clock - The time in microseconds, which labels each sample.\n * @param toPath - Turns an engine file name into the path the extension knows it by.\n */\n public constructor(clock: () => number, toPath: (file: string) => string = (file) => file) {\n this.clock = clock;\n this.toPath = toPath;\n this.startTime = clock();\n this.last = this.startTime;\n this.nodes.push(this.node(ROOT, '(root)', '', 0, 0));\n }\n\n /** How many stacks the profile holds. */\n public get sampleCount(): number {\n return this.samples.length;\n }\n\n /**\n * Adds one sample: the stack a poll found, innermost frame first, as\n * {@link EngineDebugger.frames} lists it. A function is one node under each caller, whatever\n * line of it was running.\n */\n public sample(frames: readonly DebugFrame[]): void {\n let parent = ROOT;\n for (let index = frames.length - 1; index >= 0; index--) {\n const frame = frames[index];\n if (frame === undefined) continue;\n const name = frame.name === '' ? '(anonymous)' : frame.name;\n const url = frame.file === '' ? '' : this.toPath(frame.file);\n const key = `${parent}\\0${name}\\0${url}`;\n let id = this.childByKey.get(key);\n if (id === undefined) {\n id = this.nodes.length + 1;\n this.nodes.push(this.node(id, name, url, frame.line - 1, frame.column));\n this.nodes[parent - 1]?.children.push(id);\n this.childByKey.set(key, id);\n }\n parent = id;\n }\n const leaf = this.nodes[parent - 1];\n if (leaf !== undefined) leaf.hitCount++;\n const now = this.clock();\n this.samples.push(parent);\n this.timeDeltas.push(now - this.last);\n this.last = now;\n }\n\n /** Ends the profile. */\n public finish(): CpuProfile {\n return {\n nodes: this.nodes,\n startTime: this.startTime,\n endTime: this.clock(),\n samples: this.samples,\n timeDeltas: this.timeDeltas,\n $vscode: { rootPath: '.', locations: [] }\n };\n }\n\n private node(id: number, functionName: string, url: string, lineNumber: number, columnNumber: number): ProfileNode {\n return {\n id,\n callFrame: { functionName, scriptId: url === '' ? '0' : url, url, lineNumber, columnNumber },\n hitCount: 0,\n children: []\n };\n }\n}\n\n/** The time in microseconds since the epoch, which BDS's captures use for their start and end. */\nexport const profilerClock = (): number => Math.round((performance.timeOrigin + performance.now()) * 1000);\n"],"mappings":";;AA0CA,IAAM,OAAO;;AAGb,IAAa,iBAAb,MAA4B;CACxB;CACA;CACA;CACA;CACA,QAAwC,CAAC;;CAEzC,6BAA8B,IAAI,IAAoB;CACtD,UAAqC,CAAC;CACtC,aAAwC,CAAC;;;;;CAMzC,YAAmB,OAAqB,UAAoC,SAAS,MAAM;EACvF,KAAK,QAAQ;EACb,KAAK,SAAS;EACd,KAAK,YAAY,MAAM;EACvB,KAAK,OAAO,KAAK;EACjB,KAAK,MAAM,KAAK,KAAK,KAAK,MAAM,UAAU,IAAI,GAAG,CAAC,CAAC;CACvD;;CAGA,IAAW,cAAsB;EAC7B,OAAO,KAAK,QAAQ;CACxB;;;;;;CAOA,OAAc,QAAqC;EAC/C,IAAI,SAAS;EACb,KAAK,IAAI,QAAQ,OAAO,SAAS,GAAG,SAAS,GAAG,SAAS;GACrD,MAAM,QAAQ,OAAO;GACrB,IAAI,UAAU,KAAA,GAAW;GACzB,MAAM,OAAO,MAAM,SAAS,KAAK,gBAAgB,MAAM;GACvD,MAAM,MAAM,MAAM,SAAS,KAAK,KAAK,KAAK,OAAO,MAAM,IAAI;GAC3D,MAAM,MAAM,GAAG,OAAO,IAAI,KAAK,IAAI;GACnC,IAAI,KAAK,KAAK,WAAW,IAAI,GAAG;GAChC,IAAI,OAAO,KAAA,GAAW;IAClB,KAAK,KAAK,MAAM,SAAS;IACzB,KAAK,MAAM,KAAK,KAAK,KAAK,IAAI,MAAM,KAAK,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC;IACtE,KAAK,MAAM,SAAS,EAAE,EAAE,SAAS,KAAK,EAAE;IACxC,KAAK,WAAW,IAAI,KAAK,EAAE;GAC/B;GACA,SAAS;EACb;EACA,MAAM,OAAO,KAAK,MAAM,SAAS;EACjC,IAAI,SAAS,KAAA,GAAW,KAAK;EAC7B,MAAM,MAAM,KAAK,MAAM;EACvB,KAAK,QAAQ,KAAK,MAAM;EACxB,KAAK,WAAW,KAAK,MAAM,KAAK,IAAI;EACpC,KAAK,OAAO;CAChB;;CAGA,SAA4B;EACxB,OAAO;GACH,OAAO,KAAK;GACZ,WAAW,KAAK;GAChB,SAAS,KAAK,MAAM;GACpB,SAAS,KAAK;GACd,YAAY,KAAK;GACjB,SAAS;IAAE,UAAU;IAAK,WAAW,CAAC;GAAE;EAC5C;CACJ;CAEA,KAAa,IAAY,cAAsB,KAAa,YAAoB,cAAmC;EAC/G,OAAO;GACH;GACA,WAAW;IAAE;IAAc,UAAU,QAAQ,KAAK,MAAM;IAAK;IAAK;IAAY;GAAa;GAC3F,UAAU;GACV,UAAU,CAAC;EACf;CACJ;AACJ;;AAGA,IAAa,sBAA8B,KAAK,OAAO,YAAY,aAAa,YAAY,IAAI,KAAK,GAAI"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The messages of the protocol Mojang's Minecraft Bedrock Debugger for VS Code speaks
|
|
3
|
+
* (`Mojang/minecraft-debugger`, MIT), which the extension took from koush's QuickJS debugger. The
|
|
4
|
+
* shapes follow the extension's `src/protocol-events.ts` and `src/session.ts` at v1.61.0.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The protocol version the host offers. The extension echoes any version from 2 up to its own
|
|
8
|
+
* `DEBUGGER_PROTOCOL_VERSION` (`src/protocol-events.ts`), and 11 is that constant in v1.61.0.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DEBUGGER_PROTOCOL_VERSION = 11;
|
|
11
|
+
/** The port the extension and Bedrock Dedicated Server use when none is given. */
|
|
12
|
+
export declare const DEFAULT_DEBUGGER_PORT = 19144;
|
|
13
|
+
/** The level of a printed or notified message, as the extension's `LogLevel` numbers them. */
|
|
14
|
+
export declare const LogLevel: {
|
|
15
|
+
readonly verbose: 0;
|
|
16
|
+
readonly log: 1;
|
|
17
|
+
readonly warn: 2;
|
|
18
|
+
readonly error: 3;
|
|
19
|
+
};
|
|
20
|
+
/** One script pack the extension may debug: its name and the UUID of its script module. */
|
|
21
|
+
export interface DebuggerPlugin {
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly module_uuid: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One statistic of a `StatEvent2`, the extension's `StatDataModel` (`src/stats/stats-provider.ts`):
|
|
27
|
+
* a value for this tick, or a group of named children.
|
|
28
|
+
*/
|
|
29
|
+
export interface DebuggerStat {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly should_aggregate: boolean;
|
|
32
|
+
/** The values; the last one is this tick's. */
|
|
33
|
+
readonly values?: readonly (number | string)[];
|
|
34
|
+
readonly children?: readonly DebuggerStat[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A tab of the extension's diagnostics panel, the extension's `DiagnosticsTabDescriptor`
|
|
38
|
+
* (`src/diagnostics-schema.ts`), with the fields Bedrock Dedicated Server (BDS) fills.
|
|
39
|
+
*/
|
|
40
|
+
export interface DiagnosticsTab {
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly stat_group_id: string;
|
|
43
|
+
readonly data_source: 'server' | 'client' | 'server_script';
|
|
44
|
+
readonly display_type: string;
|
|
45
|
+
readonly is_empty_tab: boolean;
|
|
46
|
+
readonly y_label?: string;
|
|
47
|
+
readonly tick_range?: number;
|
|
48
|
+
readonly value_scalar?: number;
|
|
49
|
+
readonly key_label?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The tabs the pinned BDS 1.26.51.1 sends in its `SchemaEvent`, captured from its wire: two for a
|
|
53
|
+
* client's frame timings and memory, which a dedicated server never fills, and the engine's
|
|
54
|
+
* memory table, which the `scripting_engine` statistic fills.
|
|
55
|
+
*/
|
|
56
|
+
export declare const DIAGNOSTICS_TABS: readonly DiagnosticsTab[];
|
|
57
|
+
/** The events the host sends, each inside an `{ type: 'event', event }` envelope. */
|
|
58
|
+
export type DebuggerEvent = {
|
|
59
|
+
readonly type: 'ProtocolEvent';
|
|
60
|
+
readonly version: number;
|
|
61
|
+
readonly plugins: readonly DebuggerPlugin[];
|
|
62
|
+
readonly require_passcode?: boolean;
|
|
63
|
+
} | {
|
|
64
|
+
readonly type: 'StoppedEvent';
|
|
65
|
+
readonly reason: string;
|
|
66
|
+
readonly thread: number;
|
|
67
|
+
} | {
|
|
68
|
+
readonly type: 'ThreadEvent';
|
|
69
|
+
readonly reason: 'new' | 'exited';
|
|
70
|
+
readonly thread: number;
|
|
71
|
+
} | {
|
|
72
|
+
readonly type: 'PrintEvent';
|
|
73
|
+
readonly message: string;
|
|
74
|
+
readonly logLevel: number;
|
|
75
|
+
} | {
|
|
76
|
+
readonly type: 'NotificationEvent';
|
|
77
|
+
readonly message: string;
|
|
78
|
+
readonly logLevel: number;
|
|
79
|
+
} | {
|
|
80
|
+
readonly type: 'StatEvent2';
|
|
81
|
+
readonly tick: number;
|
|
82
|
+
readonly stats: readonly DebuggerStat[];
|
|
83
|
+
} | {
|
|
84
|
+
readonly type: 'SchemaEvent';
|
|
85
|
+
readonly descriptors: readonly DiagnosticsTab[];
|
|
86
|
+
}
|
|
87
|
+
/** A CPU profile, `.cpuprofile` JSON in base64, for the extension to write under `capture_base_path`. */
|
|
88
|
+
| {
|
|
89
|
+
readonly type: 'ProfilerCapture';
|
|
90
|
+
readonly capture_base_path: string;
|
|
91
|
+
readonly capture_data: string;
|
|
92
|
+
}
|
|
93
|
+
/** The host ends the session; BDS sends it just before it closes the connection. */
|
|
94
|
+
| {
|
|
95
|
+
readonly type: 'terminated';
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* A message the host sends. A response answers a `request` by its `request_seq`, with a body or
|
|
99
|
+
* an error. `debuggee-response` answers a `debugger-request`; the extension reads it from the
|
|
100
|
+
* envelope's `event` field (`receiveDebugeeMessage` in `src/session.ts`).
|
|
101
|
+
*/
|
|
102
|
+
export type HostMessage = {
|
|
103
|
+
readonly type: 'event';
|
|
104
|
+
readonly event: DebuggerEvent;
|
|
105
|
+
} | {
|
|
106
|
+
readonly type: 'response';
|
|
107
|
+
readonly request_seq: number;
|
|
108
|
+
readonly body?: unknown;
|
|
109
|
+
readonly error?: string;
|
|
110
|
+
} | {
|
|
111
|
+
readonly type: 'debuggee-response';
|
|
112
|
+
readonly event: {
|
|
113
|
+
readonly type: 'debuggee-response';
|
|
114
|
+
readonly request_seq: number;
|
|
115
|
+
readonly success: boolean;
|
|
116
|
+
readonly response_message?: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
/** A Debug Adapter Protocol request the extension forwards: `stackTrace`, `next` and the rest. */
|
|
120
|
+
export interface ForwardedRequest {
|
|
121
|
+
readonly request_seq: number;
|
|
122
|
+
readonly command: string;
|
|
123
|
+
readonly args: Record<string, unknown>;
|
|
124
|
+
}
|
|
125
|
+
/** A message the extension sends, parsed into what the host acts on. */
|
|
126
|
+
export type ExtensionMessage = {
|
|
127
|
+
readonly type: 'protocol';
|
|
128
|
+
readonly version: number;
|
|
129
|
+
readonly targetModuleUuid: string | undefined;
|
|
130
|
+
readonly passcode: string | undefined;
|
|
131
|
+
} | {
|
|
132
|
+
readonly type: 'request';
|
|
133
|
+
readonly request: ForwardedRequest;
|
|
134
|
+
} | {
|
|
135
|
+
readonly type: 'breakpoints';
|
|
136
|
+
readonly path: string;
|
|
137
|
+
readonly lines: readonly number[];
|
|
138
|
+
} | {
|
|
139
|
+
readonly type: 'stopOnException';
|
|
140
|
+
readonly stop: boolean;
|
|
141
|
+
} | {
|
|
142
|
+
readonly type: 'resume';
|
|
143
|
+
} | {
|
|
144
|
+
readonly type: 'minecraftCommand';
|
|
145
|
+
readonly command: string;
|
|
146
|
+
readonly dimension: string;
|
|
147
|
+
} | {
|
|
148
|
+
readonly type: 'debugger-request';
|
|
149
|
+
readonly request_seq: number;
|
|
150
|
+
readonly request: string;
|
|
151
|
+
} | {
|
|
152
|
+
readonly type: 'startProfiler';
|
|
153
|
+
} | {
|
|
154
|
+
readonly type: 'stopProfiler';
|
|
155
|
+
readonly capturesPath: string;
|
|
156
|
+
} | {
|
|
157
|
+
readonly type: 'other';
|
|
158
|
+
readonly name: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Reads one message from the extension. The shapes of protocol 8 and later are flat, and the
|
|
162
|
+
* older ones nest their fields one level down (`src/protocol-events.ts`), so both are read.
|
|
163
|
+
* @param message - A parsed JSON message.
|
|
164
|
+
* @returns The message, or `other` for a type the host does not act on.
|
|
165
|
+
* @throws {TypeError} When the message is not an object with a `type`.
|
|
166
|
+
*/
|
|
167
|
+
export declare const parseExtensionMessage: (message: unknown) => ExtensionMessage;
|
|
168
|
+
/** Reads the lines of a `setBreakpoints` request, which protocol 6 and later send as a request. */
|
|
169
|
+
export declare const requestedBreakpointLines: (args: Record<string, unknown>) => number[];
|
|
170
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sources":["../../src/debugger/protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;GAGG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,kFAAkF;AAClF,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,QAAQ;aAAK,OAAO,EAAE,CAAC;aAAE,GAAG,EAAE,CAAC;aAAE,IAAI,EAAE,CAAC;aAAE,KAAK,EAAE,CAAC;CAAW,CAAC;AAE3E,2FAA2F;AAC3F,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,+CAA+C;IAC/C,QA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