@wildshard/shard-format 0.77.0 → 0.79.1
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/corpus/exports/brasscap-mesa/blobs/image/8f4621531cafc78dd6e1211fa2441b835ede01a6b14a35f39a2e633cfe10ede6.jpg +0 -0
- package/corpus/exports/brasscap-mesa/blobs/image/c98b52cc1a047d0ed997d3cfe7f814503226cab40d6b82954b915c8962d70509.jpg +0 -0
- package/corpus/exports/brasscap-mesa/blobs/image/e7e026a984ab02e61c6c4def9e31286af0623643be44f85646db53f2413ad6b1.jpg +0 -0
- package/corpus/exports/brasscap-mesa/cook.json +1 -1
- package/corpus/exports/brasscap-mesa/mounts/shardfiles/brasscap-mesa/discovery.json +1 -1
- package/corpus/exports/brasscap-mesa/sections/economy/loot.json +1 -1
- package/corpus/exports/brasscap-mesa/sections/ui/level.json +1 -1
- package/corpus/exports/brasscap-mesa/sections/world/props.json +1 -1
- package/corpus/exports/brasscap-mesa/sections/world/tiles.json +1 -1
- package/corpus/exports/brasscap-mesa/shard.json +1 -1
- package/corpus/exports/brasscap-mesa/validation.json +1 -1
- package/corpus/exports/brasscap-mesa.pin.json +4 -4
- package/package.json +7 -7
- package/src/cli/corpus-command.ts +72 -20
- package/src/cli/corpus-live.ts +237 -0
- package/src/cli/corpus-pins.ts +15 -4
- package/src/cli/corpus.ts +17 -4
- package/src/cli/main.ts +10 -3
- package/src/format/assetAdmission.ts +4 -1
- package/src/format/deprecations.ts +0 -22
- package/src/format/empty-shardfile.ts +1 -1
- package/src/format/fieldPresentation.ts +32 -13
- package/src/format/format-migrate.ts +16 -20
- package/src/format/format-migration-deleted.ts +77 -0
- package/src/format/format-migrations.ts +32 -0
- package/src/format/lightEmitters.ts +6 -0
- package/src/format/minimap.ts +2 -3
- package/src/format/outputIndex.ts +1 -8
- package/src/format/postGraphLook.ts +4 -2
- package/src/format/shardSections.ts +1 -6
- package/src/format/version.ts +5 -16
- package/corpus/exports/brasscap-mesa/blobs/image/12ce848ef3a649f14ca1ba4b065a6f8b2e8ef8e9a3ff3a0b158b776e8c697231.jpg +0 -0
- package/corpus/exports/brasscap-mesa/blobs/image/827ad43db4e05bbb10ba144f5b8b45400c6dd30b4ccc3387a54c6a97cfa81f89.jpg +0 -0
- package/corpus/exports/brasscap-mesa/blobs/image/ec26086da4b778a8f9afe7199e93cfc77ebf136bf394e7865a882a8963afa229.jpg +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/02da0052111419cdff3a29f1c6d0ff0d223e0b53a956c16c65ed63d87928b3b9.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/068a121cd780a2a9164416f6e4fde44834f2d2f3a5ed65c174e480b7a2d3f627.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/07d5a061cd338618e528747d61eb2b17709510550ef0ba40a58b67761b200f3f.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/08b1b9ab7c732d7dbe8f961f1fc40e84042d1fe42544f55c9ee89f04dffe3d5e.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/18bdbdc704cb8aac93435d208dfe0e9a44374efb73afa3bc58c631650e0a2995.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/1a210fcddcb9749ecb1c244837e8e37ea69b038faae191dee6bbbde228d31a18.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/264ab9ede386504a5ff9814b0a620b879cb29f3f45a80bcfc0c80b8ee236e364.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/2b6fbea4c846a23cf4802ebdb1804e128896c8dd87e5d23509db6729e5b1be4e.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/2d755cc635dee90b0f3958272855a821e2dd605a189a5ffcd480a325155fe84f.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/2d76c6829fe77fb55cc2541e4aca5ce5d18b68508dcdf3fa957fe4a83b9c887a.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/32c15d55a4548501740593807c5007217c72dbc10a21f4613ef5e0cee0b90d1d.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/3539b362cf3a61a79e92e113ebf8f255d0b25ec2d2edd816498879de831fa912.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/3af38a2377bc89f6c6c82ee1e83df674efa2793db932b50a23bbce7ec9cd7941.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/3c176a7a0d0850fdcee790ed2641216fc3d1cba025928de3d7784262bb9b6f4a.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/3fb37e488aa81a64c997b3dd09794e988994c6ee3476c6d653ced1670888dd8e.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/424dcc7b320317bf3f2c62c8f19bc80564035127eb38ab811e460934d57ea38c.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/499cc7863851f97d79dbfc64e76f9e6978894199184a0d80ebdca13066a8fa78.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/4a41356041e38f0a327a917a8a09454cf113c9136434adfae25a81df1d7ff95b.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/4b7217644763b00c6ee6ae3f176c726914966fb791654a385c0638bb998b6dd2.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/4cf11c7177bb082f335e5bc7a037ef00d09355c5ad8263e284a96a92630ff9ae.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/536b37cab5a1edd6a68a71d122aab6898e44c68a5470a4ca8a9a72c57c02e034.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/55d3628b27e0fcea383df86c434a69761439f51a013359f0829675b07ee2b616.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/5652ba90fbd8146edaf42660329cc81798752f2f60b8d03956714460d5ba75ef.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/57459ab5e2ac6cec65ef5e59789dd82b9666d8573df41c4a398df603f1fa456f.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/5915b6aed21bba49b841b45574f44f60d26b44810bd68ac70b22f3f3b0dab072.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/59602e887700e99c404799954afb03a497e4f6d0598ad7a62cfcfa7e1b707836.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/5c4a5c7a8e99253561105c5fa3faf14326cf0c23adc32bfe7f8aea4dbf4b05f9.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/61822a412cfd461f4f7ae50bc13f242a0fca6c5c58fca72247b596ab037a1c85.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/673b7712908966718341508469b39cd49e6461f690ca3c23d4621ea7eba0cc30.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/69394a49520f84f6dccc1655f1c89eedc913ac53a7e48ac5dc1bff4141639bb4.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/6e58a53a6c2acd50f9f80fd270ca034c54421df8a587e181101b4b75b952ac5d.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/75dc9f23ee71e11a3a0c67eb77275d741a281c3398808fb42efd52b9973d5d04.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/76c6a403293a68ed3d6ad14e9dd27b555c3a1ef4a3cae12a2bd2ab3e67c5ad02.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/82b73ce3a18e47092840fc029177861887aa2867b007248ac79ffa20895a4491.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/8430d9bbfb4e2b678c54595ad95555c3c73d0e1b144a4d6e29664ccb4371baf0.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/848d4492508689f5c4a224079dca8809e872e33b8f2635c9f16da5dc21beed16.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/84941ac387a0d245ea20bd663ff4ee78c5315bedfa058ada0961765aff61acaf.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/859b7bbcf048a4525db0548b8f5afef83bfc4870914767153f44c05e83436ec5.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/87b68b45680a57c796eed9183211b03335a6ad6737372b3ef476c2cf42efa631.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/8cef94308af8d09670e4c99a3b6c3d9280b7a27d386653a3bd7d482b2cdf2b65.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/8e564bce3f352c2186ae09ed7fbca9739c10abc46fd5f6893c68cb47178bd2b4.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/8f89e79d0fb9b04d48c7b5719e1d024161c6a2119835b18dcb193ff51123a9be.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/8fe511ad48656a0b10801100b9100edab1be605a8a182dc5c834d298bf0d9166.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/900bda6562d06fafda54c495e325d57dbb7931813178ee207449c5519d89d537.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/997b1b7d9210bfa77dc71f16a57c6bd66bc7c648686dc2a2666044c95042978a.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/a111bb4c6cec536bcf57dddc744b871ac9f3d094ce459c16243adca19020db77.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/a2208bf899e6c84942eef9fbab569d597f574551afae5864f1953c6a517af068.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/a302ddb2598a72ece53780094b64ad861dc68e6913d8a1ea08f5d141736e2986.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/afcbc671326d0dac14e460662c1f793335877ba53cc965f67c0306833b087e7c.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/b657159e6a28c801a211024f96a7ef60e388ce928a7b41ae3d7555a6f8fd2e3e.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/be6bbc6cd15ba525790075252ba0ed0b28dae5cfbfa118c00dfb9ea1ab95e668.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/c1360e3cbe6b3dc8894bc66c359853854c2e5adeac9c7cd5ba63f5db448be601.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/c7983018dbf8e384ddf73191f526075bd0b29907061ab17642ecdc18ea7b9897.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/cea66f27ca60ea173ee0a2bcd91964dc2638eb5657250fe3aa5bd3e41faf8730.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/d052be571a0f3ab69926951f3a4c9d63f05da2ca6d91e5963dd63e04ecb515de.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/d162a993a60dd682c8c21dd111429d84d8d30413a000cf481cf98d06ca83e706.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/d238c3d3d054911714ebe30dafc99e6ad13925b7a600ba9f8d532d0f515f3f5a.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/d9a98cfe2865a9bb0e94f35c735a570b0625b58f890a6b1f6e14fab2401f0af2.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/dc27ae954b7b8a13a9459d6ca6ef2997f662715ff5f5453ea0da169f141748b8.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/df8e7486d4d8d11b9b1ae751802292bb3f61b4520f30f9b5eba38764128c965e.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/e3ff1fd41cf76668b8e1927c0c2e4056b63a293ebbd300a8f1b1d27d87786271.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/e45b7344d373b3ef4a94f560cf4e17b1eb3b8cd89d1e552fc9be11d6b7b546f0.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/eb14eb898224d5d81d1012bec54f2b79f9377dc60fa1d01e49b4c3e148292d77.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/ed0e0101a3d91a3a615f9e78ef36f7deb8bb0eab0f133241d621925d0b596599.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/f722e3a3b1f0a3d7b9f7d7c66c46d8c87245de5f8eece055daf95c7086f8c267.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/bin/f76013aedfd810f136fa689a151024bcb942687ef42ae7edf1fd3513ac4e22c7.bin +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/0547e63693282614673b13bade4c08eb772020757b131b7c80f2077873aab70e.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/0cf89e9b1824440d213c8e9e33fb357734b7241b4c7eedaba3df7f8306e05425.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/0e01060e3a507ffff6461c50b5c565c71380a6a67d9760cdd7a09afd3e30b584.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/0ef326c5cf5292cd15b48b851460ee8156f51e0a5b62457c8f1f3c53c41665a3.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/1112ff4a3f69db3b62c6d2d6ae021e7c43ce0ca1feb1d3130376881decb3c6b0.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/11357cb8a0670fdc9a03780dd79a31e0aa7a0537786cbf66491bae1722d6feb3.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/133f639cfa837bc5da7915121c71fd32281660c2aaa0248bd59bde47e7faf8bc.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/16812a090136b6678633aa4db03e4187920ae0aca776ad6da373c600cd341972.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/17e63980d7934cfe1d2823d78652af338fe9f0c2170106cd4506a2c4e7f4716f.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/199224cafc86904bdefec8f01d131d7ca3e076a22b689bfc6a26dd20373cf286.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/1a5c8cf223a2f64715ea5eaf14d97a0131f9ebdef4388dc4823dcfa57817724c.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/1b0ec09ad6718149d7ca514136cee09b04c96425f03af0559fd097112aa0daa5.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/1dc5a40152ec7b6236e954db1b04ffea1dd75d57b2e178d83ac33b653a4466fb.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/1e5024bbb1284b2ed39bbca2d0ade3acb5be2a2c6ba643291f269b76098c7f79.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/1e607ec4760a9caa60ac33fe7c64ab932c7bf69d323182cd42270580df7a8c6d.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/1e7635972e13468ffcbb1608f1d12559b066b4533912be2c35e3db07fd4a679d.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/1f03db3a38a21b8d4d02f8ede30e1303cd8d4c426815326a88f45a268b17a492.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/24f9098ec8408090fbb2b5ffb9febefc17f0e2866032166c706958f4e8a8bbe4.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/2624abb7bf45618be40f8c3221445179fca44f7321baff415fdf7ddd5e0afc6f.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/27fc3bad6db6e2b5ade5d242867d882362482ddf19c647edef821afc27d52dc2.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/29959bdb5b04a9180e88ec1ed976bae55424d3dc50985f13c0f85bae11ae79ee.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/308cbce2b1b6360f9a2dc275d0bc28be1966fc3ff5e0a58844405ba867f3f668.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/3674d7be969755aaffa368e57b8d1bb743bc98e766a57948859d54fdc7d2c066.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/3736ca95c9c40b30e21302ae6c89148d8ac09264dfbb7e5764b08c265a73ba3c.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/3f519c7c7482307cae908b27602dcb7716e2da4b651eff39c4c37103998d18fa.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/4767636d5554b60c94b447b87b77fc1456a2b9af42bfe08585389d27f306dd5e.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/4a3242773b3a73a73ee746a0cdf30c8d6d904bb4406dfdf9822dcd535d6ae308.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/4c7bf3788cba151442d85c3f76553c2e356edf8566ae8243d0a535c9bcde51d0.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/4fdf7ee67d12de1cd30c3c2bbd9409032dcab5feb3a7d3977b92c50b1d161afe.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/5821f33aa00e9acd2f4c0a29129978ee7006a879d163ce1463ae476031bfabcf.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/5a986c3e44fc686a2efe7648c3945bb7b51cf303918381383f21f898dd312cad.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/5c32fc1de6d198ed606d3e8c3264319acdd950dab18e8b723fc6332bf2f56aea.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/602ce4e8b00a0afbc1a894b65641e48d362ec834a559b9d97a4801473bb01da7.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/6180f9f96167522d8cab4de1d52598cecee8d7ee042f48e41669c98cf61c19c3.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/6205973ba63f7a554662ba05010d25131bed2d9656de422e2067ca54709d5b3c.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/693e556f2165232e8a38b1b2d68676f235ece5705c564992cfa7731426f4d376.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/6a46175438bec5527c281b577bd220b6badedf3c74266b997d39e596f83b8853.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/6ca1bcad7ea053a259b7f9fc5a7ec388a4cd29d44391d93386ea8b1143d94c21.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/6f9bc99656b611890d6acc76ee416f6222ca2d5f62167840b4216a21e020a4c8.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/6fb1e7857996662233ab5314fc13f8aa30703f91c04542e352ec17f9dc4fc054.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/7028ec39712143a7e9d09d2e1477282b654d0470102ca9d272ac82b23604cb21.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/73af65ac86efa61099178f3e7075dcd26d389ee9b9aa3546c18dede10c3dfda1.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/73b992b71bd3165ff7701ab1430c075cb5ba9b74e6363d24640377b1011ddc93.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/7471261d4df59979ba41a622d93779b66ebecd50353ad433862e603ee65f8748.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/76e9a3fcca962c2f900cf79dc1a0851840bd405dc11231f629f784adbcb69d23.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/79d2d29e8cd8b642386b5f31429b39bc4d6f13e53107dda00ebc463abf80c79d.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/7de66fcfffe4ff108510cbe6bebec44e28ab4b78e98e9c1a38466db5b81881f7.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/811fa798cb81ea99488db98e3d3ddea815aac8f6e7493ad04d0176f603978678.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/89b277f1636be220ff5658ff1f1c62efe14079d6e1f42efb373fbf0246801533.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/905c5fe666d9f6174e987382e47d3f325c5696cf8792d7a4a1dd120a438b8270.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/90efe3e05370ee853c0130b98ee82f00b86f7c7104e96b094715187fa49ac16f.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/968a7c5cb13014bce00a29d43b344bd6943ff00ae2908abbc6b40a994f1172a1.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/9a955b4e69dfa5b38f071099053c1a3684cf85ec2d346420de2853c61768f8cc.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/9da2781216a2e482dd8a6ada5ebb43bcf48e0169430e787ac277559cb2ade19a.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/9db02aab14a3b52463deadefbf4ba771809941e7fcb137c905955bdc80ec23bd.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/a3fe1788cf5d7f260249c722f0e0695a4d55744d1b14be44122377147a296256.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/a5c75af8f090d3c95fa46d2be49be5031138d7cd1bae234ae028edf717bf299e.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/a771abd40bd337a464c1bd19f841b62e290124faa89b19ec50e85ab36bc740a5.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/a94a2ad2ed463a47cdda117df25b06b3cf6be37ddac08594bc5f5d76c7237730.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/ad434e4a6490e495994b25f7574a5847a9f7d9c2ca5a2b229a9dfdd2e5e2bb72.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/aeae7b05404b852008a7897689e58aacef44a2c3bc0e87d2519ecdb4cb1e3ff5.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/b0c0c8a4985f92be3b358a8e703c67957427501882aeee05b4ccd3c7880930d4.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/b25174c3cd13eea6e1d9c3104ee5197dc6330129b2f0f7676e8a429900999d9b.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/b3eecdec571df96338edf690443394ff859383b4c94f4cf33d42c240006f8543.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/b7aa0c61ff9e7411535c7b7b8e587849a92bad00d431171ab16ad47d55db0a53.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/b9deef944c22331bc05220d1d6e46412e3cb1246ef041a4405d0cbbd90c2d624.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/ba9376e4ac39b809133ab717edb4c88b5219118766db492d7c97534ce119c2ec.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/baf338e9c272158b905fb58a712e29410c657a45be2764f1c6c43ca87fd1db48.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/bcf68be2df950c4cb42915453df6e0fcb7b7acb4162ddc2c1ed2ad2cefa68ff7.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/bd442ac9fbe52b9f2e4ba586670017c3f2d9fedf1cbdec77ef24e9f8b3a183c8.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/c142adcf253be43b66f23ede8cea1e8fcfa256ebf53054a1068ace04745718a6.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/cfb165a7675d15cee2c490b31095a58f73bace50ccc1e0fdf2c8dc4400f1df27.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/d40f2ee59612473e9f687f17a0e203fdb4ba54c7185b05a8d81a433b04f24134.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/d50ce95411156a6b6cf386aefa5ee58db659811813f74be74f323e7c5795056f.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/d6af418bbde39b4fc7d22a61401d416be7a3fc1214ea2d3f42b4549c392d22ca.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/de7222ceeb1f72693dfb7fd1f343798659e03772d77f2b498fd8ebece2d5550a.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/e26975b198127ac3b6b4f5c4bc08ad47d6691398feee777743285391cd36d502.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/eb96567a266d24be188cb5b08021112f2fad311cbead939d53c5565da11f6265.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/ecf66230bf7b68050c0827c2e4caf3de90e46859d291b794faa0dd3816d9dac6.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/ed8f067763a4a8adb83d80c8324b2a9668f1061f5f5352f21295e6cc5132386f.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/ee507a38772865467736d370791fe73c6aa4d83fe3e7ff4baa156b9cb2894c1c.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/eeb89188619132e11973b37d5dfe12d6af95d9fcb47084cebe3a2ed4eb5a7247.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/eedc5b62dc6f27d4a089e9f5b282f626129236d3f1689b001e04f8748bf8859c.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/f4119b9c6c23435619682b5d247743459e76584b9b0d6c5cb689d8e156906695.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/f576047267a0bf9bd4bfc47072ea3d11066345b839953546292da678d1cb4722.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/f8cdfb11997d4ccabea88bcdd3924cc8b621b33618b18fe5fbfd286edfc1d87e.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/glb/fce95ecc5db24c903bd46f338e366e2715411465a5efac180e2f0f46397e59de.glb +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/image/0579557f9344df6f2c4b1225e6252e53ab86d417a4c9b504b5c714a08a388e47.jpg +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/image/9e18816a2ec16fbbb1f00f4a39c73ac2cbf6a8cdc17b4c96b1eba4cc9a754dc7.jpg +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/image/eb453c71cfb1f9441eb00b32281f98e226e49d9dcf75c231455575fcdc652222.jpg +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/json/8059b65753f0b38d85b2a7a14848842282c8f14c52ffcc3c83089997d8591765.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/blobs/json/eaca25036cc30b1cbece326d11b2ceceee1254d7fa72d4141984d16f992af6d5.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/blobs/wasm/1d6ace79610c4d510b60ad0c52915e42b57797d91f1ef292f60d8a3daec03dd6.wasm +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/wasm/24a4d4c1292677b1c984b5c0d3497ae2929528bf511df475f80cc20945bb08ec.wasm +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/blobs/wasm/b86d8afcc269fb063ebf64768fc3787635b65a7409a571115b07be2e4da39733.wasm +0 -0
- package/corpus/legacy/brasscap-mesa-ss3/cook.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/mounts/shardfiles/brasscap-mesa/discovery.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/actors/creatures.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/actors/crowds.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/actors/species.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/audio/audio.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/combat/encounters.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/combat/items.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/combat/strikes.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/economy/ledger.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/economy/loot.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/look/look.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/look/materials.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/quests/quests.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/sim/client-scripts.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/sim/hooks.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/sim/plumbing.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/sim/scripts.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/sim/sim.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/state/migrations.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/state/state.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/ui/card.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/ui/compendium.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/ui/level.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/ui/ui.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/collision.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/days.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/edge.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/movers.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/navigation.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/props.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/spawn.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/terrain.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/tiles.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/traversal.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/water.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/sections/world/weather.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/shard.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3/validation.json +0 -1
- package/corpus/legacy/brasscap-mesa-ss3.pin.json +0 -8
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises'
|
|
2
|
-
|
|
3
1
|
import { loadCandidate } from './corpus-candidate.ts'
|
|
4
|
-
import { corpusGate
|
|
2
|
+
import { corpusGate } from './corpus-gate.ts'
|
|
3
|
+
import {
|
|
4
|
+
classifyKept,
|
|
5
|
+
keptLines,
|
|
6
|
+
liveHashes,
|
|
7
|
+
pointedHashes,
|
|
8
|
+
} from './corpus-live.ts'
|
|
5
9
|
import { readPins } from './corpus-pins.ts'
|
|
6
10
|
import { corpusReport } from './corpus-report.ts'
|
|
7
11
|
import { corpusUsage, writeUsage } from './corpus-usage.ts'
|
|
8
|
-
import { runCorpus } from './corpus.ts'
|
|
12
|
+
import { listKept, runCorpus } from './corpus.ts'
|
|
9
13
|
import { readVersion } from './version.ts'
|
|
10
14
|
|
|
11
|
-
import type {
|
|
15
|
+
import type { Pin } from './corpus-pins.ts'
|
|
16
|
+
import type { CorpusRow, StoredRecord } from './corpus.ts'
|
|
12
17
|
|
|
13
18
|
interface CorpusArgs {
|
|
14
19
|
readonly api: string
|
|
@@ -17,19 +22,44 @@ interface CorpusArgs {
|
|
|
17
22
|
readonly pins: string | undefined
|
|
18
23
|
readonly candidate: string | undefined
|
|
19
24
|
readonly only: string | undefined
|
|
25
|
+
/** ZS3: store drift blocks too (corpus.yml's nightly once ZS11 finalizes the retired and proof shards). */
|
|
26
|
+
readonly strictStore?: boolean
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
const EXIT_OK = 0
|
|
23
30
|
const EXIT_INVALID = 3
|
|
24
31
|
const NONE = 0
|
|
25
|
-
const
|
|
32
|
+
const ENGINE_PINS =
|
|
33
|
+
'https://raw.githubusercontent.com/project-wildshard/engine/main/test/pins'
|
|
34
|
+
/** ZS3 (J507): the next releases, production's and staging's, as engine pins them. */
|
|
35
|
+
const LIVE_PINS = `${ENGINE_PINS}/shardfiles.json,${ENGINE_PINS}/staging.json`
|
|
36
|
+
/** The signed release and placement files api-server's prune reads, public. */
|
|
37
|
+
const PACKS = 'https://packs.wildshard.io'
|
|
38
|
+
|
|
39
|
+
interface LiveSet {
|
|
40
|
+
readonly pins: readonly Pin[]
|
|
41
|
+
readonly listed: readonly StoredRecord[]
|
|
42
|
+
readonly live: ReadonlySet<string>
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** ZS3 (J507): the API's list, engine's pins and every hash a signed release file or placement names. */
|
|
46
|
+
async function liveSet(args: Readonly<CorpusArgs>): Promise<LiveSet> {
|
|
47
|
+
const pins = await readPins(args.pins ?? LIVE_PINS)
|
|
48
|
+
const listed = await listKept({
|
|
49
|
+
api: args.api,
|
|
50
|
+
cache: args.cache,
|
|
51
|
+
validator: '',
|
|
52
|
+
})
|
|
53
|
+
const live = await liveHashes({ packs: PACKS, listed, pins })
|
|
54
|
+
return { pins, listed, live }
|
|
55
|
+
}
|
|
26
56
|
|
|
27
|
-
/** Every
|
|
57
|
+
/** Every live original's row (ZS3, FE13). */
|
|
28
58
|
async function corpusRows(
|
|
29
59
|
args: Readonly<CorpusArgs>,
|
|
60
|
+
set: Readonly<LiveSet>,
|
|
30
61
|
): Promise<Readonly<{ rows: CorpusRow[]; validator: string }>> {
|
|
31
62
|
const validator = await readVersion()
|
|
32
|
-
const pins = args.pins === undefined ? [] : await readPins(args.pins)
|
|
33
63
|
const candidate =
|
|
34
64
|
args.candidate === undefined
|
|
35
65
|
? {}
|
|
@@ -39,29 +69,51 @@ async function corpusRows(
|
|
|
39
69
|
api: args.api,
|
|
40
70
|
cache: args.cache,
|
|
41
71
|
validator,
|
|
42
|
-
pins,
|
|
72
|
+
pins: set.pins,
|
|
73
|
+
live: set.live,
|
|
43
74
|
...candidate,
|
|
44
75
|
...only,
|
|
45
76
|
})
|
|
46
77
|
return { rows, validator }
|
|
47
78
|
}
|
|
48
79
|
|
|
49
|
-
/**
|
|
80
|
+
/** SHARD-COMPAT FE5, ZS3 (J507): every live original that fails blocks; no known-failures list excuses one (a live
|
|
81
|
+
* zone is fixed forward by republishing it). Answers how many block. */
|
|
82
|
+
function gateBlocking(rows: readonly CorpusRow[]): number {
|
|
83
|
+
const gate = corpusGate(rows, [])
|
|
84
|
+
if (gate.lines.length > NONE) {
|
|
85
|
+
process.stdout.write(`${gate.lines.join('\n')}\n`)
|
|
86
|
+
}
|
|
87
|
+
return gate.blocking.length
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** ZS3: the API's listed originals beyond the live ones; a drifted one blocks. */
|
|
91
|
+
async function storeDrift(
|
|
92
|
+
args: Readonly<CorpusArgs>,
|
|
93
|
+
set: Readonly<LiveSet>,
|
|
94
|
+
): Promise<number> {
|
|
95
|
+
const kept = classifyKept(set.listed, {
|
|
96
|
+
live: set.live,
|
|
97
|
+
pins: set.pins,
|
|
98
|
+
pointed: await pointedHashes(args.api),
|
|
99
|
+
})
|
|
100
|
+
process.stdout.write(`${keptLines(kept).join('\n')}\n`)
|
|
101
|
+
return kept.drift.length
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** `shard-format corpus`: every live original, as stored (FE3, ZS3), gated by FE5's known failures and ZS3's store
|
|
105
|
+
* drift; `--usage` writes FE13's record over the live originals only. */
|
|
50
106
|
async function corpusCommand(args: Readonly<CorpusArgs>): Promise<number> {
|
|
51
|
-
const
|
|
107
|
+
const set = await liveSet(args)
|
|
108
|
+
const { rows, validator } = await corpusRows(args, set)
|
|
52
109
|
process.stdout.write(`${corpusReport(rows)}\n`)
|
|
110
|
+
const drift = args.only === undefined ? await storeDrift(args, set) : NONE
|
|
53
111
|
if (args.usage !== undefined) {
|
|
54
112
|
await writeUsage(args.usage, corpusUsage(rows, validator, new Date()))
|
|
55
113
|
}
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
)
|
|
60
|
-
const gate = corpusGate(rows, readKnownFailures(listed))
|
|
61
|
-
if (gate.lines.length > NONE) {
|
|
62
|
-
process.stdout.write(`${gate.lines.join('\n')}\n`)
|
|
63
|
-
}
|
|
64
|
-
return gate.blocking.length > NONE ? EXIT_INVALID : EXIT_OK
|
|
114
|
+
const blocking = gateBlocking(rows)
|
|
115
|
+
const drifted = args.strictStore === true && drift > NONE
|
|
116
|
+
return blocking > NONE || drifted ? EXIT_INVALID : EXIT_OK
|
|
65
117
|
}
|
|
66
118
|
|
|
67
119
|
export { corpusCommand }
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { array, number, object, optional, parse, string } from 'valibot'
|
|
2
|
+
|
|
3
|
+
import type { Pin } from './corpus-pins.ts'
|
|
4
|
+
import type { StoredRecord } from './corpus.ts'
|
|
5
|
+
|
|
6
|
+
// ZONE-SNAPSHOTS ZS3 (J507): the corpus counts only what players load. Live is what the signed release files name and
|
|
7
|
+
// the signed placements place (public at packs.wildshard.io/releases/, the files api-server's prune reads), plus
|
|
8
|
+
// engine's pins (the next release's). The API keeps more: each live revision's 3 earlier revisions as rollback copies
|
|
9
|
+
// (api-server ZS2), which roll back with their engine release and never count as users, and whatever a channel's own
|
|
10
|
+
// pointer still names (`/api/catalogue.json`). A listed original that is none of these is store drift: the prune
|
|
11
|
+
// should have taken it, and the corpus fails.
|
|
12
|
+
|
|
13
|
+
/** Rollback copies kept before each live revision (api-server ZS2's `KEEP_BACK`). */
|
|
14
|
+
const KEEP_BACK = 3
|
|
15
|
+
const CHANNELS = ['production', 'staging', 'preview']
|
|
16
|
+
const RELEASE_CHANNELS = ['staging', 'production']
|
|
17
|
+
const FETCH_TIMEOUT_MS = 60_000
|
|
18
|
+
const NO_REVISION = 0
|
|
19
|
+
const FIRST = 0
|
|
20
|
+
const HeadSchema = object({ hash: optional(string()) })
|
|
21
|
+
const CatalogueSchema = object({ shards: array(HeadSchema) })
|
|
22
|
+
const SignedSchema = object({ body: string() })
|
|
23
|
+
const ReleaseShard = object({
|
|
24
|
+
slug: string(),
|
|
25
|
+
revision: optional(number()),
|
|
26
|
+
hash: optional(string()),
|
|
27
|
+
})
|
|
28
|
+
const ReleaseSchema = object({ shards: array(ReleaseShard) })
|
|
29
|
+
const PlacementSchema = object({ cells: array(HeadSchema) })
|
|
30
|
+
|
|
31
|
+
interface Kept {
|
|
32
|
+
readonly live: readonly StoredRecord[]
|
|
33
|
+
readonly rollback: readonly StoredRecord[]
|
|
34
|
+
readonly pointed: readonly StoredRecord[]
|
|
35
|
+
readonly drift: readonly StoredRecord[]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** What decides a listed original's kind: the live hashes, engine's pins and a channel's own pointers. */
|
|
39
|
+
interface KeptBy {
|
|
40
|
+
readonly live: ReadonlySet<string>
|
|
41
|
+
readonly pins: readonly Readonly<Pin>[]
|
|
42
|
+
readonly pointed: ReadonlySet<string>
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface Anchor {
|
|
46
|
+
readonly slug: string
|
|
47
|
+
readonly revision: number
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function slugOf(stored: StoredRecord): string {
|
|
51
|
+
return stored.revisions.at(FIRST)?.shard ?? ''
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function revisionOf(stored: StoredRecord): number {
|
|
55
|
+
return stored.revisions.at(FIRST)?.revision ?? NO_REVISION
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function between(
|
|
59
|
+
others: readonly number[],
|
|
60
|
+
revision: number,
|
|
61
|
+
anchor: Anchor,
|
|
62
|
+
): number {
|
|
63
|
+
return others.filter(
|
|
64
|
+
(other: number): boolean => other > revision && other < anchor.revision,
|
|
65
|
+
).length
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Whether `stored` is one of the `KEEP_BACK` listed revisions before a live revision of its shard. */
|
|
69
|
+
function isRollback(
|
|
70
|
+
stored: StoredRecord,
|
|
71
|
+
listed: readonly StoredRecord[],
|
|
72
|
+
anchors: readonly Anchor[],
|
|
73
|
+
): boolean {
|
|
74
|
+
const slug = slugOf(stored)
|
|
75
|
+
const revision = revisionOf(stored)
|
|
76
|
+
const others = listed
|
|
77
|
+
.filter((other: StoredRecord): boolean => slugOf(other) === slug)
|
|
78
|
+
.map((other: StoredRecord): number => revisionOf(other))
|
|
79
|
+
return anchors.some(
|
|
80
|
+
(anchor: Anchor): boolean =>
|
|
81
|
+
anchor.slug === slug &&
|
|
82
|
+
anchor.revision > revision &&
|
|
83
|
+
between(others, revision, anchor) < KEEP_BACK,
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function anchorsOf(
|
|
88
|
+
listed: readonly StoredRecord[],
|
|
89
|
+
by: Readonly<KeptBy>,
|
|
90
|
+
): readonly Anchor[] {
|
|
91
|
+
const pinned = by.pins.map((pin: Readonly<Pin>): Anchor => ({
|
|
92
|
+
slug: pin.slug,
|
|
93
|
+
revision: pin.revision,
|
|
94
|
+
}))
|
|
95
|
+
const live = listed
|
|
96
|
+
.filter((stored: StoredRecord): boolean => by.live.has(stored.hash))
|
|
97
|
+
.map((stored: StoredRecord): Anchor => ({
|
|
98
|
+
slug: slugOf(stored),
|
|
99
|
+
revision: revisionOf(stored),
|
|
100
|
+
}))
|
|
101
|
+
return [...pinned, ...live]
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Sort the API's listed originals: live, rollback copies, still pointed at by a channel, or drift. */
|
|
105
|
+
function classifyKept(
|
|
106
|
+
listed: readonly StoredRecord[],
|
|
107
|
+
by: Readonly<KeptBy>,
|
|
108
|
+
): Kept {
|
|
109
|
+
const anchors = anchorsOf(listed, by)
|
|
110
|
+
const kept: Record<keyof Kept, StoredRecord[]> = {
|
|
111
|
+
live: [],
|
|
112
|
+
rollback: [],
|
|
113
|
+
pointed: [],
|
|
114
|
+
drift: [],
|
|
115
|
+
}
|
|
116
|
+
for (const stored of listed) {
|
|
117
|
+
if (by.live.has(stored.hash)) {
|
|
118
|
+
kept.live.push(stored)
|
|
119
|
+
} else if (isRollback(stored, listed, anchors)) {
|
|
120
|
+
kept.rollback.push(stored)
|
|
121
|
+
} else if (by.pointed.has(stored.hash)) {
|
|
122
|
+
kept.pointed.push(stored)
|
|
123
|
+
} else {
|
|
124
|
+
kept.drift.push(stored)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return kept
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async function signedBody(url: string, get: typeof fetch): Promise<unknown> {
|
|
131
|
+
const answer = await get(url, {
|
|
132
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
|
|
133
|
+
})
|
|
134
|
+
if (!answer.ok) {
|
|
135
|
+
throw new Error(`${url}: HTTP ${String(answer.status)}`)
|
|
136
|
+
}
|
|
137
|
+
const signed = parse(SignedSchema, await answer.json())
|
|
138
|
+
const body: unknown = JSON.parse(signed.body)
|
|
139
|
+
return body
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** One channel's live hashes: its release file's shards (by hash, or by revision in the API's list) and its placement's
|
|
143
|
+
* cells. */
|
|
144
|
+
async function channelHashes(
|
|
145
|
+
url: string,
|
|
146
|
+
byRevision: ReadonlyMap<string, string>,
|
|
147
|
+
get: typeof fetch,
|
|
148
|
+
): Promise<readonly string[]> {
|
|
149
|
+
const release = parse(ReleaseSchema, await signedBody(`${url}.json`, get))
|
|
150
|
+
const placed = parse(
|
|
151
|
+
PlacementSchema,
|
|
152
|
+
await signedBody(`${url}-placements.json`, get),
|
|
153
|
+
)
|
|
154
|
+
const named = release.shards.map(
|
|
155
|
+
(
|
|
156
|
+
shard: Readonly<{
|
|
157
|
+
slug: string
|
|
158
|
+
revision?: number | undefined
|
|
159
|
+
hash?: string | undefined
|
|
160
|
+
}>,
|
|
161
|
+
): string | undefined =>
|
|
162
|
+
shard.hash ?? byRevision.get(`${shard.slug}@${String(shard.revision)}`),
|
|
163
|
+
)
|
|
164
|
+
const cells = placed.cells.map(
|
|
165
|
+
(cell: Readonly<{ hash?: string | undefined }>): string | undefined =>
|
|
166
|
+
cell.hash,
|
|
167
|
+
)
|
|
168
|
+
return [...named, ...cells].filter(
|
|
169
|
+
(hash: string | undefined): hash is string => hash !== undefined,
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** The hashes players load: each signed release file's shards and placement's cells, and engine's pins. */
|
|
174
|
+
async function liveHashes(
|
|
175
|
+
input: Readonly<{
|
|
176
|
+
packs: string
|
|
177
|
+
listed: readonly StoredRecord[]
|
|
178
|
+
pins: readonly Readonly<Pin>[]
|
|
179
|
+
}>,
|
|
180
|
+
get: typeof fetch = fetch,
|
|
181
|
+
): Promise<ReadonlySet<string>> {
|
|
182
|
+
const byRevision = new Map(
|
|
183
|
+
input.listed.map((stored: StoredRecord): readonly [string, string] => [
|
|
184
|
+
`${slugOf(stored)}@${String(revisionOf(stored))}`,
|
|
185
|
+
stored.hash,
|
|
186
|
+
]),
|
|
187
|
+
)
|
|
188
|
+
const channels = await Promise.all(
|
|
189
|
+
RELEASE_CHANNELS.map(
|
|
190
|
+
async (channel: string): Promise<readonly string[]> =>
|
|
191
|
+
await channelHashes(
|
|
192
|
+
`${input.packs}/releases/${channel}`,
|
|
193
|
+
byRevision,
|
|
194
|
+
get,
|
|
195
|
+
),
|
|
196
|
+
),
|
|
197
|
+
)
|
|
198
|
+
const pinned = input.pins.map((pin: Readonly<Pin>): string => pin.hash)
|
|
199
|
+
return new Set([...pinned, ...channels.flat()])
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** Every head a channel's own catalogue still names. */
|
|
203
|
+
async function pointedHashes(
|
|
204
|
+
api: string,
|
|
205
|
+
get: typeof fetch = fetch,
|
|
206
|
+
): Promise<ReadonlySet<string>> {
|
|
207
|
+
const heads = await Promise.all(
|
|
208
|
+
CHANNELS.map(async (channel: string): Promise<readonly string[]> => {
|
|
209
|
+
const answer = await get(
|
|
210
|
+
new URL(`/api/catalogue.json?channel=${channel}`, api),
|
|
211
|
+
{ signal: AbortSignal.timeout(FETCH_TIMEOUT_MS) },
|
|
212
|
+
)
|
|
213
|
+
if (!answer.ok) {
|
|
214
|
+
throw new Error(`catalogue ${channel}: HTTP ${String(answer.status)}`)
|
|
215
|
+
}
|
|
216
|
+
return parse(CatalogueSchema, await answer.json()).shards.flatMap(
|
|
217
|
+
(shard: Readonly<{ hash?: string | undefined }>): readonly string[] =>
|
|
218
|
+
shard.hash === undefined ? [] : [shard.hash],
|
|
219
|
+
)
|
|
220
|
+
}),
|
|
221
|
+
)
|
|
222
|
+
return new Set(heads.flat())
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** The report lines: the counts, then each drifted original. */
|
|
226
|
+
function keptLines(kept: Readonly<Kept>): readonly string[] {
|
|
227
|
+
return [
|
|
228
|
+
`kept: ${String(kept.live.length)} live (release files, placements, engine pins), ${String(kept.rollback.length)} rollback copies, ${String(kept.pointed.length)} pointed by a channel's catalogue, ${String(kept.drift.length)} drift (J507: only live originals count)`,
|
|
229
|
+
...kept.drift.map(
|
|
230
|
+
(stored: StoredRecord): string =>
|
|
231
|
+
`store drift ${slugOf(stored)} r${String(revisionOf(stored))} ${stored.hash}: no release plays it, no channel points at it and it is no rollback copy; the API's prune should have taken it`,
|
|
232
|
+
),
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export { KEEP_BACK, classifyKept, keptLines, liveHashes, pointedHashes }
|
|
237
|
+
export type { Kept, KeptBy }
|
package/src/cli/corpus-pins.ts
CHANGED
|
@@ -42,14 +42,25 @@ async function pinsText(source: string, get: typeof fetch): Promise<string> {
|
|
|
42
42
|
return await answer.text()
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/** Engine's shard-file pins, from
|
|
45
|
+
/** Engine's shard-file pins, from files or URLs, comma-separated (ZS3: production's and staging's), one per hash. */
|
|
46
46
|
async function readPins(
|
|
47
47
|
source: string,
|
|
48
48
|
get: typeof fetch = fetch,
|
|
49
49
|
): Promise<readonly Pin[]> {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
const lists = await Promise.all(
|
|
51
|
+
source
|
|
52
|
+
.split(',')
|
|
53
|
+
.filter(Boolean)
|
|
54
|
+
.map(async (one: string): Promise<readonly Pin[]> => {
|
|
55
|
+
const text = await pinsText(one, get)
|
|
56
|
+
return parse(PinsSchema, JSON.parse(text)).shards
|
|
57
|
+
}),
|
|
58
|
+
)
|
|
59
|
+
const byHash = new Map<string, Pin>()
|
|
60
|
+
for (const pin of lists.flat()) {
|
|
61
|
+
byHash.set(pin.hash, pin)
|
|
62
|
+
}
|
|
63
|
+
return [...byHash.values()]
|
|
53
64
|
}
|
|
54
65
|
|
|
55
66
|
/** The listed originals, then each pinned one the list leaves out. */
|
package/src/cli/corpus.ts
CHANGED
|
@@ -91,6 +91,9 @@ interface CorpusOptions {
|
|
|
91
91
|
readonly candidate?: Candidate
|
|
92
92
|
/** Only these shards' originals (`slug`, or one revision as `slug@r5`): a candidate run over the shards it targets. */
|
|
93
93
|
readonly only?: readonly string[]
|
|
94
|
+
/** ZS3 (J507): judge only these hashes and the pins, what players load; the API's other originals are rollback
|
|
95
|
+
* copies and never count as users. */
|
|
96
|
+
readonly live?: ReadonlySet<string>
|
|
94
97
|
}
|
|
95
98
|
|
|
96
99
|
const NONE = 0
|
|
@@ -262,11 +265,15 @@ async function runCorpus(
|
|
|
262
265
|
options: Readonly<CorpusOptions>,
|
|
263
266
|
): Promise<CorpusRow[]> {
|
|
264
267
|
const kept = await listKept(options)
|
|
265
|
-
const shardfiles = kept.filter((stored: StoredRecord): boolean =>
|
|
266
|
-
onlyNamed(options.only, stored.revisions),
|
|
267
|
-
)
|
|
268
268
|
const pins = options.pins ?? []
|
|
269
269
|
const pinned = new Set(pins.map((pin: Readonly<Pin>): string => pin.hash))
|
|
270
|
+
const shardfiles = kept.filter(
|
|
271
|
+
(stored: StoredRecord): boolean =>
|
|
272
|
+
onlyNamed(options.only, stored.revisions) &&
|
|
273
|
+
(options.live === undefined ||
|
|
274
|
+
options.live.has(stored.hash) ||
|
|
275
|
+
pinned.has(stored.hash)),
|
|
276
|
+
)
|
|
270
277
|
const rows: CorpusRow[] = []
|
|
271
278
|
for (const stored of withPins(shardfiles, pins)) {
|
|
272
279
|
// oxlint-disable-next-line eslint/no-await-in-loop -- one original at a time keeps memory bounded
|
|
@@ -276,7 +283,13 @@ async function runCorpus(
|
|
|
276
283
|
return rows
|
|
277
284
|
}
|
|
278
285
|
|
|
279
|
-
export {
|
|
286
|
+
export {
|
|
287
|
+
type CorpusOptions,
|
|
288
|
+
type CorpusRow,
|
|
289
|
+
type StoredRecord,
|
|
290
|
+
listKept,
|
|
291
|
+
runCorpus,
|
|
292
|
+
}
|
|
280
293
|
|
|
281
294
|
export { corpusReport } from './corpus-report.ts'
|
|
282
295
|
export { isPlainTar } from './corpus-tar.ts'
|
package/src/cli/main.ts
CHANGED
|
@@ -33,10 +33,14 @@ Commands:
|
|
|
33
33
|
measure follows them, and format's validator must
|
|
34
34
|
pass. Writes <slug>.tar by default
|
|
35
35
|
corpus [--api <url>] [--cache <dir>] [--usage <file>] [--pins <file|url>]
|
|
36
|
+
[--strict-store]
|
|
36
37
|
[--candidate <module>] [--only <slug,...>]
|
|
37
|
-
Validate every
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
Validate every live shard file (engine's
|
|
39
|
+
production and staging pins by default, ZS3) as
|
|
40
|
+
stored; list every failure and any API original
|
|
41
|
+
that is neither live, a rollback copy nor a
|
|
42
|
+
channel's pointer (store drift). Exits 3 when any
|
|
43
|
+
fails, and on drift with --strict-store. --usage writes who uses each
|
|
40
44
|
deprecated path and chain step (FE13 reads it)
|
|
41
45
|
--candidate <module> judges each original again
|
|
42
46
|
under a candidate chain and validator (FE3b):
|
|
@@ -68,6 +72,7 @@ interface CliArgs {
|
|
|
68
72
|
readonly pins: string | undefined
|
|
69
73
|
readonly candidate: string | undefined
|
|
70
74
|
readonly only: string | undefined
|
|
75
|
+
readonly strictStore: boolean
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
function parseCliArgs(argv: readonly string[]): CliArgs {
|
|
@@ -85,6 +90,7 @@ function parseCliArgs(argv: readonly string[]): CliArgs {
|
|
|
85
90
|
pins: { type: 'string' },
|
|
86
91
|
candidate: { type: 'string' },
|
|
87
92
|
only: { type: 'string' },
|
|
93
|
+
'strict-store': { type: 'boolean', default: false },
|
|
88
94
|
},
|
|
89
95
|
})
|
|
90
96
|
const [command, ...operands] = positionals
|
|
@@ -101,6 +107,7 @@ function parseCliArgs(argv: readonly string[]): CliArgs {
|
|
|
101
107
|
pins: values.pins,
|
|
102
108
|
candidate: values.candidate,
|
|
103
109
|
only: values.only,
|
|
110
|
+
strictStore: values['strict-store'],
|
|
104
111
|
}
|
|
105
112
|
}
|
|
106
113
|
|
|
@@ -65,7 +65,10 @@ function preflightDeclaredCosts(source: Shardfile, memory?: MemoryAdmission): {
|
|
|
65
65
|
if (cost.resident > tile.decoded + tile.gpu || cost.compressed > tile.compressed || cost.triangles > tile.triangles || cost.draws > tile.draws) throw new Error('declared tile or far cost exceeds budget');
|
|
66
66
|
}
|
|
67
67
|
const resident = Object.values(commons).reduce((total, cost) => total + cost.decoded + cost.gpu, 0);
|
|
68
|
-
|
|
68
|
+
// QA 11-25 row 45: a KTX2 file's decoded bytes never stay resident beside its upload, so the declared ceiling charges it
|
|
69
|
+
// its GPU bytes alone, as the measured stage does (RGBA fallback kept: no device transcode is assumed). Nine Dragon's
|
|
70
|
+
// sign atlases were charged twice and refused it at 1,500.79 MB, where its phone estimate is 1,410.59 MB.
|
|
71
|
+
const worst = worstContentCost(textureLibrarySource(source, new Map()), resident);
|
|
69
72
|
if (!acceptsShardfileCost(memory, source, 'declared', worst)) throw new Error(`declared worst-location total exceeds envelope: play ${worst.playing}, load ${worst.loading}${overHardLine(Math.max(worst.playing, worst.loading))}`);
|
|
70
73
|
return { commons, worst };
|
|
71
74
|
}
|
|
@@ -128,16 +128,6 @@ const RULES: readonly DeprecationRule[] = [
|
|
|
128
128
|
SCHEMA_SOURCE_DEPRECATION,
|
|
129
129
|
...COOK_DEPRECATIONS,
|
|
130
130
|
...SPECIES_FEATURE_DEPRECATIONS,
|
|
131
|
-
{
|
|
132
|
-
id: 'requires.sdk',
|
|
133
|
-
path: 'shard.json requires.sdk (SHARD-COMPAT CP8): a copy of the format version',
|
|
134
|
-
since: ENVELOPE,
|
|
135
|
-
replacement:
|
|
136
|
-
'nothing: formatVersion names the format; format 0.1.0.5 refuses it and the chain drops it (FORMAT-PRUNE FP33)',
|
|
137
|
-
migration: 'fp33-drop-requires-sdk',
|
|
138
|
-
uses: (shard: Readonly<DeprecationInput>): boolean =>
|
|
139
|
-
field(field(shard.index, 'requires'), 'sdk') !== undefined,
|
|
140
|
-
},
|
|
141
131
|
{
|
|
142
132
|
id: 'requires.capabilities',
|
|
143
133
|
path: 'shard.json requires.capabilities (FORMAT-PRUNE FP4): always empty, never read',
|
|
@@ -148,18 +138,6 @@ const RULES: readonly DeprecationRule[] = [
|
|
|
148
138
|
uses: (shard: Readonly<DeprecationInput>): boolean =>
|
|
149
139
|
field(field(shard.index, 'requires'), 'capabilities') !== undefined,
|
|
150
140
|
},
|
|
151
|
-
{
|
|
152
|
-
id: 'manifest.gridShardfile',
|
|
153
|
-
path: 'sections/ui/level manifest.gridShardfile (and the discovery mount)',
|
|
154
|
-
since: '0.1.0.1',
|
|
155
|
-
replacement: 'manifest.shardfile',
|
|
156
|
-
migration: 'fp8-shardfile-pointer',
|
|
157
|
-
uses: (shard: Readonly<DeprecationInput>): boolean =>
|
|
158
|
-
field(
|
|
159
|
-
field(shard.sections.get('ui/level'), 'manifest'),
|
|
160
|
-
'gridShardfile',
|
|
161
|
-
) !== undefined,
|
|
162
|
-
},
|
|
163
141
|
...MANIFEST_MOVED_DEPRECATIONS,
|
|
164
142
|
...LEVEL_DEPRECATIONS,
|
|
165
143
|
MAP_IMAGE_DEPRECATION,
|
|
@@ -15,7 +15,7 @@ function widened(
|
|
|
15
15
|
return { edge: row.edge, at: row.at, width: ENTRY_WIDTH }
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/** A valid empty world
|
|
18
|
+
/** A valid empty world (FORMAT-PRUNE FP33: `requires.sdk` is gone); add baked content before shipping a playable shard. The identity takes `saveRevision`, or
|
|
19
19
|
* the spelling up to format 0.1.0.3, `revision` (FP26); the file comes back with `saveRevision`. */
|
|
20
20
|
function emptyShardfile(identity: Readonly<ShardIdentityInput>): Shardfile {
|
|
21
21
|
const { edgeSamples, edgeGrey, edgeHeight, requires, entryways, ...rest } =
|
|
@@ -11,35 +11,54 @@ const grassFile:v.GenericSchema<unknown,{file:string}> = v.strictObject({file:v.
|
|
|
11
11
|
export const GrassPayloadSchema:v.GenericSchema<unknown,GrassPayload> = v.union([text,grassFile]);
|
|
12
12
|
const tuple = v.tuple([number,number,number]);
|
|
13
13
|
const grid = v.object({ T: positive, G: v.pipe(count,v.maxValue(32)) });
|
|
14
|
+
/** QA 11-24 row 70 (J510): the near-field card clumps are optional. A shard without them omits a tier's `cards` and
|
|
15
|
+
* `scenes.cards`, and the view's third look and `cardsHeight`, all together (`GrassPresentationSchema` checks it). */
|
|
16
|
+
const cardRows = v.object({ T: positive, s: positive }), optionalScene = v.exactOptional(GrassPayloadSchema);
|
|
14
17
|
const tier = v.object({ rings: v.pipe(v.array(grid),v.minLength(1),v.maxLength(8)), flowers: grid,
|
|
15
|
-
cards: v.
|
|
18
|
+
cards: v.exactOptional(cardRows), near: v.tuple([number,number]), per: count,
|
|
16
19
|
channels: v.exactOptional(grassFile),
|
|
17
|
-
scenes: v.object({ blades: GrassPayloadSchema, flowers: GrassPayloadSchema, cards:
|
|
20
|
+
scenes: v.object({ blades: GrassPayloadSchema, flowers: GrassPayloadSchema, cards: optionalScene }) });
|
|
18
21
|
interface GrassGridRows {T:number;G:number}
|
|
19
22
|
type GrassTierSchema = v.ObjectSchema<{
|
|
20
23
|
rings:v.GenericSchema<GrassGridRows[]>;flowers:v.GenericSchema<GrassGridRows>;
|
|
21
|
-
cards:v.ObjectSchema<{T:v.GenericSchema<number>;s:v.GenericSchema<number>},undefined>;
|
|
24
|
+
cards:v.ExactOptionalSchema<v.ObjectSchema<{T:v.GenericSchema<number>;s:v.GenericSchema<number>},undefined>,undefined>;
|
|
22
25
|
near:v.GenericSchema<[number,number]>;per:v.GenericSchema<number>;
|
|
23
26
|
channels:v.ExactOptionalSchema<typeof grassFile,undefined>;
|
|
24
|
-
scenes:v.ObjectSchema<{blades:typeof GrassPayloadSchema;flowers:typeof GrassPayloadSchema;cards:typeof GrassPayloadSchema},undefined>;
|
|
27
|
+
scenes:v.ObjectSchema<{blades:typeof GrassPayloadSchema;flowers:typeof GrassPayloadSchema;cards:v.ExactOptionalSchema<typeof GrassPayloadSchema,undefined>},undefined>;
|
|
25
28
|
},undefined>;
|
|
26
29
|
interface GrassViewRows {
|
|
27
|
-
looks:[string,string,string];half:number;heightSize:number;heightOrigin:number;lattice:number;
|
|
28
|
-
gain:number;playerRadius:number;cardsHeight
|
|
30
|
+
looks:[string,string]|[string,string,string];half:number;heightSize:number;heightOrigin:number;lattice:number;
|
|
31
|
+
gain:number;playerRadius:number;cardsHeight?:number;ringHeight:number;
|
|
29
32
|
trail:{speedLimit:number;strength:number};
|
|
30
33
|
gainFalloff:[number,number,number];saturationFalloff:[number,number,number];tintNight:[number,number,number];tintStorm:[number,number,number];
|
|
31
34
|
}
|
|
32
|
-
type
|
|
35
|
+
type GrassPresentationObject = v.ObjectSchema<{
|
|
33
36
|
height:typeof GrassPayloadSchema;mask:typeof GrassPayloadSchema;field:typeof GrassPayloadSchema;ground:typeof GrassPayloadSchema;
|
|
34
37
|
phone:GrassTierSchema;desktop:GrassTierSchema;view:v.GenericSchema<GrassViewRows>;
|
|
35
38
|
},undefined>;
|
|
39
|
+
type GrassPresentationType = v.SchemaWithPipe<readonly [GrassPresentationObject,
|
|
40
|
+
v.CheckAction<v.InferOutput<GrassPresentationObject>,string>]>;
|
|
41
|
+
/** The card rows `cardsAgree` reads. */
|
|
42
|
+
interface CardTierRows { readonly cards?: unknown; readonly scenes: { readonly cards?: unknown } }
|
|
43
|
+
interface CardRows { readonly view: { readonly looks: readonly string[]; readonly cardsHeight?: number }; readonly phone: CardTierRows; readonly desktop: CardTierRows }
|
|
44
|
+
/** A grass that draws cards names three looks: blades, flowers and the cards. */
|
|
45
|
+
const CARD_LOOKS = 3;
|
|
46
|
+
const tierAgrees = (profile: CardTierRows, has: boolean): boolean => (profile.cards !== undefined) === has && (profile.scenes.cards !== undefined) === has;
|
|
47
|
+
/** Cards are all there or all gone: both tiers' rows and scenes, the third look and `cardsHeight`. */
|
|
48
|
+
const cardsAgree = (rows: CardRows): boolean => {
|
|
49
|
+
const has = rows.view.looks.length === CARD_LOOKS;
|
|
50
|
+
return (rows.view.cardsHeight !== undefined) === has && tierAgrees(rows.phone, has) && tierAgrees(rows.desktop, has);
|
|
51
|
+
};
|
|
36
52
|
/** Bounded camera-ring buffers, lattice and presentation tuning. */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
const looks = v.union([v.strictTuple([text,text]),v.strictTuple([text,text,text])]);
|
|
54
|
+
const view = v.object({ looks, half: positive, heightSize: count, heightOrigin: number, lattice: positive,
|
|
55
|
+
gain: positive, playerRadius: positive, cardsHeight: v.exactOptional(positive), ringHeight: positive,
|
|
56
|
+
/** the player's trail on the shared trample field: pushes faster than `speedLimit` (m/s, a teleport) are dropped */
|
|
57
|
+
trail: v.object({ speedLimit: positive, strength: positive }),
|
|
58
|
+
gainFalloff: tuple, saturationFalloff: tuple, tintNight: tuple, tintStorm: tuple });
|
|
59
|
+
const presentation: GrassPresentationObject = v.object({ height: GrassPayloadSchema, mask: GrassPayloadSchema, field: GrassPayloadSchema, ground: GrassPayloadSchema, phone: tier, desktop: tier, view });
|
|
60
|
+
export const GrassPresentationSchema:GrassPresentationType = v.pipe(presentation,
|
|
61
|
+
v.check<v.InferOutput<GrassPresentationObject>, string>(cardsAgree, 'Grass cards are all present (both tiers, the third look, cardsHeight) or all absent'));
|
|
43
62
|
export type GrassPresentationRows = v.InferOutput<typeof GrassPresentationSchema>;
|
|
44
63
|
/** Selected tier plus shared blocks; an omitted tier retains the complete inventory. */
|
|
45
64
|
export function grassPresentationFiles(rows: GrassPresentationRows, selected?: 'phone' | 'desktop'): readonly string[] {
|