@verticopolis/components 0.0.0-stage → 0.2.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/ASSETS-LICENSE.md +49 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/lib/audio/Audio.d.ts +110 -0
- package/lib/audio/Audio.js +199 -0
- package/lib/audio/Audio.js.map +1 -0
- package/lib/audio/ToneAudioEngine.d.ts +125 -0
- package/lib/audio/ToneAudioEngine.js +452 -0
- package/lib/audio/ToneAudioEngine.js.map +1 -0
- package/lib/audio/audioAssets.d.ts +25 -0
- package/lib/audio/audioAssets.js +28 -0
- package/lib/audio/audioAssets.js.map +1 -0
- package/lib/audio/awayWatch.d.ts +17 -0
- package/lib/audio/awayWatch.js +33 -0
- package/lib/audio/awayWatch.js.map +1 -0
- package/lib/audio/firstCueLatch.d.ts +18 -0
- package/lib/audio/firstCueLatch.js +34 -0
- package/lib/audio/firstCueLatch.js.map +1 -0
- package/lib/audio/lightEnvelope.d.ts +64 -0
- package/lib/audio/lightEnvelope.js +124 -0
- package/lib/audio/lightEnvelope.js.map +1 -0
- package/lib/audio/lightSynth.d.ts +125 -0
- package/lib/audio/lightSynth.js +203 -0
- package/lib/audio/lightSynth.js.map +1 -0
- package/lib/audio/toneContext.d.ts +30 -0
- package/lib/audio/toneContext.js +79 -0
- package/lib/audio/toneContext.js.map +1 -0
- package/lib/audio/toneCrowd.d.ts +62 -0
- package/lib/audio/toneCrowd.js +429 -0
- package/lib/audio/toneCrowd.js.map +1 -0
- package/lib/audio/toneCrowdData.d.ts +144 -0
- package/lib/audio/toneCrowdData.js +317 -0
- package/lib/audio/toneCrowdData.js.map +1 -0
- package/lib/audio/toneCrowdPrograms.d.ts +71 -0
- package/lib/audio/toneCrowdPrograms.js +273 -0
- package/lib/audio/toneCrowdPrograms.js.map +1 -0
- package/lib/audio/toneCrowdVoices.d.ts +49 -0
- package/lib/audio/toneCrowdVoices.js +212 -0
- package/lib/audio/toneCrowdVoices.js.map +1 -0
- package/lib/audio/toneMusicVoices.d.ts +11 -0
- package/lib/audio/toneMusicVoices.js +31 -0
- package/lib/audio/toneMusicVoices.js.map +1 -0
- package/lib/audio/tonePercussion.d.ts +45 -0
- package/lib/audio/tonePercussion.js +97 -0
- package/lib/audio/tonePercussion.js.map +1 -0
- package/lib/audio/toneRain.d.ts +23 -0
- package/lib/audio/toneRain.js +39 -0
- package/lib/audio/toneRain.js.map +1 -0
- package/lib/audio/toneRecordingMock.d.ts +89 -0
- package/lib/audio/toneRecordingMock.js +145 -0
- package/lib/audio/toneRecordingMock.js.map +1 -0
- package/lib/audio/toneRoomTone.d.ts +11 -0
- package/lib/audio/toneRoomTone.js +27 -0
- package/lib/audio/toneRoomTone.js.map +1 -0
- package/lib/audio/toneScenes.d.ts +57 -0
- package/lib/audio/toneScenes.js +208 -0
- package/lib/audio/toneScenes.js.map +1 -0
- package/lib/audio/toneTracks.d.ts +50 -0
- package/lib/audio/toneTracks.js +356 -0
- package/lib/audio/toneTracks.js.map +1 -0
- package/lib/audio/toneVoices.d.ts +57 -0
- package/lib/audio/toneVoices.js +208 -0
- package/lib/audio/toneVoices.js.map +1 -0
- package/lib/catalog/catalogTypes.d.ts +428 -0
- package/lib/catalog/catalogTypes.js +102 -0
- package/lib/catalog/catalogTypes.js.map +1 -0
- package/lib/catalog/skyBridgeTypes.d.ts +25 -0
- package/lib/catalog/skyBridgeTypes.js +7 -0
- package/lib/catalog/skyBridgeTypes.js.map +1 -0
- package/lib/catalog/starDutyTypes.d.ts +22 -0
- package/lib/catalog/starDutyTypes.js +7 -0
- package/lib/catalog/starDutyTypes.js.map +1 -0
- package/lib/catalog/towerCatalog.d.ts +32 -0
- package/lib/catalog/towerCatalog.js +44 -0
- package/lib/catalog/towerCatalog.js.map +1 -0
- package/lib/engineBinding/binding.d.ts +36 -0
- package/lib/engineBinding/binding.js +90 -0
- package/lib/engineBinding/binding.js.map +1 -0
- package/lib/engineBinding/catalog.d.ts +24 -0
- package/lib/engineBinding/catalog.js +267 -0
- package/lib/engineBinding/catalog.js.map +1 -0
- package/lib/engineBinding/engine.d.ts +866 -0
- package/lib/engineBinding/exportTiers.d.ts +289 -0
- package/lib/engineBinding/exportTiers.js +283 -0
- package/lib/engineBinding/exportTiers.js.map +1 -0
- package/lib/engineBinding/toolingMethods.d.ts +12 -0
- package/lib/engineBinding/toolingMethods.js +20 -0
- package/lib/engineBinding/toolingMethods.js.map +1 -0
- package/lib/events/gameplayCatalog.d.ts +57 -0
- package/lib/events/gameplayCatalog.js +214 -0
- package/lib/events/gameplayCatalog.js.map +1 -0
- package/lib/events/gameplayEventRules.d.ts +4 -0
- package/lib/events/gameplayEventRules.js +32 -0
- package/lib/events/gameplayEventRules.js.map +1 -0
- package/lib/events/gameplayEvents.d.ts +284 -0
- package/lib/presentation/clockText.d.ts +28 -0
- package/lib/presentation/clockText.js +38 -0
- package/lib/presentation/clockText.js.map +1 -0
- package/lib/presentation/facilityPresentation.d.ts +20 -0
- package/lib/presentation/facilityPresentation.js +164 -0
- package/lib/presentation/facilityPresentation.js.map +1 -0
- package/lib/presentation/statsCopy.d.ts +20 -0
- package/lib/presentation/statsCopy.js +37 -0
- package/lib/presentation/statsCopy.js.map +1 -0
- package/lib/presentation/traffic.d.ts +75 -0
- package/lib/presentation/traffic.js +79 -0
- package/lib/presentation/traffic.js.map +1 -0
- package/lib/presentation/viewKinds.d.ts +33 -0
- package/lib/presentation/viewKinds.js +88 -0
- package/lib/presentation/viewKinds.js.map +1 -0
- package/lib/presentation/viewWorld.d.ts +29 -0
- package/lib/presentation/viewWorld.js +31 -0
- package/lib/presentation/viewWorld.js.map +1 -0
- package/lib/render/atlas/archive.d.ts +78 -0
- package/lib/render/atlas/archive.js +427 -0
- package/lib/render/atlas/archive.js.map +1 -0
- package/lib/render/atlas/bake.d.ts +132 -0
- package/lib/render/atlas/bake.js +331 -0
- package/lib/render/atlas/bake.js.map +1 -0
- package/lib/render/atlas/bakeAdditions.d.ts +24 -0
- package/lib/render/atlas/bakeAdditions.js +46 -0
- package/lib/render/atlas/bakeAdditions.js.map +1 -0
- package/lib/render/atlas/browserEntry.d.ts +12 -0
- package/lib/render/atlas/browserEntry.js +222 -0
- package/lib/render/atlas/browserEntry.js.map +1 -0
- package/lib/render/atlas/catalog.d.ts +118 -0
- package/lib/render/atlas/catalog.js +253 -0
- package/lib/render/atlas/catalog.js.map +1 -0
- package/lib/render/atlas/catalogExtras.d.ts +45 -0
- package/lib/render/atlas/catalogExtras.js +217 -0
- package/lib/render/atlas/catalogExtras.js.map +1 -0
- package/lib/render/atlas/compose.d.ts +30 -0
- package/lib/render/atlas/compose.js +125 -0
- package/lib/render/atlas/compose.js.map +1 -0
- package/lib/render/atlas/cycles.d.ts +25 -0
- package/lib/render/atlas/cycles.js +41 -0
- package/lib/render/atlas/cycles.js.map +1 -0
- package/lib/render/atlas/lookup.d.ts +65 -0
- package/lib/render/atlas/lookup.js +83 -0
- package/lib/render/atlas/lookup.js.map +1 -0
- package/lib/render/atlas/pack.d.ts +23 -0
- package/lib/render/atlas/pack.js +50 -0
- package/lib/render/atlas/pack.js.map +1 -0
- package/lib/render/atlas/paint.d.ts +120 -0
- package/lib/render/atlas/paint.js +154 -0
- package/lib/render/atlas/paint.js.map +1 -0
- package/lib/render/atlas/pixels.d.ts +46 -0
- package/lib/render/atlas/pixels.js +158 -0
- package/lib/render/atlas/pixels.js.map +1 -0
- package/lib/render/atlas/png.d.ts +3 -0
- package/lib/render/atlas/png.js +102 -0
- package/lib/render/atlas/png.js.map +1 -0
- package/lib/render/atlas/raster.d.ts +34 -0
- package/lib/render/atlas/raster.js +114 -0
- package/lib/render/atlas/raster.js.map +1 -0
- package/lib/render/atlas/recyclingFill.d.ts +5 -0
- package/lib/render/atlas/recyclingFill.js +65 -0
- package/lib/render/atlas/recyclingFill.js.map +1 -0
- package/lib/render/atlas/samples.d.ts +24 -0
- package/lib/render/atlas/samples.js +75 -0
- package/lib/render/atlas/samples.js.map +1 -0
- package/lib/render/atlas/scenery.d.ts +230 -0
- package/lib/render/atlas/scenery.js +242 -0
- package/lib/render/atlas/scenery.js.map +1 -0
- package/lib/render/atlas/schema.d.ts +189 -0
- package/lib/render/atlas/schema.js +31 -0
- package/lib/render/atlas/schema.js.map +1 -0
- package/lib/render/atlas/shellMarks.d.ts +16 -0
- package/lib/render/atlas/shellMarks.js +72 -0
- package/lib/render/atlas/shellMarks.js.map +1 -0
- package/lib/render/atlas/store.d.ts +75 -0
- package/lib/render/atlas/store.js +127 -0
- package/lib/render/atlas/store.js.map +1 -0
- package/lib/render/atlas/verify.d.ts +43 -0
- package/lib/render/atlas/verify.js +87 -0
- package/lib/render/atlas/verify.js.map +1 -0
- package/lib/render/atlas/verifyExtras.d.ts +19 -0
- package/lib/render/atlas/verifyExtras.js +310 -0
- package/lib/render/atlas/verifyExtras.js.map +1 -0
- package/lib/render/cameraBounds.d.ts +71 -0
- package/lib/render/cameraBounds.js +107 -0
- package/lib/render/cameraBounds.js.map +1 -0
- package/lib/render/carIndicator.d.ts +41 -0
- package/lib/render/carIndicator.js +45 -0
- package/lib/render/carIndicator.js.map +1 -0
- package/lib/render/carMotion.d.ts +33 -0
- package/lib/render/carMotion.js +42 -0
- package/lib/render/carMotion.js.map +1 -0
- package/lib/render/catalogScale.d.ts +40 -0
- package/lib/render/catalogScale.js +33 -0
- package/lib/render/catalogScale.js.map +1 -0
- package/lib/render/climbPath.d.ts +59 -0
- package/lib/render/climbPath.js +115 -0
- package/lib/render/climbPath.js.map +1 -0
- package/lib/render/depthPlanes.d.ts +55 -0
- package/lib/render/depthPlanes.js +58 -0
- package/lib/render/depthPlanes.js.map +1 -0
- package/lib/render/excalibur/TowerEngine.d.ts +348 -0
- package/lib/render/excalibur/TowerEngine.js +415 -0
- package/lib/render/excalibur/TowerEngine.js.map +1 -0
- package/lib/render/excalibur/cabGraphics.d.ts +75 -0
- package/lib/render/excalibur/cabGraphics.js +108 -0
- package/lib/render/excalibur/cabGraphics.js.map +1 -0
- package/lib/render/excalibur/cabParts.d.ts +32 -0
- package/lib/render/excalibur/cabParts.js +79 -0
- package/lib/render/excalibur/cabParts.js.map +1 -0
- package/lib/render/excalibur/cabRiders.d.ts +72 -0
- package/lib/render/excalibur/cabRiders.js +176 -0
- package/lib/render/excalibur/cabRiders.js.map +1 -0
- package/lib/render/excalibur/crowdCull.d.ts +34 -0
- package/lib/render/excalibur/crowdCull.js +72 -0
- package/lib/render/excalibur/crowdCull.js.map +1 -0
- package/lib/render/excalibur/crowdFigure.d.ts +42 -0
- package/lib/render/excalibur/crowdFigure.js +99 -0
- package/lib/render/excalibur/crowdFigure.js.map +1 -0
- package/lib/render/excalibur/crowdLook.d.ts +137 -0
- package/lib/render/excalibur/crowdLook.js +186 -0
- package/lib/render/excalibur/crowdLook.js.map +1 -0
- package/lib/render/excalibur/frameHold.d.ts +23 -0
- package/lib/render/excalibur/frameHold.js +30 -0
- package/lib/render/excalibur/frameHold.js.map +1 -0
- package/lib/render/excalibur/guardPosition.d.ts +17 -0
- package/lib/render/excalibur/guardPosition.js +37 -0
- package/lib/render/excalibur/guardPosition.js.map +1 -0
- package/lib/render/excalibur/keyboardHost.d.ts +15 -0
- package/lib/render/excalibur/keyboardHost.js +22 -0
- package/lib/render/excalibur/keyboardHost.js.map +1 -0
- package/lib/render/excalibur/longPress.d.ts +16 -0
- package/lib/render/excalibur/longPress.js +71 -0
- package/lib/render/excalibur/longPress.js.map +1 -0
- package/lib/render/excalibur/peopleGfx.d.ts +16 -0
- package/lib/render/excalibur/peopleGfx.js +46 -0
- package/lib/render/excalibur/peopleGfx.js.map +1 -0
- package/lib/render/excalibur/peopleWindow.d.ts +35 -0
- package/lib/render/excalibur/peopleWindow.js +38 -0
- package/lib/render/excalibur/peopleWindow.js.map +1 -0
- package/lib/render/excalibur/personFocus.d.ts +36 -0
- package/lib/render/excalibur/personFocus.js +169 -0
- package/lib/render/excalibur/personFocus.js.map +1 -0
- package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
- package/lib/render/excalibur/pointerButtonGuard.js +86 -0
- package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
- package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
- package/lib/render/excalibur/pressLifecycle.js +66 -0
- package/lib/render/excalibur/pressLifecycle.js.map +1 -0
- package/lib/render/excalibur/rainShelter.d.ts +16 -0
- package/lib/render/excalibur/rainShelter.js +94 -0
- package/lib/render/excalibur/rainShelter.js.map +1 -0
- package/lib/render/excalibur/roomSignature.d.ts +30 -0
- package/lib/render/excalibur/roomSignature.js +49 -0
- package/lib/render/excalibur/roomSignature.js.map +1 -0
- package/lib/render/excalibur/sceneBake.d.ts +9 -0
- package/lib/render/excalibur/sceneBake.js +12 -0
- package/lib/render/excalibur/sceneBake.js.map +1 -0
- package/lib/render/excalibur/thiefSpan.d.ts +18 -0
- package/lib/render/excalibur/thiefSpan.js +51 -0
- package/lib/render/excalibur/thiefSpan.js.map +1 -0
- package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
- package/lib/render/excalibur/towerBridgeTiles.js +43 -0
- package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
- package/lib/render/excalibur/towerCrowd.d.ts +73 -0
- package/lib/render/excalibur/towerCrowd.js +464 -0
- package/lib/render/excalibur/towerCrowd.js.map +1 -0
- package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
- package/lib/render/excalibur/towerCrowdLayout.js +77 -0
- package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
- package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
- package/lib/render/excalibur/towerFireResponse.js +89 -0
- package/lib/render/excalibur/towerFireResponse.js.map +1 -0
- package/lib/render/excalibur/towerFrame.d.ts +8 -0
- package/lib/render/excalibur/towerFrame.js +57 -0
- package/lib/render/excalibur/towerFrame.js.map +1 -0
- package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
- package/lib/render/excalibur/towerGhostLabel.js +37 -0
- package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
- package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
- package/lib/render/excalibur/towerHallDoors.js +129 -0
- package/lib/render/excalibur/towerHallDoors.js.map +1 -0
- package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
- package/lib/render/excalibur/towerHaloRings.js +45 -0
- package/lib/render/excalibur/towerHaloRings.js.map +1 -0
- package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
- package/lib/render/excalibur/towerInputCamera.js +480 -0
- package/lib/render/excalibur/towerInputCamera.js.map +1 -0
- package/lib/render/excalibur/towerMetro.d.ts +31 -0
- package/lib/render/excalibur/towerMetro.js +115 -0
- package/lib/render/excalibur/towerMetro.js.map +1 -0
- package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
- package/lib/render/excalibur/towerNoiseReach.js +75 -0
- package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
- package/lib/render/excalibur/towerOverlay.d.ts +59 -0
- package/lib/render/excalibur/towerOverlay.js +453 -0
- package/lib/render/excalibur/towerOverlay.js.map +1 -0
- package/lib/render/excalibur/towerReconcile.d.ts +17 -0
- package/lib/render/excalibur/towerReconcile.js +404 -0
- package/lib/render/excalibur/towerReconcile.js.map +1 -0
- package/lib/render/excalibur/towerRegions.d.ts +61 -0
- package/lib/render/excalibur/towerRegions.js +193 -0
- package/lib/render/excalibur/towerRegions.js.map +1 -0
- package/lib/render/excalibur/towerScene.d.ts +66 -0
- package/lib/render/excalibur/towerScene.js +443 -0
- package/lib/render/excalibur/towerScene.js.map +1 -0
- package/lib/render/excalibur/towerScenery.d.ts +12 -0
- package/lib/render/excalibur/towerScenery.js +299 -0
- package/lib/render/excalibur/towerScenery.js.map +1 -0
- package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
- package/lib/render/excalibur/towerSceneryDraw.js +288 -0
- package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
- package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
- package/lib/render/excalibur/towerShaftNumbers.js +90 -0
- package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
- package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
- package/lib/render/excalibur/towerStructTiles.js +238 -0
- package/lib/render/excalibur/towerStructTiles.js.map +1 -0
- package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
- package/lib/render/excalibur/towerSyncSchedule.js +137 -0
- package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
- package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
- package/lib/render/excalibur/towerWalkerBuild.js +126 -0
- package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
- package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
- package/lib/render/excalibur/trafficSpotlight.js +64 -0
- package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
- package/lib/render/facadeGeometry.d.ts +50 -0
- package/lib/render/facadeGeometry.js +79 -0
- package/lib/render/facadeGeometry.js.map +1 -0
- package/lib/render/groundEntrances.d.ts +44 -0
- package/lib/render/groundEntrances.js +118 -0
- package/lib/render/groundEntrances.js.map +1 -0
- package/lib/render/lateNight.d.ts +14 -0
- package/lib/render/lateNight.js +18 -0
- package/lib/render/lateNight.js.map +1 -0
- package/lib/render/lobbyHalls.d.ts +44 -0
- package/lib/render/lobbyHalls.js +63 -0
- package/lib/render/lobbyHalls.js.map +1 -0
- package/lib/render/metroTrainSchedule.d.ts +20 -0
- package/lib/render/metroTrainSchedule.js +65 -0
- package/lib/render/metroTrainSchedule.js.map +1 -0
- package/lib/render/overviewMap/drawList.d.ts +67 -0
- package/lib/render/overviewMap/drawList.js +103 -0
- package/lib/render/overviewMap/drawList.js.map +1 -0
- package/lib/render/overviewMap/extent.d.ts +70 -0
- package/lib/render/overviewMap/extent.js +155 -0
- package/lib/render/overviewMap/extent.js.map +1 -0
- package/lib/render/overviewMap/floorSpans.d.ts +27 -0
- package/lib/render/overviewMap/floorSpans.js +32 -0
- package/lib/render/overviewMap/floorSpans.js.map +1 -0
- package/lib/render/overviewMap/gaps.d.ts +48 -0
- package/lib/render/overviewMap/gaps.js +148 -0
- package/lib/render/overviewMap/gaps.js.map +1 -0
- package/lib/render/overviewMap/geometry.d.ts +139 -0
- package/lib/render/overviewMap/geometry.js +245 -0
- package/lib/render/overviewMap/geometry.js.map +1 -0
- package/lib/render/overviewMap/heatView.d.ts +91 -0
- package/lib/render/overviewMap/heatView.js +143 -0
- package/lib/render/overviewMap/heatView.js.map +1 -0
- package/lib/render/overviewMap/hotelView.d.ts +82 -0
- package/lib/render/overviewMap/hotelView.js +136 -0
- package/lib/render/overviewMap/hotelView.js.map +1 -0
- package/lib/render/overviewMap/model.d.ts +97 -0
- package/lib/render/overviewMap/model.js +116 -0
- package/lib/render/overviewMap/model.js.map +1 -0
- package/lib/render/overviewMap/paint.d.ts +63 -0
- package/lib/render/overviewMap/paint.js +168 -0
- package/lib/render/overviewMap/paint.js.map +1 -0
- package/lib/render/overviewMap/style.d.ts +46 -0
- package/lib/render/overviewMap/style.js +117 -0
- package/lib/render/overviewMap/style.js.map +1 -0
- package/lib/render/overviewMap/tierView.d.ts +103 -0
- package/lib/render/overviewMap/tierView.js +209 -0
- package/lib/render/overviewMap/tierView.js.map +1 -0
- package/lib/render/overviewMap/viewMark.d.ts +69 -0
- package/lib/render/overviewMap/viewMark.js +103 -0
- package/lib/render/overviewMap/viewMark.js.map +1 -0
- package/lib/render/overviewMap/views.d.ts +24 -0
- package/lib/render/overviewMap/views.js +29 -0
- package/lib/render/overviewMap/views.js.map +1 -0
- package/lib/render/pinchTracker.d.ts +91 -0
- package/lib/render/pinchTracker.js +145 -0
- package/lib/render/pinchTracker.js.map +1 -0
- package/lib/render/pixelSprites/amusements.d.ts +32 -0
- package/lib/render/pixelSprites/amusements.js +243 -0
- package/lib/render/pixelSprites/amusements.js.map +1 -0
- package/lib/render/pixelSprites/artScale.d.ts +97 -0
- package/lib/render/pixelSprites/artScale.js +151 -0
- package/lib/render/pixelSprites/artScale.js.map +1 -0
- package/lib/render/pixelSprites/boutique.d.ts +30 -0
- package/lib/render/pixelSprites/boutique.js +244 -0
- package/lib/render/pixelSprites/boutique.js.map +1 -0
- package/lib/render/pixelSprites/clinic.d.ts +30 -0
- package/lib/render/pixelSprites/clinic.js +184 -0
- package/lib/render/pixelSprites/clinic.js.map +1 -0
- package/lib/render/pixelSprites/common.d.ts +185 -0
- package/lib/render/pixelSprites/common.js +449 -0
- package/lib/render/pixelSprites/common.js.map +1 -0
- package/lib/render/pixelSprites/daycare.d.ts +3 -0
- package/lib/render/pixelSprites/daycare.js +99 -0
- package/lib/render/pixelSprites/daycare.js.map +1 -0
- package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
- package/lib/render/pixelSprites/dollhouse.js +110 -0
- package/lib/render/pixelSprites/dollhouse.js.map +1 -0
- package/lib/render/pixelSprites/fitness.d.ts +30 -0
- package/lib/render/pixelSprites/fitness.js +176 -0
- package/lib/render/pixelSprites/fitness.js.map +1 -0
- package/lib/render/pixelSprites/food.d.ts +27 -0
- package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
- package/lib/render/pixelSprites/food.interiors.js +516 -0
- package/lib/render/pixelSprites/food.interiors.js.map +1 -0
- package/lib/render/pixelSprites/food.js +36 -0
- package/lib/render/pixelSprites/food.js.map +1 -0
- package/lib/render/pixelSprites/food.kit.d.ts +50 -0
- package/lib/render/pixelSprites/food.kit.js +140 -0
- package/lib/render/pixelSprites/food.kit.js.map +1 -0
- package/lib/render/pixelSprites/food.looks.d.ts +45 -0
- package/lib/render/pixelSprites/food.looks.js +56 -0
- package/lib/render/pixelSprites/food.looks.js.map +1 -0
- package/lib/render/pixelSprites/layers.d.ts +49 -0
- package/lib/render/pixelSprites/layers.js +61 -0
- package/lib/render/pixelSprites/layers.js.map +1 -0
- package/lib/render/pixelSprites/nightclub.d.ts +3 -0
- package/lib/render/pixelSprites/nightclub.js +108 -0
- package/lib/render/pixelSprites/nightclub.js.map +1 -0
- package/lib/render/pixelSprites/people.d.ts +168 -0
- package/lib/render/pixelSprites/people.js +431 -0
- package/lib/render/pixelSprites/people.js.map +1 -0
- package/lib/render/pixelSprites/residential.d.ts +5 -0
- package/lib/render/pixelSprites/residential.js +506 -0
- package/lib/render/pixelSprites/residential.js.map +1 -0
- package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
- package/lib/render/pixelSprites/residential.looks.js +43 -0
- package/lib/render/pixelSprites/residential.looks.js.map +1 -0
- package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
- package/lib/render/pixelSprites/residential.roaches.js +88 -0
- package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
- package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
- package/lib/render/pixelSprites/shop.d.ts +14 -0
- package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
- package/lib/render/pixelSprites/shop.interiors.js +382 -0
- package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
- package/lib/render/pixelSprites/shop.js +72 -0
- package/lib/render/pixelSprites/shop.js.map +1 -0
- package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
- package/lib/render/pixelSprites/shop.looks.js +24 -0
- package/lib/render/pixelSprites/shop.looks.js.map +1 -0
- package/lib/render/pixelSprites/skyBar.d.ts +11 -0
- package/lib/render/pixelSprites/skyBar.js +125 -0
- package/lib/render/pixelSprites/skyBar.js.map +1 -0
- package/lib/render/pixelSprites/spa.d.ts +3 -0
- package/lib/render/pixelSprites/spa.js +88 -0
- package/lib/render/pixelSprites/spa.js.map +1 -0
- package/lib/render/pixelSprites.d.ts +33 -0
- package/lib/render/pixelSprites.js +167 -0
- package/lib/render/pixelSprites.js.map +1 -0
- package/lib/render/regionGrid.d.ts +49 -0
- package/lib/render/regionGrid.js +82 -0
- package/lib/render/regionGrid.js.map +1 -0
- package/lib/render/regionPaint.d.ts +15 -0
- package/lib/render/regionPaint.js +33 -0
- package/lib/render/regionPaint.js.map +1 -0
- package/lib/render/renderSim.d.ts +104 -0
- package/lib/render/renderSim.js +2 -0
- package/lib/render/renderSim.js.map +1 -0
- package/lib/render/roomPortrait.d.ts +35 -0
- package/lib/render/roomPortrait.js +142 -0
- package/lib/render/roomPortrait.js.map +1 -0
- package/lib/render/roomShading.d.ts +29 -0
- package/lib/render/roomShading.js +43 -0
- package/lib/render/roomShading.js.map +1 -0
- package/lib/render/scale.d.ts +31 -0
- package/lib/render/scale.js +34 -0
- package/lib/render/scale.js.map +1 -0
- package/lib/render/sceneryLayout.d.ts +234 -0
- package/lib/render/sceneryLayout.js +199 -0
- package/lib/render/sceneryLayout.js.map +1 -0
- package/lib/render/sprites/common.d.ts +41 -0
- package/lib/render/sprites/common.js +46 -0
- package/lib/render/sprites/common.js.map +1 -0
- package/lib/render/sprites/escalator.d.ts +27 -0
- package/lib/render/sprites/escalator.js +156 -0
- package/lib/render/sprites/escalator.js.map +1 -0
- package/lib/render/sprites/events.d.ts +56 -0
- package/lib/render/sprites/events.js +280 -0
- package/lib/render/sprites/events.js.map +1 -0
- package/lib/render/sprites/facilities/garage.d.ts +23 -0
- package/lib/render/sprites/facilities/garage.js +230 -0
- package/lib/render/sprites/facilities/garage.js.map +1 -0
- package/lib/render/sprites/facilities/recycling.d.ts +3 -0
- package/lib/render/sprites/facilities/recycling.js +210 -0
- package/lib/render/sprites/facilities/recycling.js.map +1 -0
- package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
- package/lib/render/sprites/facilities/recyclingLook.js +52 -0
- package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
- package/lib/render/sprites/facilities/service.d.ts +14 -0
- package/lib/render/sprites/facilities/service.js +437 -0
- package/lib/render/sprites/facilities/service.js.map +1 -0
- package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
- package/lib/render/sprites/facilities/serviceKit.js +113 -0
- package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
- package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
- package/lib/render/sprites/facilities/vehicles.js +276 -0
- package/lib/render/sprites/facilities/vehicles.js.map +1 -0
- package/lib/render/sprites/facilities/venue.d.ts +28 -0
- package/lib/render/sprites/facilities/venue.js +211 -0
- package/lib/render/sprites/facilities/venue.js.map +1 -0
- package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
- package/lib/render/sprites/facilities/weddingHall.js +410 -0
- package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
- package/lib/render/sprites/facilities.d.ts +22 -0
- package/lib/render/sprites/facilities.js +24 -0
- package/lib/render/sprites/facilities.js.map +1 -0
- package/lib/render/sprites/helicopter.d.ts +11 -0
- package/lib/render/sprites/helicopter.js +60 -0
- package/lib/render/sprites/helicopter.js.map +1 -0
- package/lib/render/sprites/sky.d.ts +67 -0
- package/lib/render/sprites/sky.js +85 -0
- package/lib/render/sprites/sky.js.map +1 -0
- package/lib/render/sprites/spiralStair.d.ts +19 -0
- package/lib/render/sprites/spiralStair.js +111 -0
- package/lib/render/sprites/spiralStair.js.map +1 -0
- package/lib/render/sprites/structure/entrance.d.ts +35 -0
- package/lib/render/sprites/structure/entrance.js +347 -0
- package/lib/render/sprites/structure/entrance.js.map +1 -0
- package/lib/render/sprites/structure/lobby.d.ts +88 -0
- package/lib/render/sprites/structure/lobby.js +350 -0
- package/lib/render/sprites/structure/lobby.js.map +1 -0
- package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
- package/lib/render/sprites/structure/revolvingDoor.js +184 -0
- package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
- package/lib/render/sprites/structure/rooftop.d.ts +93 -0
- package/lib/render/sprites/structure/rooftop.js +302 -0
- package/lib/render/sprites/structure/rooftop.js.map +1 -0
- package/lib/render/sprites/structure/shell.d.ts +19 -0
- package/lib/render/sprites/structure/shell.js +142 -0
- package/lib/render/sprites/structure/shell.js.map +1 -0
- package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
- package/lib/render/sprites/structure/skyBridge.js +259 -0
- package/lib/render/sprites/structure/skyBridge.js.map +1 -0
- package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
- package/lib/render/sprites/structure/tallLobby.js +166 -0
- package/lib/render/sprites/structure/tallLobby.js.map +1 -0
- package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
- package/lib/render/sprites/structure.d.ts +15 -0
- package/lib/render/sprites/structure.js +16 -0
- package/lib/render/sprites/structure.js.map +1 -0
- package/lib/render/sprites/transport.d.ts +30 -0
- package/lib/render/sprites/transport.js +376 -0
- package/lib/render/sprites/transport.js.map +1 -0
- package/lib/render/sprites.d.ts +16 -0
- package/lib/render/sprites.js +108 -0
- package/lib/render/sprites.js.map +1 -0
- package/lib/render/venueFlights.d.ts +61 -0
- package/lib/render/venueFlights.js +50 -0
- package/lib/render/venueFlights.js.map +1 -0
- package/lib/shared/engineTypes.d.ts +256 -0
- package/lib/shared/engineTypes.js +8 -0
- package/lib/shared/engineTypes.js.map +1 -0
- package/lib/shared/floorRuns.d.ts +22 -0
- package/lib/shared/floorRuns.js +39 -0
- package/lib/shared/floorRuns.js.map +1 -0
- package/lib/shared/inputEvents.d.ts +18 -0
- package/lib/shared/inputEvents.js +23 -0
- package/lib/shared/inputEvents.js.map +1 -0
- package/lib/shared/serializedGame.d.ts +142 -0
- package/lib/shared/serializedGame.js +2 -0
- package/lib/shared/serializedGame.js.map +1 -0
- package/lib/shared/types.d.ts +298 -0
- package/lib/shared/types.js +47 -0
- package/lib/shared/types.js.map +1 -0
- package/lib/shared/unitState.d.ts +36 -0
- package/lib/shared/unitState.js +42 -0
- package/lib/shared/unitState.js.map +1 -0
- package/lib/shared/vacateReasonText.d.ts +20 -0
- package/lib/shared/vacateReasonText.js +23 -0
- package/lib/shared/vacateReasonText.js.map +1 -0
- package/lib/shared/viewZoom.d.ts +14 -0
- package/lib/shared/viewZoom.js +17 -0
- package/lib/shared/viewZoom.js.map +1 -0
- package/lib/shared/wellFormed.d.ts +14 -0
- package/lib/shared/wellFormed.js +19 -0
- package/lib/shared/wellFormed.js.map +1 -0
- package/lib/simport/cards.d.ts +26 -0
- package/lib/simport/cards.js +138 -0
- package/lib/simport/cards.js.map +1 -0
- package/lib/simport/clockView.d.ts +24 -0
- package/lib/simport/clockView.js +43 -0
- package/lib/simport/clockView.js.map +1 -0
- package/lib/simport/commands.d.ts +215 -0
- package/lib/simport/commands.js +2 -0
- package/lib/simport/commands.js.map +1 -0
- package/lib/simport/emergencyReads.d.ts +19 -0
- package/lib/simport/emergencyReads.js +47 -0
- package/lib/simport/emergencyReads.js.map +1 -0
- package/lib/simport/enginePort.d.ts +433 -0
- package/lib/simport/enginePort.js +11 -0
- package/lib/simport/enginePort.js.map +1 -0
- package/lib/simport/fixtures/catalog.classic.json +2137 -0
- package/lib/simport/fixtures/catalog.modern.json +2515 -0
- package/lib/simport/fixtures/viewLayout.json +927 -0
- package/lib/simport/headerClock.d.ts +31 -0
- package/lib/simport/headerClock.js +29 -0
- package/lib/simport/headerClock.js.map +1 -0
- package/lib/simport/panels.d.ts +243 -0
- package/lib/simport/panels.js +2 -0
- package/lib/simport/panels.js.map +1 -0
- package/lib/simport/personCards.d.ts +63 -0
- package/lib/simport/personCards.js +55 -0
- package/lib/simport/personCards.js.map +1 -0
- package/lib/simport/portCodes.d.ts +41 -0
- package/lib/simport/portCodes.js +49 -0
- package/lib/simport/portCodes.js.map +1 -0
- package/lib/simport/portEvents.d.ts +39 -0
- package/lib/simport/portEvents.js +43 -0
- package/lib/simport/portEvents.js.map +1 -0
- package/lib/simport/portRenderSim.d.ts +70 -0
- package/lib/simport/portRenderSim.js +129 -0
- package/lib/simport/portRenderSim.js.map +1 -0
- package/lib/simport/queries.d.ts +64 -0
- package/lib/simport/queries.js +30 -0
- package/lib/simport/queries.js.map +1 -0
- package/lib/simport/recyclingPort.d.ts +13 -0
- package/lib/simport/recyclingPort.js +2 -0
- package/lib/simport/recyclingPort.js.map +1 -0
- package/lib/simport/request.d.ts +44 -0
- package/lib/simport/request.js +214 -0
- package/lib/simport/request.js.map +1 -0
- package/lib/simport/roomTiers.d.ts +102 -0
- package/lib/simport/roomTiers.js +122 -0
- package/lib/simport/roomTiers.js.map +1 -0
- package/lib/simport/scheduleSlots.d.ts +19 -0
- package/lib/simport/scheduleSlots.js +87 -0
- package/lib/simport/scheduleSlots.js.map +1 -0
- package/lib/simport/skyBridgePort.d.ts +20 -0
- package/lib/simport/skyBridgePort.js +2 -0
- package/lib/simport/skyBridgePort.js.map +1 -0
- package/lib/simport/skyBridgeView.d.ts +15 -0
- package/lib/simport/skyBridgeView.js +42 -0
- package/lib/simport/skyBridgeView.js.map +1 -0
- package/lib/simport/statsSheet.d.ts +15 -0
- package/lib/simport/statsSheet.js +101 -0
- package/lib/simport/statsSheet.js.map +1 -0
- package/lib/simport/tdtRecords.d.ts +9 -0
- package/lib/simport/tdtRecords.js +112 -0
- package/lib/simport/tdtRecords.js.map +1 -0
- package/lib/simport/tdtReportFacts.d.ts +110 -0
- package/lib/simport/tdtReportFacts.js +8 -0
- package/lib/simport/tdtReportFacts.js.map +1 -0
- package/lib/simport/trafficPort.d.ts +22 -0
- package/lib/simport/trafficPort.js +2 -0
- package/lib/simport/trafficPort.js.map +1 -0
- package/lib/simport/view.d.ts +275 -0
- package/lib/simport/view.js +2 -0
- package/lib/simport/view.js.map +1 -0
- package/lib/simport/viewReader.d.ts +89 -0
- package/lib/simport/viewReader.js +426 -0
- package/lib/simport/viewReader.js.map +1 -0
- package/lib/styles/game/appearance.css +108 -0
- package/lib/styles/game/base.css +68 -0
- package/lib/styles/game/components.css +69 -0
- package/lib/styles/game/desk-title.css +183 -0
- package/lib/styles/game/desk.css +487 -0
- package/lib/styles/game/dialogs.css +360 -0
- package/lib/styles/game/editor-sidebar.css +116 -0
- package/lib/styles/game/elevator-schedule.css +217 -0
- package/lib/styles/game/file-dialog.css +470 -0
- package/lib/styles/game/help.css +141 -0
- package/lib/styles/game/launch-fireworks.css +17 -0
- package/lib/styles/game/media-landscape.css +333 -0
- package/lib/styles/game/media-phone.css +303 -0
- package/lib/styles/game/media-tablet-touch.css +177 -0
- package/lib/styles/game/menubar.css +158 -0
- package/lib/styles/game/new-tower.css +219 -0
- package/lib/styles/game/onboarding.css +32 -0
- package/lib/styles/game/screen-saver.css +85 -0
- package/lib/styles/game/splash.css +413 -0
- package/lib/styles/game/stats-saves.css +106 -0
- package/lib/styles/game/tools-stage.css +340 -0
- package/lib/styles/game/topbar.css +191 -0
- package/lib/styles/menu-bar.css +108 -0
- package/lib/styles/not-found.css +335 -0
- package/lib/styles/overview-map-views.css +88 -0
- package/lib/styles/overview-map.css +195 -0
- package/lib/styles/retro-components.css +179 -0
- package/lib/styles/retro-page.css +254 -0
- package/lib/styles/retro-tokens.css +122 -0
- package/lib/styles/schemes/high-contrast.css +173 -0
- package/lib/styles/schemes/skyline.css +134 -0
- package/lib/styles.css +66 -0
- package/lib/ui/desk/deskGeometry.d.ts +59 -0
- package/lib/ui/desk/deskGeometry.js +106 -0
- package/lib/ui/desk/deskGeometry.js.map +1 -0
- package/lib/ui/desk/deskWindow.d.ts +90 -0
- package/lib/ui/desk/deskWindow.js +253 -0
- package/lib/ui/desk/deskWindow.js.map +1 -0
- package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
- package/lib/ui/desk/deskWindowMenu.js +143 -0
- package/lib/ui/desk/deskWindowMenu.js.map +1 -0
- package/lib/ui/escape.d.ts +1 -0
- package/lib/ui/escape.js +14 -0
- package/lib/ui/escape.js.map +1 -0
- package/lib/ui/format.d.ts +14 -0
- package/lib/ui/format.js +36 -0
- package/lib/ui/format.js.map +1 -0
- package/lib/ui/iconPaths.generated.d.ts +4 -0
- package/lib/ui/iconPaths.generated.js +68 -0
- package/lib/ui/iconPaths.generated.js.map +1 -0
- package/lib/ui/icons.d.ts +83 -0
- package/lib/ui/icons.js +156 -0
- package/lib/ui/icons.js.map +1 -0
- package/lib/ui/menuBar.d.ts +94 -0
- package/lib/ui/menuBar.js +361 -0
- package/lib/ui/menuBar.js.map +1 -0
- package/lib/ui/modalPrecedence.d.ts +108 -0
- package/lib/ui/modalPrecedence.js +165 -0
- package/lib/ui/modalPrecedence.js.map +1 -0
- package/lib/ui/movableWindow.d.ts +124 -0
- package/lib/ui/movableWindow.js +247 -0
- package/lib/ui/movableWindow.js.map +1 -0
- package/lib/ui/overviewMapInput.d.ts +109 -0
- package/lib/ui/overviewMapInput.js +135 -0
- package/lib/ui/overviewMapInput.js.map +1 -0
- package/lib/ui/uiModal.d.ts +38 -0
- package/lib/ui/uiModal.js +70 -0
- package/lib/ui/uiModal.js.map +1 -0
- package/lib/wasmhost/buildSection.d.ts +54 -0
- package/lib/wasmhost/buildSection.js +143 -0
- package/lib/wasmhost/buildSection.js.map +1 -0
- package/lib/wasmhost/catalogCheck.d.ts +11 -0
- package/lib/wasmhost/catalogCheck.js +43 -0
- package/lib/wasmhost/catalogCheck.js.map +1 -0
- package/lib/wasmhost/engineAssets.d.ts +57 -0
- package/lib/wasmhost/engineAssets.js +63 -0
- package/lib/wasmhost/engineAssets.js.map +1 -0
- package/lib/wasmhost/engineBoot.d.ts +165 -0
- package/lib/wasmhost/engineBoot.js +254 -0
- package/lib/wasmhost/engineBoot.js.map +1 -0
- package/lib/wasmhost/engineChoice.d.ts +6 -0
- package/lib/wasmhost/engineChoice.js +2 -0
- package/lib/wasmhost/engineChoice.js.map +1 -0
- package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
- package/lib/wasmhost/engineDiagnostics.js +189 -0
- package/lib/wasmhost/engineDiagnostics.js.map +1 -0
- package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
- package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
- package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
- package/lib/wasmhost/engineIdentity.d.ts +30 -0
- package/lib/wasmhost/engineIdentity.js +59 -0
- package/lib/wasmhost/engineIdentity.js.map +1 -0
- package/lib/wasmhost/engineLabel.d.ts +40 -0
- package/lib/wasmhost/engineLabel.js +50 -0
- package/lib/wasmhost/engineLabel.js.map +1 -0
- package/lib/wasmhost/engineLoad.d.ts +48 -0
- package/lib/wasmhost/engineLoad.js +53 -0
- package/lib/wasmhost/engineLoad.js.map +1 -0
- package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
- package/lib/wasmhost/enginePackageCheck.js +274 -0
- package/lib/wasmhost/enginePackageCheck.js.map +1 -0
- package/lib/wasmhost/enginePackageNames.d.ts +25 -0
- package/lib/wasmhost/enginePackageNames.js +28 -0
- package/lib/wasmhost/enginePackageNames.js.map +1 -0
- package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
- package/lib/wasmhost/enginePackageRecord.js +108 -0
- package/lib/wasmhost/enginePackageRecord.js.map +1 -0
- package/lib/wasmhost/engineRepair.d.ts +55 -0
- package/lib/wasmhost/engineRepair.js +183 -0
- package/lib/wasmhost/engineRepair.js.map +1 -0
- package/lib/wasmhost/frameView.d.ts +87 -0
- package/lib/wasmhost/frameView.js +133 -0
- package/lib/wasmhost/frameView.js.map +1 -0
- package/lib/wasmhost/hostFault.d.ts +40 -0
- package/lib/wasmhost/hostFault.js +94 -0
- package/lib/wasmhost/hostFault.js.map +1 -0
- package/lib/wasmhost/loadEngineModule.d.ts +79 -0
- package/lib/wasmhost/loadEngineModule.js +66 -0
- package/lib/wasmhost/loadEngineModule.js.map +1 -0
- package/lib/wasmhost/packageHash.d.ts +48 -0
- package/lib/wasmhost/packageHash.js +436 -0
- package/lib/wasmhost/packageHash.js.map +1 -0
- package/lib/wasmhost/rustEngine.d.ts +49 -0
- package/lib/wasmhost/rustEngine.js +63 -0
- package/lib/wasmhost/rustEngine.js.map +1 -0
- package/lib/wasmhost/slotPopulation.d.ts +19 -0
- package/lib/wasmhost/slotPopulation.js +69 -0
- package/lib/wasmhost/slotPopulation.js.map +1 -0
- package/lib/wasmhost/telemetry.d.ts +31 -0
- package/lib/wasmhost/telemetry.js +13 -0
- package/lib/wasmhost/telemetry.js.map +1 -0
- package/package.json +80 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engineLabel.js","sources":["../../src/wasmhost/engineLabel.ts"],"sourcesContent":["import { settleEngineIdentity, type EngineBootState } from \"./engineBoot\";\nimport { parseEngineIdentity } from \"./engineIdentity\";\nimport { shortId } from \"./enginePackageRecord\";\n\n/**\n * The player-visible name of the engine running the simulation, for the\n * version lines on the splash, Settings, and About this game, with the engine's\n * own version and a short source hash (#1422): \"v2.51.0 · Rust engine 0.20.0\n * (1a2b3c4d5e6f)\", so a player or tester can tell from the title screen which\n * build of the engine they are on without opening the console. The Rust engine's version is the\n * crate version its package reports and the hash is its binary's; either is\n * left out when the package did not report it.\n */\ninterface EngineHandle {\n status: { hosted: boolean };\n}\n\ninterface LabelSource {\n __vcEngine?: EngineHandle;\n /** `window.__vcEngineBoot`: the identity and binary the Rust package reported. */\n __vcEngineBoot?: Partial<Pick<EngineBootState, \"identity\" | \"binary\" | \"build\" | \"engine\">>;\n}\n\nconst pageSource = () => globalThis as LabelSource;\n\n/** The engine the current tower runs on: \"wasm\" while the WASM host has a\n * tower attached, \"ts\" otherwise (including a WASM package that failed to\n * load, which leaves the game on the TypeScript engine). */\nexport function activeEngine(g: LabelSource = pageSource()): \"ts\" | \"wasm\" {\n return g.__vcEngine?.status.hosted ? \"wasm\" : \"ts\";\n}\n\n/** The engine's name, version and short hash, as the version lines append it.\n * The page's own suffix reads the engine's identity record first if boot left\n * it for later (#1254), so Settings and About name the version. */\nexport function engineSuffix(g: LabelSource = pageSource()): string {\n if (g === pageSource()) settleEngineIdentity();\n return suffixOf(g);\n}\n\n/** The suffix from what `g` holds now, without reading a deferred identity. */\nfunction suffixOf(g: LabelSource): string {\n // The Rust engine is the only engine (#1875). A Rust engine that stopped\n // after a trap reads `engine: \"none\"` until the reload, and says so.\n const stopped = activeEngine(g) !== \"wasm\" && g.__vcEngineBoot?.engine === \"none\";\n const version = parseEngineIdentity(g.__vcEngineBoot?.identity)?.crate.version;\n const binary = g.__vcEngineBoot?.binary;\n const hash = binary?.state === \"ok\" ? shortId(binary.sourceHash) : null;\n const extras = [hash, stopped ? \"stopped\" : null].filter((x) => x !== null);\n return ` · Rust engine${version ? ` ${version}` : \"\"}${extras.length > 0 ? ` (${extras.join(\", \")})` : \"\"}`;\n}\n\n/** The full version line: the app's `version` (the host passes its own,\n * `APP_VERSION`), then the engine (`engineSuffix`). The title screen draws it while the game starts, so it does not read a\n * deferred identity record: boot rewrites it once the record is read\n * (`refreshSplashVersion`). */\nexport function versionLine(version: string, g: LabelSource = pageSource()): string {\n return `v${version}${suffixOf(g)}`;\n}\n\n/** Rewrite an already-rendered splash version line once the engine's identity\n * record is read after the first frame (#1254): the title screen mounts\n * inside `create()`, before the record is read, so its template cannot name\n * the engine's version at render time. Dialogs render later and read the\n * suffix themselves. `version` is the app's, as `versionLine` takes it. */\nexport function refreshSplashVersion(version: string, doc: Pick<Document, \"querySelector\"> = document): void {\n const el = doc.querySelector<HTMLElement>(\".splash-version\");\n if (el) el.textContent = versionLine(version);\n}\n"],"names":[],"mappings":";;;;AAuBA,MAAM,UAAU,GAAG,MAAM,UAAyB;AAElD;;AAE6D;AACvD,SAAU,YAAY,CAAC,CAAA,GAAiB,UAAU,EAAE,EAAA;AACxD,IAAA,OAAO,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI;AACpD;AAEA;;AAEoE;AAC9D,SAAU,YAAY,CAAC,CAAA,GAAiB,UAAU,EAAE,EAAA;IACxD,IAAI,CAAC,KAAK,UAAU,EAAE;AAAE,QAAA,oBAAoB,EAAE;AAC9C,IAAA,OAAO,QAAQ,CAAC,CAAC,CAAC;AACpB;AAEA;AACA,SAAS,QAAQ,CAAC,CAAc,EAAA;;;AAG9B,IAAA,MAAM,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,KAAK,MAAM,IAAI,CAAC,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM;AACjF,IAAA,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,CAAC,cAAc,EAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO;AAC9E,IAAA,MAAM,MAAM,GAAG,CAAC,CAAC,cAAc,EAAE,MAAM;IACvC,MAAM,IAAI,GAAG,MAAM,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,IAAI;IACvE,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAC3E,IAAA,OAAO,CAAA,cAAA,EAAiB,OAAO,GAAG,CAAA,CAAA,EAAI,OAAO,CAAA,CAAE,GAAG,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,CAAA,EAAA,EAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,EAAE;AAC7G;AAEA;;;AAGgC;SAChB,WAAW,CAAC,OAAe,EAAE,CAAA,GAAiB,UAAU,EAAE,EAAA;IACxE,OAAO,CAAA,CAAA,EAAI,OAAO,CAAA,EAAG,QAAQ,CAAC,CAAC,CAAC,EAAE;AACpC;AAEA;;;;AAI4E;SAC5D,oBAAoB,CAAC,OAAe,EAAE,MAAuC,QAAQ,EAAA;IACnG,MAAM,EAAE,GAAG,GAAG,CAAC,aAAa,CAAc,iBAAiB,CAAC;AAC5D,IAAA,IAAI,EAAE;AAAE,QAAA,EAAE,CAAC,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC;AAC/C;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type BuildMetadataResult } from "./buildSection";
|
|
2
|
+
/**
|
|
3
|
+
* Loading the engine package in a page or a worker, in one place (#963). The
|
|
4
|
+
* glue would fetch and compile its own binary; here the binary is compiled
|
|
5
|
+
* first, so the build metadata section the build stamped into it
|
|
6
|
+
* (`verticopolis.build`, see buildSection.ts) can be read, and the compiled
|
|
7
|
+
* module is handed to the glue's init. One fetch, one compile, and the
|
|
8
|
+
* metadata is known even when the instantiate then fails to link.
|
|
9
|
+
*
|
|
10
|
+
* The core engine never reads that section. A package with no section, or a
|
|
11
|
+
* bad one, still loads; the result says which, for About and Copy diagnostics.
|
|
12
|
+
*/
|
|
13
|
+
type GlueModule = {
|
|
14
|
+
default: (init?: {
|
|
15
|
+
module_or_path: WebAssembly.Module;
|
|
16
|
+
}) => Promise<unknown>;
|
|
17
|
+
};
|
|
18
|
+
/** Compile engine binary bytes already in hand (the verified loader's, see
|
|
19
|
+
* loadEngineModule.ts) and read their build metadata. */
|
|
20
|
+
export declare function compileEngineBytes(bytes: Uint8Array): Promise<{
|
|
21
|
+
module: WebAssembly.Module;
|
|
22
|
+
build: BuildMetadataResult;
|
|
23
|
+
}>;
|
|
24
|
+
/** Fetch and compile the engine binary and read its build metadata. A binary
|
|
25
|
+
* served as `application/wasm` compiles as it streams in; one served as
|
|
26
|
+
* anything else (a server with no wasm MIME type) compiles from its bytes,
|
|
27
|
+
* as the glue's own loader does. */
|
|
28
|
+
export declare function compileEngineBinary(wasmUrl: string | URL): Promise<{
|
|
29
|
+
module: WebAssembly.Module;
|
|
30
|
+
build: BuildMetadataResult;
|
|
31
|
+
}>;
|
|
32
|
+
/** Where the binary is served: beside the glue, as the glue itself would look. */
|
|
33
|
+
export declare const engineBinaryUrl: (glueUrl: string) => string;
|
|
34
|
+
export interface EngineLoadOptions {
|
|
35
|
+
/** Called with what the binary's build section said, as soon as it is read,
|
|
36
|
+
* so a load that then fails to link still reports it. */
|
|
37
|
+
onBuild?: (build: BuildMetadataResult) => void;
|
|
38
|
+
/** The binary's URL; by default `verticopolis_engine_bg.wasm` beside the glue. */
|
|
39
|
+
wasmUrl?: string | URL;
|
|
40
|
+
}
|
|
41
|
+
/** Import the glue, compile the binary beside it and initialize the glue on
|
|
42
|
+
* that compiled module. Returns the glue's namespace and what its init
|
|
43
|
+
* resolved to (the engine's exports, for the memory size). */
|
|
44
|
+
export declare function initEngineGlue(glueUrl: string, opts?: EngineLoadOptions): Promise<{
|
|
45
|
+
mod: GlueModule;
|
|
46
|
+
exports: unknown;
|
|
47
|
+
}>;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { parseBuildMetadata, BUILD_SECTION } from './buildSection.js';
|
|
2
|
+
import { ENGINE_WASM } from './enginePackageNames.js';
|
|
3
|
+
|
|
4
|
+
/** Compile engine binary bytes already in hand (the verified loader's, see
|
|
5
|
+
* loadEngineModule.ts) and read their build metadata. */
|
|
6
|
+
async function compileEngineBytes(bytes) {
|
|
7
|
+
const module = await WebAssembly.compile(bytes);
|
|
8
|
+
return { module, build: parseBuildMetadata(WebAssembly.Module.customSections(module, BUILD_SECTION)) };
|
|
9
|
+
}
|
|
10
|
+
/** Fetch and compile the engine binary and read its build metadata. A binary
|
|
11
|
+
* served as `application/wasm` compiles as it streams in; one served as
|
|
12
|
+
* anything else (a server with no wasm MIME type) compiles from its bytes,
|
|
13
|
+
* as the glue's own loader does. */
|
|
14
|
+
async function compileEngineBinary(wasmUrl) {
|
|
15
|
+
const response = await fetch(wasmUrl);
|
|
16
|
+
if (!response.ok)
|
|
17
|
+
throw new Error(`failed to fetch Wasm: ${response.status} ${response.statusText} fetching '${String(wasmUrl)}'`);
|
|
18
|
+
const streams = typeof WebAssembly.compileStreaming === "function" && response.headers.get("Content-Type") === "application/wasm";
|
|
19
|
+
const module = streams ? await WebAssembly.compileStreaming(response) : await WebAssembly.compile(await response.arrayBuffer());
|
|
20
|
+
return { module, build: parseBuildMetadata(WebAssembly.Module.customSections(module, BUILD_SECTION)) };
|
|
21
|
+
}
|
|
22
|
+
/** Where the binary is served: beside the glue, as the glue itself would look. */
|
|
23
|
+
const engineBinaryUrl = (glueUrl) => new URL(ENGINE_WASM, glueUrl).href;
|
|
24
|
+
/** Import the glue, compile the binary beside it and initialize the glue on
|
|
25
|
+
* that compiled module. Returns the glue's namespace and what its init
|
|
26
|
+
* resolved to (the engine's exports, for the memory size). */
|
|
27
|
+
async function initEngineGlue(glueUrl, opts = {}) {
|
|
28
|
+
const wasmUrl = opts.wasmUrl ?? engineBinaryUrl(glueUrl);
|
|
29
|
+
// The build is reported as soon as the binary has compiled, so a glue that
|
|
30
|
+
// then fails to import or to initialize still leaves what the binary said.
|
|
31
|
+
// The compile is awaited even when the glue import fails first: a small glue
|
|
32
|
+
// file's 404 or syntax error can beat the compile of the binary, and the
|
|
33
|
+
// caller reads the build as soon as this rejects.
|
|
34
|
+
const compiled = compileEngineBinary(wasmUrl).then((b) => {
|
|
35
|
+
opts.onBuild?.(b.build);
|
|
36
|
+
return b;
|
|
37
|
+
});
|
|
38
|
+
compiled.catch(() => undefined);
|
|
39
|
+
let mod;
|
|
40
|
+
try {
|
|
41
|
+
mod = (await import(/* @vite-ignore */ glueUrl));
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
await compiled.catch(() => undefined);
|
|
45
|
+
throw e;
|
|
46
|
+
}
|
|
47
|
+
const binary = await compiled;
|
|
48
|
+
const exports = await mod.default({ module_or_path: binary.module });
|
|
49
|
+
return { mod, exports };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { compileEngineBinary, compileEngineBytes, engineBinaryUrl, initEngineGlue };
|
|
53
|
+
//# sourceMappingURL=engineLoad.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engineLoad.js","sources":["../../src/wasmhost/engineLoad.ts"],"sourcesContent":["import { BUILD_SECTION, parseBuildMetadata, type BuildMetadataResult } from \"./buildSection\";\nimport { ENGINE_WASM } from \"./enginePackageNames\";\n\n/**\n * Loading the engine package in a page or a worker, in one place (#963). The\n * glue would fetch and compile its own binary; here the binary is compiled\n * first, so the build metadata section the build stamped into it\n * (`verticopolis.build`, see buildSection.ts) can be read, and the compiled\n * module is handed to the glue's init. One fetch, one compile, and the\n * metadata is known even when the instantiate then fails to link.\n *\n * The core engine never reads that section. A package with no section, or a\n * bad one, still loads; the result says which, for About and Copy diagnostics.\n */\n\ntype GlueModule = { default: (init?: { module_or_path: WebAssembly.Module }) => Promise<unknown> };\n\n/** Compile engine binary bytes already in hand (the verified loader's, see\n * loadEngineModule.ts) and read their build metadata. */\nexport async function compileEngineBytes(bytes: Uint8Array): Promise<{ module: WebAssembly.Module; build: BuildMetadataResult }> {\n const module = await WebAssembly.compile(bytes as BufferSource);\n return { module, build: parseBuildMetadata(WebAssembly.Module.customSections(module, BUILD_SECTION)) };\n}\n\n/** Fetch and compile the engine binary and read its build metadata. A binary\n * served as `application/wasm` compiles as it streams in; one served as\n * anything else (a server with no wasm MIME type) compiles from its bytes,\n * as the glue's own loader does. */\nexport async function compileEngineBinary(wasmUrl: string | URL): Promise<{ module: WebAssembly.Module; build: BuildMetadataResult }> {\n const response = await fetch(wasmUrl);\n if (!response.ok) throw new Error(`failed to fetch Wasm: ${response.status} ${response.statusText} fetching '${String(wasmUrl)}'`);\n const streams = typeof WebAssembly.compileStreaming === \"function\" && response.headers.get(\"Content-Type\") === \"application/wasm\";\n const module = streams ? await WebAssembly.compileStreaming(response) : await WebAssembly.compile(await response.arrayBuffer());\n return { module, build: parseBuildMetadata(WebAssembly.Module.customSections(module, BUILD_SECTION)) };\n}\n\n/** Where the binary is served: beside the glue, as the glue itself would look. */\nexport const engineBinaryUrl = (glueUrl: string): string => new URL(ENGINE_WASM, glueUrl).href;\n\nexport interface EngineLoadOptions {\n /** Called with what the binary's build section said, as soon as it is read,\n * so a load that then fails to link still reports it. */\n onBuild?: (build: BuildMetadataResult) => void;\n /** The binary's URL; by default `verticopolis_engine_bg.wasm` beside the glue. */\n wasmUrl?: string | URL;\n}\n\n/** Import the glue, compile the binary beside it and initialize the glue on\n * that compiled module. Returns the glue's namespace and what its init\n * resolved to (the engine's exports, for the memory size). */\nexport async function initEngineGlue(glueUrl: string, opts: EngineLoadOptions = {}): Promise<{ mod: GlueModule; exports: unknown }> {\n const wasmUrl = opts.wasmUrl ?? engineBinaryUrl(glueUrl);\n // The build is reported as soon as the binary has compiled, so a glue that\n // then fails to import or to initialize still leaves what the binary said.\n // The compile is awaited even when the glue import fails first: a small glue\n // file's 404 or syntax error can beat the compile of the binary, and the\n // caller reads the build as soon as this rejects.\n const compiled = compileEngineBinary(wasmUrl).then((b) => {\n opts.onBuild?.(b.build);\n return b;\n });\n compiled.catch(() => undefined);\n let mod: GlueModule;\n try {\n mod = (await import(/* @vite-ignore */ glueUrl)) as GlueModule;\n } catch (e) {\n await compiled.catch(() => undefined);\n throw e;\n }\n const binary = await compiled;\n const exports = await mod.default({ module_or_path: binary.module });\n return { mod, exports };\n}\n"],"names":[],"mappings":";;;AAiBA;AAC0D;AACnD,eAAe,kBAAkB,CAAC,KAAiB,EAAA;IACxD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,KAAqB,CAAC;AAC/D,IAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC,WAAW,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE;AACxG;AAEA;;;AAGqC;AAC9B,eAAe,mBAAmB,CAAC,OAAqB,EAAA;AAC7D,IAAA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC;IACrC,IAAI,CAAC,QAAQ,CAAC,EAAE;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,CAAC,MAAM,CAAA,CAAA,EAAI,QAAQ,CAAC,UAAU,cAAc,MAAM,CAAC,OAAO,CAAC,CAAA,CAAA,CAAG,CAAC;AAClI,IAAA,MAAM,OAAO,GAAG,OAAO,WAAW,CAAC,gBAAgB,KAAK,UAAU,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,kBAAkB;IACjI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
+
import { type EnginePackageRecord, type ExpectedEnginePackage } from "./enginePackageRecord.ts";
|
|
2
|
+
/** Why a package was refused. `mismatch` is the bytes disagreeing with the
|
|
3
|
+
* shell, `load-failed` is the bytes not arriving whole, `unverifiable` is a
|
|
4
|
+
* browser that cannot hash them. */
|
|
5
|
+
export type PackageFailureKind = "mismatch" | "load-failed" | "unverifiable";
|
|
6
|
+
/** Which of the three files the refusal is about. */
|
|
7
|
+
export type PackageFile = "glue" | "wasm" | "build-record";
|
|
8
|
+
/** What a failure screen and the diagnostics report. Ids are 12 hex digits. */
|
|
9
|
+
export interface PackageFailureDetail {
|
|
10
|
+
file: PackageFile | null;
|
|
11
|
+
/** The digest the shell expected for `file`, when the failure is a digest. */
|
|
12
|
+
expected: string | null;
|
|
13
|
+
/** The digest that arrived, when it was computed. */
|
|
14
|
+
found: string | null;
|
|
15
|
+
/** The package id this shell was built with. */
|
|
16
|
+
expectedPackage: string | null;
|
|
17
|
+
/** The package id `BUILD.json` named, when it named one. */
|
|
18
|
+
servedPackage: string | null;
|
|
19
|
+
/** Whether a service worker controlled the page. */
|
|
20
|
+
controlled: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare class EnginePackageError extends Error {
|
|
23
|
+
readonly kind: PackageFailureKind;
|
|
24
|
+
readonly detail: PackageFailureDetail;
|
|
25
|
+
constructor(kind: PackageFailureKind, message: string, detail: Partial<PackageFailureDetail> & {
|
|
26
|
+
controlled: boolean;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** Thrown when the caller's signal fired. The loader already reported why
|
|
30
|
+
* (its deadline), so this is never shown to a player. */
|
|
31
|
+
export declare class EnginePackageAborted extends Error {
|
|
32
|
+
constructor();
|
|
33
|
+
}
|
|
34
|
+
/** The most `BUILD.json` may weigh. Its real size is about 400 bytes. */
|
|
35
|
+
export declare const RECORD_CAP_BYTES: number;
|
|
36
|
+
export interface PackageUrls {
|
|
37
|
+
record: string;
|
|
38
|
+
glue: string;
|
|
39
|
+
wasm: string;
|
|
40
|
+
}
|
|
41
|
+
export interface VerifyOptions {
|
|
42
|
+
/** What the shell was built with; null when the build carries no package. */
|
|
43
|
+
expected: ExpectedEnginePackage | null;
|
|
44
|
+
urls: PackageUrls;
|
|
45
|
+
fetch: (url: string, init: {
|
|
46
|
+
signal: AbortSignal;
|
|
47
|
+
}) => Promise<Response>;
|
|
48
|
+
/** SHA-256 of the bytes, or undefined where `crypto.subtle` is missing. */
|
|
49
|
+
digest: ((bytes: Uint8Array) => Promise<Uint8Array>) | undefined;
|
|
50
|
+
signal: AbortSignal;
|
|
51
|
+
/** Whether a service worker controls the page, for the diagnostics. */
|
|
52
|
+
controlled: boolean;
|
|
53
|
+
/** The page's origin, to catch a redirect to another one. */
|
|
54
|
+
origin: string;
|
|
55
|
+
}
|
|
56
|
+
export interface VerifiedPackage {
|
|
57
|
+
glue: Uint8Array;
|
|
58
|
+
wasm: Uint8Array;
|
|
59
|
+
record: EnginePackageRecord;
|
|
60
|
+
}
|
|
61
|
+
/** `navigator.serviceWorker` is undefined when service workers are off or the
|
|
62
|
+
* context is insecure, so the diagnostics read it with a guard. */
|
|
63
|
+
export declare function isControlled(nav: {
|
|
64
|
+
serviceWorker?: {
|
|
65
|
+
controller?: unknown;
|
|
66
|
+
};
|
|
67
|
+
} | undefined): boolean;
|
|
68
|
+
/** The page's digest: `crypto.subtle`, or undefined in an insecure context. */
|
|
69
|
+
export declare function browserDigest(c?: {
|
|
70
|
+
subtle?: SubtleCrypto;
|
|
71
|
+
} | null | undefined): VerifyOptions["digest"];
|
|
72
|
+
/**
|
|
73
|
+
* Fetches and checks the package. Resolves with the verified bytes, or throws
|
|
74
|
+
* an `EnginePackageError` (a refusal) or `EnginePackageAborted` (the caller's
|
|
75
|
+
* deadline).
|
|
76
|
+
*/
|
|
77
|
+
export declare function verifyEnginePackage(opts: VerifyOptions): Promise<VerifiedPackage>;
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { ENGINE_WASM, ENGINE_GLUE } from './enginePackageNames.js';
|
|
2
|
+
import { shortId, parseEngineRecord, canonicalFilesJson } from './enginePackageRecord.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The byte check for the engine package (#985 criterion 5): fetch
|
|
6
|
+
* `engine/BUILD.json`, the glue and the binary, hash what arrived, and refuse
|
|
7
|
+
* unless it is exactly the package this shell was built with. It returns the
|
|
8
|
+
* verified bytes, so the loader instantiates from what was hashed and never
|
|
9
|
+
* fetches a file a second time. Design:
|
|
10
|
+
* _bmad-output/planning-artifacts/design/design-engine-package-set-consistency-2026-10-15.md, section 5.3.
|
|
11
|
+
*
|
|
12
|
+
* `fetch`, the digest and the abort signal are injected, so the unit tests run
|
|
13
|
+
* in Node with no browser. The loader (rustEngine.ts) owns the deadline and
|
|
14
|
+
* hands its signal in; this module checks the signal after every await and
|
|
15
|
+
* throws `EnginePackageAborted` once it fires, so a late result is dropped.
|
|
16
|
+
*/
|
|
17
|
+
class EnginePackageError extends Error {
|
|
18
|
+
constructor(kind, message, detail) {
|
|
19
|
+
super(message);
|
|
20
|
+
this.name = "EnginePackageError";
|
|
21
|
+
this.kind = kind;
|
|
22
|
+
this.detail = { file: null, expected: null, found: null, expectedPackage: null, servedPackage: null, ...detail };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Thrown when the caller's signal fired. The loader already reported why
|
|
26
|
+
* (its deadline), so this is never shown to a player. */
|
|
27
|
+
class EnginePackageAborted extends Error {
|
|
28
|
+
constructor() {
|
|
29
|
+
super("the engine package check was aborted");
|
|
30
|
+
this.name = "EnginePackageAborted";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** A sibling fetch stopped because another file already failed. */
|
|
34
|
+
class SiblingStopped extends Error {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.name = "SiblingStopped";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** The most `BUILD.json` may weigh. Its real size is about 400 bytes. */
|
|
41
|
+
const RECORD_CAP_BYTES = 16 * 1024;
|
|
42
|
+
/** `navigator.serviceWorker` is undefined when service workers are off or the
|
|
43
|
+
* context is insecure, so the diagnostics read it with a guard. */
|
|
44
|
+
function isControlled(nav) {
|
|
45
|
+
try {
|
|
46
|
+
return nav?.serviceWorker?.controller != null;
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// Reading it can throw a SecurityError (blocked site data, a sandboxed
|
|
50
|
+
// frame); the diagnostics must still be built.
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** The page's digest: `crypto.subtle`, or undefined in an insecure context. */
|
|
55
|
+
function browserDigest(c = globalThis.crypto) {
|
|
56
|
+
const subtle = c?.subtle;
|
|
57
|
+
if (!subtle)
|
|
58
|
+
return undefined;
|
|
59
|
+
return async (bytes) => new Uint8Array(await subtle.digest("SHA-256", bytes));
|
|
60
|
+
}
|
|
61
|
+
function hex(bytes) {
|
|
62
|
+
let s = "";
|
|
63
|
+
for (const b of bytes)
|
|
64
|
+
s += b.toString(16).padStart(2, "0");
|
|
65
|
+
return s;
|
|
66
|
+
}
|
|
67
|
+
const NAMES = { "build-record": "BUILD.json", glue: ENGINE_GLUE, wasm: ENGINE_WASM };
|
|
68
|
+
/**
|
|
69
|
+
* Reads a body through a stream, counting real bytes, and stops at `cap`. A
|
|
70
|
+
* header that promises more than the cap is refused before reading; a header
|
|
71
|
+
* that lies is caught by the count. An unavailable stream is a load failure:
|
|
72
|
+
* there is no unbounded `arrayBuffer()` fallback.
|
|
73
|
+
*/
|
|
74
|
+
async function readBounded(file, res, cap, ctl, fail) {
|
|
75
|
+
// Content-Length counts the encoded bytes, while the stream yields decoded
|
|
76
|
+
// ones, so it is only compared with a body that was not compressed. For a
|
|
77
|
+
// compressed one the real count below is the only measure.
|
|
78
|
+
const header = res.headers.get("content-length");
|
|
79
|
+
const encoding = res.headers.get("content-encoding");
|
|
80
|
+
const declared = header !== null && (encoding === null || encoding === "" || encoding.toLowerCase() === "identity") ? Number(header) : Number.NaN;
|
|
81
|
+
if (Number.isFinite(declared) && declared > cap) {
|
|
82
|
+
await res.body?.cancel().catch(() => undefined);
|
|
83
|
+
throw fail("mismatch", `${NAMES[file]} is larger than the ${cap} bytes this build expects`);
|
|
84
|
+
}
|
|
85
|
+
const reader = res.body?.getReader();
|
|
86
|
+
if (!reader)
|
|
87
|
+
throw fail("load-failed", `${NAMES[file]} came back with no readable body`);
|
|
88
|
+
const chunks = [];
|
|
89
|
+
let total = 0;
|
|
90
|
+
try {
|
|
91
|
+
for (;;) {
|
|
92
|
+
const { done, value } = await reader.read();
|
|
93
|
+
if (ctl.signal.aborted)
|
|
94
|
+
throw new SiblingStopped();
|
|
95
|
+
if (done)
|
|
96
|
+
break;
|
|
97
|
+
total += value.length;
|
|
98
|
+
if (total > cap) {
|
|
99
|
+
await reader.cancel().catch(() => undefined);
|
|
100
|
+
throw fail("mismatch", `${NAMES[file]} is larger than the ${cap} bytes this build expects`);
|
|
101
|
+
}
|
|
102
|
+
chunks.push(value);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (e) {
|
|
106
|
+
if (e instanceof EnginePackageError || e instanceof SiblingStopped)
|
|
107
|
+
throw e;
|
|
108
|
+
// A sibling's failure or the caller's deadline aborts this read too; that
|
|
109
|
+
// is not this file's fault and must not outrank the real failure.
|
|
110
|
+
if (ctl.signal.aborted)
|
|
111
|
+
throw new SiblingStopped();
|
|
112
|
+
throw fail("load-failed", `${NAMES[file]} stopped arriving: ${e instanceof Error ? e.message : String(e)}`);
|
|
113
|
+
}
|
|
114
|
+
if (Number.isFinite(declared) && total < declared) {
|
|
115
|
+
throw fail("load-failed", `${NAMES[file]} ended after ${total} of ${declared} bytes`);
|
|
116
|
+
}
|
|
117
|
+
const out = new Uint8Array(total);
|
|
118
|
+
let at = 0;
|
|
119
|
+
for (const c of chunks) {
|
|
120
|
+
out.set(c, at);
|
|
121
|
+
at += c.length;
|
|
122
|
+
}
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Fetches and checks the package. Resolves with the verified bytes, or throws
|
|
127
|
+
* an `EnginePackageError` (a refusal) or `EnginePackageAborted` (the caller's
|
|
128
|
+
* deadline).
|
|
129
|
+
*/
|
|
130
|
+
async function verifyEnginePackage(opts) {
|
|
131
|
+
const { expected, signal } = opts;
|
|
132
|
+
const base = { controlled: opts.controlled, expectedPackage: expected ? shortId(expected.package) : null };
|
|
133
|
+
const fail = (kind, why, more = {}) => new EnginePackageError(kind, why, { ...base, ...more });
|
|
134
|
+
const gone = () => {
|
|
135
|
+
if (signal.aborted)
|
|
136
|
+
throw new EnginePackageAborted();
|
|
137
|
+
};
|
|
138
|
+
gone();
|
|
139
|
+
if (!expected)
|
|
140
|
+
throw fail("load-failed", "this build carries no engine package; a corrected deployment is needed");
|
|
141
|
+
if (!opts.digest)
|
|
142
|
+
throw fail("unverifiable", "this browser connection cannot verify the engine files (no crypto.subtle); open the game over HTTPS");
|
|
143
|
+
const digest = opts.digest;
|
|
144
|
+
const sha = async (bytes, file) => {
|
|
145
|
+
try {
|
|
146
|
+
return hex(await digest(bytes));
|
|
147
|
+
}
|
|
148
|
+
catch (e) {
|
|
149
|
+
throw fail("unverifiable", `hashing ${NAMES[file]} failed: ${e instanceof Error ? e.message : String(e)}`, { file });
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
// One controller for the three fetches: the caller's deadline stops them
|
|
153
|
+
// all, and so does the first file to fail.
|
|
154
|
+
const ctl = new AbortController();
|
|
155
|
+
const stop = () => ctl.abort();
|
|
156
|
+
signal.addEventListener("abort", stop, { once: true });
|
|
157
|
+
const get = async (file, url, cap) => {
|
|
158
|
+
let res;
|
|
159
|
+
try {
|
|
160
|
+
res = await opts.fetch(url, { signal: ctl.signal });
|
|
161
|
+
}
|
|
162
|
+
catch (e) {
|
|
163
|
+
if (ctl.signal.aborted)
|
|
164
|
+
throw new SiblingStopped();
|
|
165
|
+
throw fail("load-failed", `${NAMES[file]} could not be fetched: ${e instanceof Error ? e.message : String(e)}`, { file });
|
|
166
|
+
}
|
|
167
|
+
if (ctl.signal.aborted)
|
|
168
|
+
throw new SiblingStopped();
|
|
169
|
+
const refuse = (why) => {
|
|
170
|
+
void res.body?.cancel().catch(() => undefined);
|
|
171
|
+
return fail("load-failed", `${NAMES[file]} ${why}`, { file });
|
|
172
|
+
};
|
|
173
|
+
if (res.status !== 200)
|
|
174
|
+
throw refuse(`came back with HTTP ${res.status}`);
|
|
175
|
+
if (res.redirected) {
|
|
176
|
+
let origin = null;
|
|
177
|
+
try {
|
|
178
|
+
origin = new URL(res.url).origin;
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
// An unparseable final URL cannot be shown to be ours.
|
|
182
|
+
}
|
|
183
|
+
if (origin !== opts.origin)
|
|
184
|
+
throw refuse("was redirected to another origin");
|
|
185
|
+
}
|
|
186
|
+
if (/^text\/html/i.test(res.headers.get("content-type") ?? ""))
|
|
187
|
+
throw refuse("came back as a web page");
|
|
188
|
+
// The digest the shell expects for this file rides on any refusal, the
|
|
189
|
+
// oversize one included (the record may not have been read yet).
|
|
190
|
+
const entry = file === "build-record" ? null : expected.files[file === "glue" ? ENGINE_GLUE : ENGINE_WASM];
|
|
191
|
+
return readBounded(file, res, cap, ctl, (kind, why) => fail(kind, why, { file, expected: entry ? shortId(entry.sha256) : null }));
|
|
192
|
+
};
|
|
193
|
+
const order = [
|
|
194
|
+
["build-record", opts.urls.record, RECORD_CAP_BYTES],
|
|
195
|
+
["glue", opts.urls.glue, expected.files[ENGINE_GLUE].bytes],
|
|
196
|
+
["wasm", opts.urls.wasm, expected.files[ENGINE_WASM].bytes],
|
|
197
|
+
];
|
|
198
|
+
let bodies;
|
|
199
|
+
try {
|
|
200
|
+
const settled = await Promise.allSettled(order.map(async ([file, url, cap]) => {
|
|
201
|
+
try {
|
|
202
|
+
return await get(file, url, cap);
|
|
203
|
+
}
|
|
204
|
+
catch (e) {
|
|
205
|
+
stop();
|
|
206
|
+
throw e;
|
|
207
|
+
}
|
|
208
|
+
}));
|
|
209
|
+
gone();
|
|
210
|
+
// The first failure in a fixed order that is not a sibling's stop, so the
|
|
211
|
+
// reason does not depend on which fetch lost the race.
|
|
212
|
+
for (const s of settled) {
|
|
213
|
+
if (s.status === "rejected" && !(s.reason instanceof SiblingStopped)) {
|
|
214
|
+
// An oversize file is refused as it streams, possibly before the
|
|
215
|
+
// record was read; when the record did arrive whole, the refusal
|
|
216
|
+
// still names the package it served.
|
|
217
|
+
const early = settled[0];
|
|
218
|
+
if (s.reason instanceof EnginePackageError && s.reason.detail.servedPackage === null && early.status === "fulfilled") {
|
|
219
|
+
const served = parseEngineRecord(new TextDecoder().decode(early.value));
|
|
220
|
+
if (served.ok)
|
|
221
|
+
s.reason.detail.servedPackage = shortId(served.record.package);
|
|
222
|
+
}
|
|
223
|
+
throw s.reason;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (settled.some((s) => s.status === "rejected"))
|
|
227
|
+
throw new EnginePackageAborted();
|
|
228
|
+
bodies = settled.map((s) => s.value);
|
|
229
|
+
}
|
|
230
|
+
finally {
|
|
231
|
+
signal.removeEventListener("abort", stop);
|
|
232
|
+
}
|
|
233
|
+
const [recordBytes, glue, wasm] = bodies;
|
|
234
|
+
const parsed = parseEngineRecord(new TextDecoder().decode(recordBytes));
|
|
235
|
+
if (!parsed.ok)
|
|
236
|
+
throw fail("mismatch", `BUILD.json is not a usable record (${parsed.why})`, { file: "build-record" });
|
|
237
|
+
const record = parsed.record;
|
|
238
|
+
const served = { servedPackage: shortId(record.package) };
|
|
239
|
+
// A complete body of the wrong size is a different build (a body that ends
|
|
240
|
+
// early with nothing to say it was cut short reads the same way). The sizes
|
|
241
|
+
// are compared before any hashing, with the served id attached.
|
|
242
|
+
for (const [file, bytes] of [["glue", glue], ["wasm", wasm]]) {
|
|
243
|
+
const want = expected.files[file === "glue" ? ENGINE_GLUE : ENGINE_WASM];
|
|
244
|
+
if (bytes.length !== want.bytes) {
|
|
245
|
+
throw fail("mismatch", `${NAMES[file]} is ${bytes.length} bytes; this build expects ${want.bytes}`, { file, expected: shortId(want.sha256), ...served });
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if (record.package !== expected.package) {
|
|
249
|
+
throw fail("mismatch", `BUILD.json names package ${shortId(record.package)}; this build expects ${shortId(expected.package)}`, { file: "build-record", ...served });
|
|
250
|
+
}
|
|
251
|
+
// Keeping the package id while changing a file entry must not pass: the id
|
|
252
|
+
// is recomputed from the served entries, never taken on trust.
|
|
253
|
+
const recomputed = await sha(new TextEncoder().encode(canonicalFilesJson(record.files)), "build-record");
|
|
254
|
+
gone();
|
|
255
|
+
if (recomputed !== record.package) {
|
|
256
|
+
throw fail("mismatch", `BUILD.json's package id does not match its own file entries`, { file: "build-record", expected: shortId(record.package), found: shortId(recomputed), ...served });
|
|
257
|
+
}
|
|
258
|
+
// The record's own entries need no separate comparison with the fetched
|
|
259
|
+
// bytes: its package id equals the shell's, and that id was just recomputed
|
|
260
|
+
// from its entries, so the entries are the shell's.
|
|
261
|
+
for (const [file, bytes] of [["glue", glue], ["wasm", wasm]]) {
|
|
262
|
+
const name = file === "glue" ? ENGINE_GLUE : ENGINE_WASM;
|
|
263
|
+
const want = expected.files[name];
|
|
264
|
+
const found = await sha(bytes, file);
|
|
265
|
+
gone();
|
|
266
|
+
if (found !== want.sha256) {
|
|
267
|
+
throw fail("mismatch", `${name} is not the file this build expects (${shortId(found)}, not ${shortId(want.sha256)})`, { file, expected: shortId(want.sha256), found: shortId(found), ...served });
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return { glue, wasm, record };
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export { EnginePackageAborted, EnginePackageError, RECORD_CAP_BYTES, browserDigest, isControlled, verifyEnginePackage };
|
|
274
|
+
//# sourceMappingURL=enginePackageCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enginePackageCheck.js","sources":["../../src/wasmhost/enginePackageCheck.ts"],"sourcesContent":["/**\n * The byte check for the engine package (#985 criterion 5): fetch\n * `engine/BUILD.json`, the glue and the binary, hash what arrived, and refuse\n * unless it is exactly the package this shell was built with. It returns the\n * verified bytes, so the loader instantiates from what was hashed and never\n * fetches a file a second time. Design:\n * _bmad-output/planning-artifacts/design/design-engine-package-set-consistency-2026-10-15.md, section 5.3.\n *\n * `fetch`, the digest and the abort signal are injected, so the unit tests run\n * in Node with no browser. The loader (rustEngine.ts) owns the deadline and\n * hands its signal in; this module checks the signal after every await and\n * throws `EnginePackageAborted` once it fires, so a late result is dropped.\n */\nimport { ENGINE_GLUE, ENGINE_WASM } from \"./enginePackageNames.ts\";\nimport { canonicalFilesJson, parseEngineRecord, shortId, type EnginePackageRecord, type ExpectedEnginePackage } from \"./enginePackageRecord.ts\";\n\n/** Why a package was refused. `mismatch` is the bytes disagreeing with the\n * shell, `load-failed` is the bytes not arriving whole, `unverifiable` is a\n * browser that cannot hash them. */\nexport type PackageFailureKind = \"mismatch\" | \"load-failed\" | \"unverifiable\";\n\n/** Which of the three files the refusal is about. */\nexport type PackageFile = \"glue\" | \"wasm\" | \"build-record\";\n\n/** What a failure screen and the diagnostics report. Ids are 12 hex digits. */\nexport interface PackageFailureDetail {\n file: PackageFile | null;\n /** The digest the shell expected for `file`, when the failure is a digest. */\n expected: string | null;\n /** The digest that arrived, when it was computed. */\n found: string | null;\n /** The package id this shell was built with. */\n expectedPackage: string | null;\n /** The package id `BUILD.json` named, when it named one. */\n servedPackage: string | null;\n /** Whether a service worker controlled the page. */\n controlled: boolean;\n}\n\nexport class EnginePackageError extends Error {\n readonly kind: PackageFailureKind;\n readonly detail: PackageFailureDetail;\n constructor(kind: PackageFailureKind, message: string, detail: Partial<PackageFailureDetail> & { controlled: boolean }) {\n super(message);\n this.name = \"EnginePackageError\";\n this.kind = kind;\n this.detail = { file: null, expected: null, found: null, expectedPackage: null, servedPackage: null, ...detail };\n }\n}\n\n/** Thrown when the caller's signal fired. The loader already reported why\n * (its deadline), so this is never shown to a player. */\nexport class EnginePackageAborted extends Error {\n constructor() {\n super(\"the engine package check was aborted\");\n this.name = \"EnginePackageAborted\";\n }\n}\n\n/** A sibling fetch stopped because another file already failed. */\nclass SiblingStopped extends Error {\n override name = \"SiblingStopped\";\n}\n\n/** The most `BUILD.json` may weigh. Its real size is about 400 bytes. */\nexport const RECORD_CAP_BYTES = 16 * 1024;\n\nexport interface PackageUrls {\n record: string;\n glue: string;\n wasm: string;\n}\n\nexport interface VerifyOptions {\n /** What the shell was built with; null when the build carries no package. */\n expected: ExpectedEnginePackage | null;\n urls: PackageUrls;\n fetch: (url: string, init: { signal: AbortSignal }) => Promise<Response>;\n /** SHA-256 of the bytes, or undefined where `crypto.subtle` is missing. */\n digest: ((bytes: Uint8Array) => Promise<Uint8Array>) | undefined;\n signal: AbortSignal;\n /** Whether a service worker controls the page, for the diagnostics. */\n controlled: boolean;\n /** The page's origin, to catch a redirect to another one. */\n origin: string;\n}\n\nexport interface VerifiedPackage {\n glue: Uint8Array;\n wasm: Uint8Array;\n record: EnginePackageRecord;\n}\n\n/** `navigator.serviceWorker` is undefined when service workers are off or the\n * context is insecure, so the diagnostics read it with a guard. */\nexport function isControlled(nav: { serviceWorker?: { controller?: unknown } } | undefined): boolean {\n try {\n return nav?.serviceWorker?.controller != null;\n } catch {\n // Reading it can throw a SecurityError (blocked site data, a sandboxed\n // frame); the diagnostics must still be built.\n return false;\n }\n}\n\n/** The page's digest: `crypto.subtle`, or undefined in an insecure context. */\nexport function browserDigest(c: { subtle?: SubtleCrypto } | null | undefined = globalThis.crypto): VerifyOptions[\"digest\"] {\n const subtle = c?.subtle;\n if (!subtle) return undefined;\n return async (bytes) => new Uint8Array(await subtle.digest(\"SHA-256\", bytes as BufferSource));\n}\n\nfunction hex(bytes: Uint8Array): string {\n let s = \"\";\n for (const b of bytes) s += b.toString(16).padStart(2, \"0\");\n return s;\n}\n\nconst NAMES: Record<PackageFile, string> = { \"build-record\": \"BUILD.json\", glue: ENGINE_GLUE, wasm: ENGINE_WASM };\n\n/**\n * Reads a body through a stream, counting real bytes, and stops at `cap`. A\n * header that promises more than the cap is refused before reading; a header\n * that lies is caught by the count. An unavailable stream is a load failure:\n * there is no unbounded `arrayBuffer()` fallback.\n */\nasync function readBounded(file: PackageFile, res: Response, cap: number, ctl: AbortController, fail: (kind: PackageFailureKind, why: string) => EnginePackageError): Promise<Uint8Array> {\n // Content-Length counts the encoded bytes, while the stream yields decoded\n // ones, so it is only compared with a body that was not compressed. For a\n // compressed one the real count below is the only measure.\n const header = res.headers.get(\"content-length\");\n const encoding = res.headers.get(\"content-encoding\");\n const declared = header !== null && (encoding === null || encoding === \"\" || encoding.toLowerCase() === \"identity\") ? Number(header) : Number.NaN;\n if (Number.isFinite(declared) && declared > cap) {\n await res.body?.cancel().catch(() => undefined);\n throw fail(\"mismatch\", `${NAMES[file]} is larger than the ${cap} bytes this build expects`);\n }\n const reader = res.body?.getReader();\n if (!reader) throw fail(\"load-failed\", `${NAMES[file]} came back with no readable body`);\n const chunks: Uint8Array[] = [];\n let total = 0;\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (ctl.signal.aborted) throw new SiblingStopped();\n if (done) break;\n total += value.length;\n if (total > cap) {\n await reader.cancel().catch(() => undefined);\n throw fail(\"mismatch\", `${NAMES[file]} is larger than the ${cap} bytes this build expects`);\n }\n chunks.push(value);\n }\n } catch (e) {\n if (e instanceof EnginePackageError || e instanceof SiblingStopped) throw e;\n // A sibling's failure or the caller's deadline aborts this read too; that\n // is not this file's fault and must not outrank the real failure.\n if (ctl.signal.aborted) throw new SiblingStopped();\n throw fail(\"load-failed\", `${NAMES[file]} stopped arriving: ${e instanceof Error ? e.message : String(e)}`);\n }\n if (Number.isFinite(declared) && total < declared) {\n throw fail(\"load-failed\", `${NAMES[file]} ended after ${total} of ${declared} bytes`);\n }\n const out = new Uint8Array(total);\n let at = 0;\n for (const c of chunks) {\n out.set(c, at);\n at += c.length;\n }\n return out;\n}\n\n/**\n * Fetches and checks the package. Resolves with the verified bytes, or throws\n * an `EnginePackageError` (a refusal) or `EnginePackageAborted` (the caller's\n * deadline).\n */\nexport async function verifyEnginePackage(opts: VerifyOptions): Promise<VerifiedPackage> {\n const { expected, signal } = opts;\n const base = { controlled: opts.controlled, expectedPackage: expected ? shortId(expected.package) : null };\n const fail = (kind: PackageFailureKind, why: string, more: Partial<PackageFailureDetail> = {}) => new EnginePackageError(kind, why, { ...base, ...more });\n const gone = () => {\n if (signal.aborted) throw new EnginePackageAborted();\n };\n gone();\n if (!expected) throw fail(\"load-failed\", \"this build carries no engine package; a corrected deployment is needed\");\n if (!opts.digest) throw fail(\"unverifiable\", \"this browser connection cannot verify the engine files (no crypto.subtle); open the game over HTTPS\");\n const digest = opts.digest;\n const sha = async (bytes: Uint8Array, file: PackageFile): Promise<string> => {\n try {\n return hex(await digest(bytes));\n } catch (e) {\n throw fail(\"unverifiable\", `hashing ${NAMES[file]} failed: ${e instanceof Error ? e.message : String(e)}`, { file });\n }\n };\n\n // One controller for the three fetches: the caller's deadline stops them\n // all, and so does the first file to fail.\n const ctl = new AbortController();\n const stop = () => ctl.abort();\n signal.addEventListener(\"abort\", stop, { once: true });\n const get = async (file: PackageFile, url: string, cap: number): Promise<Uint8Array> => {\n let res: Response;\n try {\n res = await opts.fetch(url, { signal: ctl.signal });\n } catch (e) {\n if (ctl.signal.aborted) throw new SiblingStopped();\n throw fail(\"load-failed\", `${NAMES[file]} could not be fetched: ${e instanceof Error ? e.message : String(e)}`, { file });\n }\n if (ctl.signal.aborted) throw new SiblingStopped();\n const refuse = (why: string) => {\n void res.body?.cancel().catch(() => undefined);\n return fail(\"load-failed\", `${NAMES[file]} ${why}`, { file });\n };\n if (res.status !== 200) throw refuse(`came back with HTTP ${res.status}`);\n if (res.redirected) {\n let origin: string | null = null;\n try {\n origin = new URL(res.url).origin;\n } catch {\n // An unparseable final URL cannot be shown to be ours.\n }\n if (origin !== opts.origin) throw refuse(\"was redirected to another origin\");\n }\n if (/^text\\/html/i.test(res.headers.get(\"content-type\") ?? \"\")) throw refuse(\"came back as a web page\");\n // The digest the shell expects for this file rides on any refusal, the\n // oversize one included (the record may not have been read yet).\n const entry = file === \"build-record\" ? null : expected.files[file === \"glue\" ? ENGINE_GLUE : ENGINE_WASM];\n return readBounded(file, res, cap, ctl, (kind, why) => fail(kind, why, { file, expected: entry ? shortId(entry.sha256) : null }));\n };\n const order: [PackageFile, string, number][] = [\n [\"build-record\", opts.urls.record, RECORD_CAP_BYTES],\n [\"glue\", opts.urls.glue, expected.files[ENGINE_GLUE].bytes],\n [\"wasm\", opts.urls.wasm, expected.files[ENGINE_WASM].bytes],\n ];\n let bodies: Uint8Array[];\n try {\n const settled = await Promise.allSettled(\n order.map(async ([file, url, cap]) => {\n try {\n return await get(file, url, cap);\n } catch (e) {\n stop();\n throw e;\n }\n }),\n );\n gone();\n // The first failure in a fixed order that is not a sibling's stop, so the\n // reason does not depend on which fetch lost the race.\n for (const s of settled) {\n if (s.status === \"rejected\" && !(s.reason instanceof SiblingStopped)) {\n // An oversize file is refused as it streams, possibly before the\n // record was read; when the record did arrive whole, the refusal\n // still names the package it served.\n const early = settled[0];\n if (s.reason instanceof EnginePackageError && s.reason.detail.servedPackage === null && early.status === \"fulfilled\") {\n const served = parseEngineRecord(new TextDecoder().decode(early.value));\n if (served.ok) s.reason.detail.servedPackage = shortId(served.record.package);\n }\n throw s.reason;\n }\n }\n if (settled.some((s) => s.status === \"rejected\")) throw new EnginePackageAborted();\n bodies = settled.map((s) => (s as PromiseFulfilledResult<Uint8Array>).value);\n } finally {\n signal.removeEventListener(\"abort\", stop);\n }\n const [recordBytes, glue, wasm] = bodies;\n\n const parsed = parseEngineRecord(new TextDecoder().decode(recordBytes));\n if (!parsed.ok) throw fail(\"mismatch\", `BUILD.json is not a usable record (${parsed.why})`, { file: \"build-record\" });\n const record = parsed.record;\n const served = { servedPackage: shortId(record.package) };\n // A complete body of the wrong size is a different build (a body that ends\n // early with nothing to say it was cut short reads the same way). The sizes\n // are compared before any hashing, with the served id attached.\n for (const [file, bytes] of [[\"glue\", glue], [\"wasm\", wasm]] as const) {\n const want = expected.files[file === \"glue\" ? ENGINE_GLUE : ENGINE_WASM];\n if (bytes.length !== want.bytes) {\n throw fail(\"mismatch\", `${NAMES[file]} is ${bytes.length} bytes; this build expects ${want.bytes}`, { file, expected: shortId(want.sha256), ...served });\n }\n }\n if (record.package !== expected.package) {\n throw fail(\"mismatch\", `BUILD.json names package ${shortId(record.package)}; this build expects ${shortId(expected.package)}`, { file: \"build-record\", ...served });\n }\n // Keeping the package id while changing a file entry must not pass: the id\n // is recomputed from the served entries, never taken on trust.\n const recomputed = await sha(new TextEncoder().encode(canonicalFilesJson(record.files)), \"build-record\");\n gone();\n if (recomputed !== record.package) {\n throw fail(\"mismatch\", `BUILD.json's package id does not match its own file entries`, { file: \"build-record\", expected: shortId(record.package), found: shortId(recomputed), ...served });\n }\n\n // The record's own entries need no separate comparison with the fetched\n // bytes: its package id equals the shell's, and that id was just recomputed\n // from its entries, so the entries are the shell's.\n for (const [file, bytes] of [[\"glue\", glue], [\"wasm\", wasm]] as const) {\n const name = file === \"glue\" ? ENGINE_GLUE : ENGINE_WASM;\n const want = expected.files[name];\n const found = await sha(bytes, file);\n gone();\n if (found !== want.sha256) {\n throw fail(\"mismatch\", `${name} is not the file this build expects (${shortId(found)}, not ${shortId(want.sha256)})`, { file, expected: shortId(want.sha256), found: shortId(found), ...served });\n }\n }\n return { glue, wasm, record };\n}\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;AAYG;AA2BG,MAAO,kBAAmB,SAAQ,KAAK,CAAA;AAG3C,IAAA,WAAA,CAAY,IAAwB,EAAE,OAAe,EAAE,MAA+D,EAAA;QACpH,KAAK,CAAC,OAAO,CAAC;AACd,QAAA,IAAI,CAAC,IAAI,GAAG,oBAAoB;AAChC,QAAA,IAAI,CAAC,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AAI,CAAC,UAAU,EAAE,CAAA,EAAG,IAAI,wCAAwC,OAAO,CAAC,KAAK,CAAC,CAAA,MAAA,EAAS,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC;QACnM;IACF;AACA,IAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;AAC/B;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The file names of the served engine package, alone, so the app can name
|
|
3
|
+
* the glue without bundling the full package list in engineAssets.ts (which
|
|
4
|
+
* only the build, its checks and the tests read).
|
|
5
|
+
*
|
|
6
|
+
* Keep this file ERASABLE (type-only TypeScript syntax; the rule is spelled
|
|
7
|
+
* out in scripts/screenshot-env.ts): build scripts import it under plain
|
|
8
|
+
* `node`. It has no imports.
|
|
9
|
+
*/
|
|
10
|
+
/** The folder the package is served from, under the site base. */
|
|
11
|
+
export declare const ENGINE_DIR = "engine/";
|
|
12
|
+
/** The JavaScript glue wasm-bindgen writes; the verified loader imports it. */
|
|
13
|
+
export declare const ENGINE_GLUE = "verticopolis_engine.js";
|
|
14
|
+
/** The engine binary; the verified loader fetches it beside the glue. */
|
|
15
|
+
export declare const ENGINE_WASM = "verticopolis_engine_bg.wasm";
|
|
16
|
+
/** The hash of the Rust sources the package was built from. */
|
|
17
|
+
export declare const ENGINE_BUILD_RECORD = "BUILD.json";
|
|
18
|
+
/** The crates compiled into the binary, for the third-party notices (the
|
|
19
|
+
* same name as ENGINE_THIRD_PARTY in src/build/rustNotices.ts; the test
|
|
20
|
+
* holds them equal). */
|
|
21
|
+
export declare const ENGINE_THIRD_PARTY_RECORD = "THIRD-PARTY.json";
|
|
22
|
+
/** The line a development serve logs when it loads the engine without the byte
|
|
23
|
+
* check (loadEngineModule.ts). It is the marker scripts/verify-precache.ts
|
|
24
|
+
* looks for: a production bundle that holds it still carries the skip. */
|
|
25
|
+
export declare const DEV_SKIP_MARKER = "development serve: the engine package is not verified";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The file names of the served engine package, alone, so the app can name
|
|
3
|
+
* the glue without bundling the full package list in engineAssets.ts (which
|
|
4
|
+
* only the build, its checks and the tests read).
|
|
5
|
+
*
|
|
6
|
+
* Keep this file ERASABLE (type-only TypeScript syntax; the rule is spelled
|
|
7
|
+
* out in scripts/screenshot-env.ts): build scripts import it under plain
|
|
8
|
+
* `node`. It has no imports.
|
|
9
|
+
*/
|
|
10
|
+
/** The folder the package is served from, under the site base. */
|
|
11
|
+
const ENGINE_DIR = "engine/";
|
|
12
|
+
/** The JavaScript glue wasm-bindgen writes; the verified loader imports it. */
|
|
13
|
+
const ENGINE_GLUE = "verticopolis_engine.js";
|
|
14
|
+
/** The engine binary; the verified loader fetches it beside the glue. */
|
|
15
|
+
const ENGINE_WASM = "verticopolis_engine_bg.wasm";
|
|
16
|
+
/** The hash of the Rust sources the package was built from. */
|
|
17
|
+
const ENGINE_BUILD_RECORD = "BUILD.json";
|
|
18
|
+
/** The crates compiled into the binary, for the third-party notices (the
|
|
19
|
+
* same name as ENGINE_THIRD_PARTY in src/build/rustNotices.ts; the test
|
|
20
|
+
* holds them equal). */
|
|
21
|
+
const ENGINE_THIRD_PARTY_RECORD = "THIRD-PARTY.json";
|
|
22
|
+
/** The line a development serve logs when it loads the engine without the byte
|
|
23
|
+
* check (loadEngineModule.ts). It is the marker scripts/verify-precache.ts
|
|
24
|
+
* looks for: a production bundle that holds it still carries the skip. */
|
|
25
|
+
const DEV_SKIP_MARKER = "development serve: the engine package is not verified";
|
|
26
|
+
|
|
27
|
+
export { DEV_SKIP_MARKER, ENGINE_BUILD_RECORD, ENGINE_DIR, ENGINE_GLUE, ENGINE_THIRD_PARTY_RECORD, ENGINE_WASM };
|
|
28
|
+
//# sourceMappingURL=enginePackageNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enginePackageNames.js","sources":["../../src/wasmhost/enginePackageNames.ts"],"sourcesContent":["/**\n * The file names of the served engine package, alone, so the app can name\n * the glue without bundling the full package list in engineAssets.ts (which\n * only the build, its checks and the tests read).\n *\n * Keep this file ERASABLE (type-only TypeScript syntax; the rule is spelled\n * out in scripts/screenshot-env.ts): build scripts import it under plain\n * `node`. It has no imports.\n */\n\n/** The folder the package is served from, under the site base. */\nexport const ENGINE_DIR = \"engine/\";\n/** The JavaScript glue wasm-bindgen writes; the verified loader imports it. */\nexport const ENGINE_GLUE = \"verticopolis_engine.js\";\n/** The engine binary; the verified loader fetches it beside the glue. */\nexport const ENGINE_WASM = \"verticopolis_engine_bg.wasm\";\n/** The hash of the Rust sources the package was built from. */\nexport const ENGINE_BUILD_RECORD = \"BUILD.json\";\n/** The crates compiled into the binary, for the third-party notices (the\n * same name as ENGINE_THIRD_PARTY in src/build/rustNotices.ts; the test\n * holds them equal). */\nexport const ENGINE_THIRD_PARTY_RECORD = \"THIRD-PARTY.json\";\n/** The line a development serve logs when it loads the engine without the byte\n * check (loadEngineModule.ts). It is the marker scripts/verify-precache.ts\n * looks for: a production bundle that holds it still carries the skip. */\nexport const DEV_SKIP_MARKER = \"development serve: the engine package is not verified\";\n"],"names":[],"mappings":"AAAA;;;;;;;;AAQG;AAEH;AACO,MAAM,UAAU,GAAG;AAC1B;AACO,MAAM,WAAW,GAAG;AAC3B;AACO,MAAM,WAAW,GAAG;AAC3B;AACO,MAAM,mBAAmB,GAAG;AACnC;;AAEyB;AAClB,MAAM,yBAAyB,GAAG;AACzC;;AAE2E;AACpE,MAAM,eAAe,GAAG;;"}
|