@etothepii/satisfactory-file-parser 4.0.2 → 4.1.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.
Files changed (498) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/build/index.d.ts +29 -25
  3. package/build/index.d.ts.map +1 -1
  4. package/build/index.js +29 -25
  5. package/build/index.js.map +1 -1
  6. package/build/parser/satisfactory/types/property/generic/containers/StructProperty.d.ts +2 -8
  7. package/build/parser/satisfactory/types/property/generic/containers/StructProperty.d.ts.map +1 -1
  8. package/build/parser/satisfactory/types/property/generic/containers/StructProperty.js +3 -20
  9. package/build/parser/satisfactory/types/property/generic/containers/StructProperty.js.map +1 -1
  10. package/build/parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties.d.ts +4 -22
  11. package/build/parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties.d.ts.map +1 -1
  12. package/build/parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties.js +6 -50
  13. package/build/parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties.js.map +1 -1
  14. package/build/parser/satisfactory/types/structs/FGDynamicStruct.js +2 -2
  15. package/build/parser/satisfactory/types/structs/FGDynamicStruct.js.map +1 -1
  16. package/build/parser/satisfactory/types/structs/binary/FConveyorBeltItem.d.ts +12 -0
  17. package/build/parser/satisfactory/types/structs/binary/FConveyorBeltItem.d.ts.map +1 -0
  18. package/build/parser/satisfactory/types/structs/binary/FConveyorBeltItem.js +21 -0
  19. package/build/parser/satisfactory/types/structs/binary/FConveyorBeltItem.js.map +1 -0
  20. package/build/parser/satisfactory/types/structs/binary/FConveyorChainSplineSegment.d.ts +38 -0
  21. package/build/parser/satisfactory/types/structs/binary/FConveyorChainSplineSegment.d.ts.map +1 -0
  22. package/build/parser/satisfactory/types/structs/binary/FConveyorChainSplineSegment.js +57 -0
  23. package/build/parser/satisfactory/types/structs/binary/FConveyorChainSplineSegment.js.map +1 -0
  24. package/build/parser/satisfactory/types/structs/binary/FInventoryItem.d.ts +14 -0
  25. package/build/parser/satisfactory/types/structs/binary/FInventoryItem.d.ts.map +1 -0
  26. package/build/parser/satisfactory/types/structs/binary/FInventoryItem.js +34 -0
  27. package/build/parser/satisfactory/types/structs/binary/FInventoryItem.js.map +1 -0
  28. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.d.ts +1 -1
  29. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.d.ts.map +1 -1
  30. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.js +1 -2
  31. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.js.map +1 -1
  32. package/build/test/parser.spec.d.ts +2 -0
  33. package/build/test/parser.spec.d.ts.map +1 -0
  34. package/build/test/parser.spec.js +299 -0
  35. package/build/test/parser.spec.js.map +1 -0
  36. package/docs/assets/hierarchy.js +1 -1
  37. package/docs/assets/navigation.js +1 -1
  38. package/docs/assets/search.js +1 -1
  39. package/docs/classes/BlueprintConfigReader.html +4 -4
  40. package/docs/classes/BlueprintConfigWriter.html +4 -4
  41. package/docs/classes/BlueprintReader.html +4 -4
  42. package/docs/classes/BlueprintWriter.html +4 -4
  43. package/docs/classes/ByteReader.html +4 -4
  44. package/docs/classes/ByteWriter.html +4 -4
  45. package/docs/classes/CompressionLibraryError.html +2 -2
  46. package/docs/classes/ContextReader.html +4 -4
  47. package/docs/classes/ContextWriter.html +4 -4
  48. package/docs/classes/CorruptBlueprintError.html +2 -2
  49. package/docs/classes/CorruptSaveError.html +2 -2
  50. package/docs/classes/Parser.html +6 -6
  51. package/docs/classes/ParserError.html +2 -2
  52. package/docs/classes/ReadableStreamParser.html +2 -2
  53. package/docs/classes/SatisfactorySave.html +2 -2
  54. package/docs/classes/SaveComponent.html +2 -2
  55. package/docs/classes/SaveEntity.html +2 -2
  56. package/docs/classes/SaveObject.html +2 -2
  57. package/docs/classes/SaveReader.html +4 -4
  58. package/docs/classes/SaveWriter.html +4 -4
  59. package/docs/classes/TimeoutError.html +2 -2
  60. package/docs/classes/UnimplementedError.html +2 -2
  61. package/docs/classes/UnsupportedVersionError.html +2 -2
  62. package/docs/enums/Alignment.html +2 -2
  63. package/docs/enums/BlueprintConfigVersion.html +2 -2
  64. package/docs/enums/BlueprintHeaderVersion.html +2 -2
  65. package/docs/enums/CompressionAlgorithmCode.html +2 -2
  66. package/docs/enums/ETextHistoryType.html +2 -2
  67. package/docs/enums/EUnrealEngineObjectUE5Version.html +2 -2
  68. package/docs/enums/FactoryGameCustomVersion.html +2 -2
  69. package/docs/enums/RuntimeBuildableInstanceDataVersion.html +2 -2
  70. package/docs/enums/SaveCustomVersion.html +10 -10
  71. package/docs/enums/SaveHeaderType.html +2 -2
  72. package/docs/functions/AbstractBaseProperty.CreateFromTag.html +1 -1
  73. package/docs/functions/ArrayProperty.Parse.html +1 -1
  74. package/docs/functions/ArrayProperty.Serialize.html +1 -1
  75. package/docs/functions/BlueprintConfig.Parse.html +1 -1
  76. package/docs/functions/BlueprintConfig.Serialize.html +1 -1
  77. package/docs/functions/BlueprintHeader.Parse.html +1 -1
  78. package/docs/functions/BlueprintHeader.Serialize.html +1 -1
  79. package/docs/functions/BoolProperty.Parse.html +1 -1
  80. package/docs/functions/BoolProperty.ReadValue.html +1 -1
  81. package/docs/functions/BoolProperty.Serialize.html +1 -1
  82. package/docs/functions/BoolProperty.SerializeValue.html +1 -1
  83. package/docs/functions/BuildableSubsystemSpecialProperties.Parse.html +1 -1
  84. package/docs/functions/BuildableSubsystemSpecialProperties.Serialize.html +1 -1
  85. package/docs/functions/BuildableTypeInstance.Parse.html +1 -1
  86. package/docs/functions/BuildableTypeInstance.Serialize.html +1 -1
  87. package/docs/functions/ByteProperty.Parse.html +1 -1
  88. package/docs/functions/ByteProperty.ReadValue.html +1 -1
  89. package/docs/functions/ByteProperty.Serialize.html +1 -1
  90. package/docs/functions/ByteProperty.SerializeValue.html +1 -1
  91. package/docs/functions/CircuitSpecialProperties.Parse.html +1 -1
  92. package/docs/functions/CircuitSpecialProperties.Serialize.html +1 -1
  93. package/docs/functions/ConveyorChainActorSpecialProperties.Parse.html +1 -1
  94. package/docs/functions/ConveyorChainActorSpecialProperties.Serialize.html +1 -1
  95. package/docs/functions/ConveyorSpecialProperties.Parse.html +1 -1
  96. package/docs/functions/ConveyorSpecialProperties.Serialize.html +1 -1
  97. package/docs/functions/DataBlob.Read.html +1 -1
  98. package/docs/functions/DataBlob.ReadNObjectContents.html +1 -1
  99. package/docs/functions/DataBlob.SkipOver.html +1 -1
  100. package/docs/functions/DataBlob.Write.html +1 -1
  101. package/docs/functions/DoubleProperty.Parse.html +1 -1
  102. package/docs/functions/DoubleProperty.ReadValue.html +1 -1
  103. package/docs/functions/DoubleProperty.Serialize.html +1 -1
  104. package/docs/functions/DoubleProperty.SerializeValue.html +1 -1
  105. package/docs/functions/DynamicStructPropertyValue.read.html +1 -1
  106. package/docs/functions/DynamicStructPropertyValue.write.html +1 -1
  107. package/docs/functions/EmptySpecialProperties.Parse.html +1 -1
  108. package/docs/functions/EmptySpecialProperties.Serialize.html +1 -1
  109. package/docs/functions/EnumProperty.Parse.html +1 -1
  110. package/docs/functions/EnumProperty.ReadValue.html +1 -1
  111. package/docs/functions/EnumProperty.Serialize.html +1 -1
  112. package/docs/functions/EnumProperty.SerializeValue.html +1 -1
  113. package/docs/functions/FClientIdentityInfo.read.html +1 -1
  114. package/docs/functions/FClientIdentityInfo.write.html +1 -1
  115. package/docs/functions/FColor.read.html +1 -1
  116. package/docs/functions/FColor.write.html +1 -1
  117. package/docs/functions/FConveyorBeltItem.read.html +1 -0
  118. package/docs/functions/FConveyorBeltItem.write.html +1 -0
  119. package/docs/functions/FConveyorChainSplineSegment.read.html +1 -0
  120. package/docs/functions/FConveyorChainSplineSegment.write.html +1 -0
  121. package/docs/functions/FCustomVersion.read.html +1 -1
  122. package/docs/functions/FCustomVersion.write.html +1 -1
  123. package/docs/functions/FCustomVersionContainer.read.html +1 -1
  124. package/docs/functions/FCustomVersionContainer.write.html +1 -1
  125. package/docs/functions/FEngineVersion.read.html +1 -1
  126. package/docs/functions/FEngineVersion.write.html +1 -1
  127. package/docs/functions/FGDynamicStruct.Parse.html +1 -1
  128. package/docs/functions/FGDynamicStruct.Serialize.html +1 -1
  129. package/docs/functions/FICFrameRange.read.html +1 -1
  130. package/docs/functions/FICFrameRange.write.html +1 -1
  131. package/docs/functions/FINGPUT1BufferPixel.read.html +1 -1
  132. package/docs/functions/FINGPUT1BufferPixel.write.html +1 -1
  133. package/docs/functions/FINItemStateFileSystem.IsFINItemStateFileSystem.html +1 -1
  134. package/docs/functions/FINItemStateFileSystem.read.html +1 -1
  135. package/docs/functions/FINItemStateFileSystem.write.html +1 -1
  136. package/docs/functions/FINLuaRuntimePersistenceState.read.html +1 -1
  137. package/docs/functions/FINLuaRuntimePersistenceState.write.html +1 -1
  138. package/docs/functions/FINNetworkTrace.read.html +1 -1
  139. package/docs/functions/FINNetworkTrace.write.html +1 -1
  140. package/docs/functions/FInventoryItem.read.html +1 -0
  141. package/docs/functions/FInventoryItem.write.html +1 -0
  142. package/docs/functions/FLBBalancerIndexing.read.html +1 -1
  143. package/docs/functions/FLBBalancerIndexing.write.html +1 -1
  144. package/docs/functions/FLinearColor.read.html +1 -1
  145. package/docs/functions/FLinearColor.write.html +1 -1
  146. package/docs/functions/FLocalUserNetIdBundle.read.html +1 -1
  147. package/docs/functions/FLocalUserNetIdBundle.write.html +1 -1
  148. package/docs/functions/FPackageFileVersion.read.html +1 -1
  149. package/docs/functions/FPackageFileVersion.write.html +1 -1
  150. package/docs/functions/FPlayerInfoHandle.read.html +1 -1
  151. package/docs/functions/FPlayerInfoHandle.write.html +1 -1
  152. package/docs/functions/FPropertyTag.IsCompletePropertyTagType.html +1 -1
  153. package/docs/functions/FPropertyTag.read.html +1 -1
  154. package/docs/functions/FPropertyTag.write.html +1 -1
  155. package/docs/functions/FPropertyTag.writeFromProperty.html +1 -1
  156. package/docs/functions/FPropertyTagNode.read.html +1 -1
  157. package/docs/functions/FPropertyTagNode.write.html +1 -1
  158. package/docs/functions/FSaveObjectVersionData.read.html +1 -1
  159. package/docs/functions/FSaveObjectVersionData.write.html +1 -1
  160. package/docs/functions/FUniqueNetIdRepl.read.html +1 -1
  161. package/docs/functions/FUniqueNetIdRepl.write.html +1 -1
  162. package/docs/functions/FloatProperty.Parse.html +1 -1
  163. package/docs/functions/FloatProperty.ReadValue.html +1 -1
  164. package/docs/functions/FloatProperty.Serialize.html +1 -1
  165. package/docs/functions/FloatProperty.SerializeValue.html +1 -1
  166. package/docs/functions/GUID.read.html +1 -1
  167. package/docs/functions/GUID.write.html +1 -1
  168. package/docs/functions/HierarchyVersion.CreateOnHeader.html +1 -1
  169. package/docs/functions/HierarchyVersion.SetOnLevel.html +1 -1
  170. package/docs/functions/HierarchyVersion.SetOnObject.html +1 -1
  171. package/docs/functions/Int64Property.Parse.html +1 -1
  172. package/docs/functions/Int64Property.ReadValue.html +1 -1
  173. package/docs/functions/Int64Property.Serialize.html +1 -1
  174. package/docs/functions/Int64Property.SerializeValue.html +1 -1
  175. package/docs/functions/Int8Property.Parse.html +1 -1
  176. package/docs/functions/Int8Property.ReadValue.html +1 -1
  177. package/docs/functions/Int8Property.Serialize.html +1 -1
  178. package/docs/functions/Int8Property.SerializeValue.html +1 -1
  179. package/docs/functions/IntProperty.Parse.html +1 -1
  180. package/docs/functions/IntProperty.ReadValue.html +1 -1
  181. package/docs/functions/IntProperty.Serialize.html +1 -1
  182. package/docs/functions/IntProperty.SerializeValue.html +1 -1
  183. package/docs/functions/InterfaceProperty.Parse.html +1 -1
  184. package/docs/functions/InterfaceProperty.ReadValue.html +1 -1
  185. package/docs/functions/InterfaceProperty.Serialize.html +1 -1
  186. package/docs/functions/InterfaceProperty.SerializeValue.html +1 -1
  187. package/docs/functions/LBBalancerIndexing.read.html +1 -1
  188. package/docs/functions/LBBalancerIndexing.write.html +1 -1
  189. package/docs/functions/Level.Read.html +1 -1
  190. package/docs/functions/Level.Serialize.html +1 -1
  191. package/docs/functions/LevelToDestroyedActorsMap.read.html +1 -1
  192. package/docs/functions/LevelToDestroyedActorsMap.write.html +1 -1
  193. package/docs/functions/MD5Hash.read.html +1 -1
  194. package/docs/functions/MD5Hash.write.html +1 -1
  195. package/docs/functions/MapProperty.Parse.html +1 -1
  196. package/docs/functions/MapProperty.Serialize.html +1 -1
  197. package/docs/functions/NameProperty.Parse.html +1 -1
  198. package/docs/functions/NameProperty.ReadValue.html +1 -1
  199. package/docs/functions/NameProperty.Serialize.html +1 -1
  200. package/docs/functions/NameProperty.SerializeValue.html +1 -1
  201. package/docs/functions/ObjectProperty.Parse.html +1 -1
  202. package/docs/functions/ObjectProperty.ReadValue.html +1 -1
  203. package/docs/functions/ObjectProperty.Serialize.html +1 -1
  204. package/docs/functions/ObjectProperty.SerializeValue.html +1 -1
  205. package/docs/functions/ObjectReference.IsEqual.html +1 -1
  206. package/docs/functions/ObjectReference.read.html +1 -1
  207. package/docs/functions/ObjectReference.write.html +1 -1
  208. package/docs/functions/ObjectReferencesList.ReadList.html +1 -1
  209. package/docs/functions/ObjectReferencesList.SerializeList.html +1 -1
  210. package/docs/functions/ObjectsListSpecialProperties.Parse.html +1 -1
  211. package/docs/functions/ObjectsListSpecialProperties.Serialize.html +1 -1
  212. package/docs/functions/OptionalGUID.read.html +1 -1
  213. package/docs/functions/OptionalGUID.write.html +1 -1
  214. package/docs/functions/PlayerSpecialProperties.Parse.html +1 -1
  215. package/docs/functions/PlayerSpecialProperties.Serialize.html +1 -1
  216. package/docs/functions/PowerLineSpecialProperties.Parse.html +1 -1
  217. package/docs/functions/PowerLineSpecialProperties.Serialize.html +1 -1
  218. package/docs/functions/PropertiesList.ParseList.html +1 -1
  219. package/docs/functions/PropertiesList.ParseSingleProperty.html +1 -1
  220. package/docs/functions/PropertiesList.SerializeList.html +1 -1
  221. package/docs/functions/PropertiesList.SerializeSingleProperty.html +1 -1
  222. package/docs/functions/SatisfactorySaveHeader.Parse.html +1 -1
  223. package/docs/functions/SatisfactorySaveHeader.Serialize.html +1 -1
  224. package/docs/functions/SaveBodyChunks.CompressDataIntoChunks.html +1 -1
  225. package/docs/functions/SaveBodyChunks.DecompressChunks.html +1 -1
  226. package/docs/functions/SaveBodyValidation.Parse.html +1 -1
  227. package/docs/functions/SaveBodyValidation.Serialize.html +1 -1
  228. package/docs/functions/SetProperty.Parse.html +1 -1
  229. package/docs/functions/SetProperty.Serialize.html +1 -1
  230. package/docs/functions/SingleProperty.Parse.html +1 -1
  231. package/docs/functions/SingleProperty.ReadValue.html +1 -1
  232. package/docs/functions/SingleProperty.Serialize.html +1 -1
  233. package/docs/functions/SingleProperty.SerializeValue.html +1 -1
  234. package/docs/functions/SoftObjectProperty.Parse.html +1 -1
  235. package/docs/functions/SoftObjectProperty.ReadValue.html +1 -1
  236. package/docs/functions/SoftObjectProperty.Serialize.html +1 -1
  237. package/docs/functions/SoftObjectProperty.SerializeValue.html +1 -1
  238. package/docs/functions/SoftObjectReference.read.html +1 -1
  239. package/docs/functions/SoftObjectReference.write.html +1 -1
  240. package/docs/functions/SpecialDroneActionProperties.Parse.html +1 -1
  241. package/docs/functions/SpecialDroneActionProperties.Serialize.html +1 -1
  242. package/docs/functions/SpecialProperties.ParseClassSpecificSpecialProperties.html +1 -1
  243. package/docs/functions/SpecialProperties.SerializeClassSpecificSpecialProperties.html +1 -1
  244. package/docs/functions/StrProperty.Parse.html +1 -1
  245. package/docs/functions/StrProperty.ReadValue.html +1 -1
  246. package/docs/functions/StrProperty.Serialize.html +1 -1
  247. package/docs/functions/StrProperty.SerializeValue.html +1 -1
  248. package/docs/functions/StructProperty.Parse.html +1 -1
  249. package/docs/functions/StructProperty.ParseValue.html +1 -1
  250. package/docs/functions/StructProperty.Serialize.html +1 -1
  251. package/docs/functions/StructProperty.SerializeValue.html +1 -1
  252. package/docs/functions/TOCBlob.Read.html +1 -1
  253. package/docs/functions/TOCBlob.ReadNObjectHeaders.html +1 -1
  254. package/docs/functions/TOCBlob.SerializeAllObjectHeaders.html +1 -1
  255. package/docs/functions/TOCBlob.SkipOver.html +1 -1
  256. package/docs/functions/TOCBlob.Write.html +1 -1
  257. package/docs/functions/TextProperty.Parse.html +1 -1
  258. package/docs/functions/TextProperty.ReadValue.html +1 -1
  259. package/docs/functions/TextProperty.Serialize.html +1 -1
  260. package/docs/functions/TextProperty.SerializeValue.html +1 -1
  261. package/docs/functions/Transform.Parse.html +1 -1
  262. package/docs/functions/Transform.ParseF.html +1 -1
  263. package/docs/functions/Transform.Serialize.html +1 -1
  264. package/docs/functions/Transform.SerializeF.html +1 -1
  265. package/docs/functions/Uint32Property.Parse.html +1 -1
  266. package/docs/functions/Uint32Property.ReadValue.html +1 -1
  267. package/docs/functions/Uint32Property.Serialize.html +1 -1
  268. package/docs/functions/Uint32Property.SerializeValue.html +1 -1
  269. package/docs/functions/Uint64Property.Parse.html +1 -1
  270. package/docs/functions/Uint64Property.ReadValue.html +1 -1
  271. package/docs/functions/Uint64Property.Serialize.html +1 -1
  272. package/docs/functions/Uint64Property.SerializeValue.html +1 -1
  273. package/docs/functions/Uint8Property.Parse.html +1 -1
  274. package/docs/functions/Uint8Property.ReadValue.html +1 -1
  275. package/docs/functions/Uint8Property.Serialize.html +1 -1
  276. package/docs/functions/Uint8Property.SerializeValue.html +1 -1
  277. package/docs/functions/VehiclePhysicsData.Parse.html +1 -1
  278. package/docs/functions/VehiclePhysicsData.Serialize.html +1 -1
  279. package/docs/functions/VehicleSpecialProperties.Parse.html +1 -1
  280. package/docs/functions/VehicleSpecialProperties.Serialize.html +1 -1
  281. package/docs/functions/col4.ParseBGRA.html +1 -1
  282. package/docs/functions/col4.ParseRGBA.html +1 -1
  283. package/docs/functions/col4.SerializeBGRA.html +1 -1
  284. package/docs/functions/col4.SerializeRGBA.html +1 -1
  285. package/docs/functions/isArrayProperty.html +1 -1
  286. package/docs/functions/isBoolProperty.html +1 -1
  287. package/docs/functions/isBuildableSubsystemSpecialProperties.html +1 -1
  288. package/docs/functions/isByteProperty.html +1 -1
  289. package/docs/functions/isCircuitSpecialProperties.html +1 -1
  290. package/docs/functions/isConveyorChainActorSpecialProperties.html +1 -1
  291. package/docs/functions/isConveyorSpecialProperties.html +1 -1
  292. package/docs/functions/isDoubleProperty.html +1 -1
  293. package/docs/functions/isEmptySpecialProperties.html +1 -1
  294. package/docs/functions/isEnumProperty.html +1 -1
  295. package/docs/functions/isFloatProperty.html +1 -1
  296. package/docs/functions/isInt64Property.html +1 -1
  297. package/docs/functions/isInt8Property.html +1 -1
  298. package/docs/functions/isIntProperty.html +1 -1
  299. package/docs/functions/isInterfaceProperty.html +1 -1
  300. package/docs/functions/isMapProperty.html +1 -1
  301. package/docs/functions/isNameProperty.html +1 -1
  302. package/docs/functions/isObjectProperty.html +1 -1
  303. package/docs/functions/isObjectsListSpecialProperties.html +1 -1
  304. package/docs/functions/isPlayerSpecialProperties.html +1 -1
  305. package/docs/functions/isPowerLineSpecialProperties.html +1 -1
  306. package/docs/functions/isSaveComponent.html +1 -1
  307. package/docs/functions/isSaveEntity.html +1 -1
  308. package/docs/functions/isSetProperty.html +1 -1
  309. package/docs/functions/isSingleProperty.html +1 -1
  310. package/docs/functions/isSoftObjectProperty.html +1 -1
  311. package/docs/functions/isSpecialDroneActionProperties.html +1 -1
  312. package/docs/functions/isStrProperty.html +1 -1
  313. package/docs/functions/isStructProperty.html +1 -1
  314. package/docs/functions/isTextProperty.html +1 -1
  315. package/docs/functions/isUInt64Property.html +1 -1
  316. package/docs/functions/isUint32Property.html +1 -1
  317. package/docs/functions/isUint8Property.html +1 -1
  318. package/docs/functions/isVehicleSpecialProperties.html +1 -1
  319. package/docs/functions/vec2.Parse.html +1 -1
  320. package/docs/functions/vec2.ParseF.html +1 -1
  321. package/docs/functions/vec2.Serialize.html +1 -1
  322. package/docs/functions/vec2.SerializeF.html +1 -1
  323. package/docs/functions/vec3.Parse.html +1 -1
  324. package/docs/functions/vec3.ParseF.html +1 -1
  325. package/docs/functions/vec3.ParseInt.html +1 -1
  326. package/docs/functions/vec3.Serialize.html +1 -1
  327. package/docs/functions/vec3.SerializeF.html +1 -1
  328. package/docs/functions/vec3.SerializeInt.html +1 -1
  329. package/docs/functions/vec3.add.html +1 -1
  330. package/docs/functions/vec3.length.html +1 -1
  331. package/docs/functions/vec3.mult.html +1 -1
  332. package/docs/functions/vec3.norm.html +1 -1
  333. package/docs/functions/vec3.sub.html +1 -1
  334. package/docs/functions/vec4.Parse.html +1 -1
  335. package/docs/functions/vec4.ParseF.html +1 -1
  336. package/docs/functions/vec4.Serialize.html +1 -1
  337. package/docs/functions/vec4.SerializeF.html +1 -1
  338. package/docs/hierarchy.html +1 -1
  339. package/docs/interfaces/BinaryOperable.html +2 -2
  340. package/docs/interfaces/BinaryReadable.html +2 -2
  341. package/docs/interfaces/BinaryWritable.html +2 -2
  342. package/docs/interfaces/Blueprint.html +2 -2
  343. package/docs/interfaces/BlueprintConfig.html +4 -4
  344. package/docs/interfaces/SaveComponentHeader.html +2 -2
  345. package/docs/interfaces/SaveEntityHeader.html +2 -2
  346. package/docs/interfaces/SaveObjectHeader.html +2 -2
  347. package/docs/modules/FConveyorBeltItem.html +1 -0
  348. package/docs/modules/FConveyorChainSplineSegment.html +1 -0
  349. package/docs/modules/FInventoryItem.html +1 -0
  350. package/docs/modules.html +1 -1
  351. package/docs/types/AbstractBaseProperty.html +2 -2
  352. package/docs/types/ArrayProperty.html +1 -1
  353. package/docs/types/BasicMultipleStructPropertyValue.html +2 -2
  354. package/docs/types/BasicStructPropertyValue.html +2 -2
  355. package/docs/types/BlueprintHeader.html +2 -2
  356. package/docs/types/BlueprintReaderWriterContext.html +2 -2
  357. package/docs/types/BoolArrayProperty.html +1 -1
  358. package/docs/types/BoolProperty.html +1 -1
  359. package/docs/types/BoxStructPropertyValue.html +2 -2
  360. package/docs/types/BuildableSubsystemSpecialProperties.html +2 -2
  361. package/docs/types/BuildableTypeInstance.html +2 -2
  362. package/docs/types/ByteArrayProperty.html +1 -1
  363. package/docs/types/ByteProperty.html +1 -1
  364. package/docs/types/BytePropertyValue.html +2 -2
  365. package/docs/types/ChunkCompressionInfo.html +2 -2
  366. package/docs/types/ChunkSummary.html +2 -2
  367. package/docs/types/CircuitSpecialProperties.html +2 -2
  368. package/docs/types/ConveyorChainActorSpecialProperties.html +2 -2
  369. package/docs/types/ConveyorSpecialProperties.html +2 -2
  370. package/docs/types/DoubleArrayProperty.html +1 -1
  371. package/docs/types/DoubleProperty.html +1 -1
  372. package/docs/types/DynamicStructPropertyValue.html +2 -2
  373. package/docs/types/EmptySpecialProperties.html +2 -2
  374. package/docs/types/EnumArrayProperty.html +1 -1
  375. package/docs/types/EnumProperty.html +1 -1
  376. package/docs/types/FClientIdentityInfo.html +2 -2
  377. package/docs/types/FColor.html +1 -1
  378. package/docs/types/FConveyorBeltItem.html +3 -0
  379. package/docs/types/FConveyorChainSplineSegment.html +10 -0
  380. package/docs/types/FCustomVersion.html +2 -2
  381. package/docs/types/FCustomVersionContainer.html +2 -2
  382. package/docs/types/FEngineVersion.html +2 -2
  383. package/docs/types/FGDynamicStruct.html +2 -2
  384. package/docs/types/FICFrameRange.html +2 -2
  385. package/docs/types/FICFrameRangeStructPropertyValue.html +2 -2
  386. package/docs/types/FINGPUT1BufferPixel.html +2 -2
  387. package/docs/types/FINItemStateFileSystem.html +1 -1
  388. package/docs/types/FINLuaRuntimePersistenceState.html +2 -2
  389. package/docs/types/FINNetworkTrace.html +2 -2
  390. package/docs/types/FIRInstancedStruct.html +1 -1
  391. package/docs/types/FInventoryItem.html +4 -0
  392. package/docs/types/FLBBalancerIndexing.html +2 -2
  393. package/docs/types/FLinearColor.html +1 -1
  394. package/docs/types/FLocalUserNetIdBundle.html +2 -2
  395. package/docs/types/FPackageFileVersion.html +2 -2
  396. package/docs/types/FPlayerInfoHandle.html +2 -2
  397. package/docs/types/FPropertyTag.html +2 -2
  398. package/docs/types/FPropertyTagNode.html +2 -2
  399. package/docs/types/FSaveObjectVersionData.html +2 -2
  400. package/docs/types/FUniqueNetIdRepl.html +2 -2
  401. package/docs/types/FloatArrayProperty.html +1 -1
  402. package/docs/types/FloatProperty.html +1 -1
  403. package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -1
  404. package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -1
  405. package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -1
  406. package/docs/types/GUID.html +1 -1
  407. package/docs/types/Grids.html +1 -1
  408. package/docs/types/HierarchyVersion.html +2 -2
  409. package/docs/types/Int64ArrayProperty.html +1 -1
  410. package/docs/types/Int64Property.html +1 -1
  411. package/docs/types/Int8Property.html +1 -1
  412. package/docs/types/IntArrayProperty.html +1 -1
  413. package/docs/types/IntProperty.html +1 -1
  414. package/docs/types/IntSetProperty.html +1 -1
  415. package/docs/types/InterfaceArrayProperty.html +1 -1
  416. package/docs/types/InterfaceProperty.html +1 -1
  417. package/docs/types/LBBalancerIndexing.html +2 -2
  418. package/docs/types/Level.html +2 -2
  419. package/docs/types/LevelToDestroyedActorsMap.html +1 -1
  420. package/docs/types/Levels.html +1 -1
  421. package/docs/types/MD5Hash.html +2 -2
  422. package/docs/types/MapProperty.html +1 -1
  423. package/docs/types/ModData.html +2 -2
  424. package/docs/types/NameProperty.html +1 -1
  425. package/docs/types/NameSetProperty.html +1 -1
  426. package/docs/types/ObjectArrayProperty.html +1 -1
  427. package/docs/types/ObjectProperty.html +1 -1
  428. package/docs/types/ObjectReference.html +2 -2
  429. package/docs/types/ObjectSetProperty.html +1 -1
  430. package/docs/types/ObjectsListSpecialProperties.html +2 -2
  431. package/docs/types/OptionalGUID.html +1 -1
  432. package/docs/types/PlayerSpecialProperties.html +2 -2
  433. package/docs/types/PowerLineSpecialProperties.html +2 -2
  434. package/docs/types/PropertiesMap.html +1 -1
  435. package/docs/types/RailroadTrackPositionStructPropertyValue.html +2 -2
  436. package/docs/types/ReaderWriterContext.html +1 -1
  437. package/docs/types/RoughSaveVersion.html +1 -1
  438. package/docs/types/SatisfactoryModMetadata.html +2 -2
  439. package/docs/types/SatisfactorySaveHeader.html +2 -2
  440. package/docs/types/SaveBodyChunks.html +2 -2
  441. package/docs/types/SaveBodyValidation.html +2 -2
  442. package/docs/types/SaveReaderWriterContext.html +2 -2
  443. package/docs/types/SetProperty.html +1 -1
  444. package/docs/types/SingleProperty.html +1 -1
  445. package/docs/types/SoftObjectArrayProperty.html +1 -1
  446. package/docs/types/SoftObjectProperty.html +1 -1
  447. package/docs/types/SoftObjectReference.html +2 -2
  448. package/docs/types/SpecialDroneAction.html +2 -2
  449. package/docs/types/SpecialDroneActionProperties.html +2 -2
  450. package/docs/types/SpecialProperties.AvailableSpecialPropertiesTypes.html +1 -1
  451. package/docs/types/StrArrayProperty.html +1 -1
  452. package/docs/types/StrProperty.html +1 -1
  453. package/docs/types/StrSetProperty.html +1 -1
  454. package/docs/types/StructArrayProperty.html +1 -1
  455. package/docs/types/StructProperty.html +1 -1
  456. package/docs/types/StructSetProperty.html +1 -1
  457. package/docs/types/TextArrayProperty.html +1 -1
  458. package/docs/types/TextProperty.html +1 -1
  459. package/docs/types/TextPropertyValue.html +2 -2
  460. package/docs/types/Transform.html +2 -2
  461. package/docs/types/Uint32Property.html +1 -1
  462. package/docs/types/Uint32SetProperty.html +1 -1
  463. package/docs/types/Uint64Property.html +1 -1
  464. package/docs/types/Uint8Property.html +1 -1
  465. package/docs/types/VehiclePhysicsData.html +2 -2
  466. package/docs/types/VehicleSpecialProperties.html +2 -2
  467. package/docs/types/col4.html +2 -2
  468. package/docs/types/vec2.html +2 -2
  469. package/docs/types/vec3.html +1 -1
  470. package/docs/types/vec4.html +1 -1
  471. package/docs/variables/DEFAULT_SATISFACTORY_CHUNK_HEADER_SIZE.html +1 -1
  472. package/docs/variables/EDIT.html +1 -1
  473. package/docs/variables/FINItemStateFileSystem.ExactStructReference.html +1 -1
  474. package/docs/variables/SaveBodyChunks.HEADER_V1.html +1 -1
  475. package/docs/variables/SaveBodyChunks.HEADER_V2.html +1 -1
  476. package/docs/variables/isBoolArrayProperty.html +1 -1
  477. package/docs/variables/isByteArrayProperty.html +1 -1
  478. package/docs/variables/isDoubleArrayProperty.html +1 -1
  479. package/docs/variables/isEnumArrayProperty.html +1 -1
  480. package/docs/variables/isFloatArrayProperty.html +1 -1
  481. package/docs/variables/isInt64ArrayProperty.html +1 -1
  482. package/docs/variables/isIntArrayProperty.html +1 -1
  483. package/docs/variables/isIntSetProperty.html +1 -1
  484. package/docs/variables/isInterfaceArrayProperty.html +1 -1
  485. package/docs/variables/isNameSetProperty.html +1 -1
  486. package/docs/variables/isObjectArrayProperty.html +1 -1
  487. package/docs/variables/isObjectSetProperty.html +1 -1
  488. package/docs/variables/isSoftObjectArrayProperty.html +1 -1
  489. package/docs/variables/isStrArrayProperty.html +1 -1
  490. package/docs/variables/isStrSetProperty.html +1 -1
  491. package/docs/variables/isStructArrayPRoperty.html +1 -1
  492. package/docs/variables/isStructSetProperty.html +1 -1
  493. package/docs/variables/isTextArrayProperty.html +1 -1
  494. package/docs/variables/isUint32SetProperty.html +1 -1
  495. package/package.json +1 -1
  496. package/docs/types/ConveyorChainSegmentSpecialProperties.html +0 -10
  497. package/docs/types/ConveyorItemSpecialProperties.html +0 -3
  498. package/docs/types/InventoryItemStructPropertyValue.html +0 -4
@@ -0,0 +1,299 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const fs = __importStar(require("node:fs"));
27
+ const path = __importStar(require("node:path"));
28
+ const node_stream_1 = require("node:stream");
29
+ const node_util_1 = require("node:util");
30
+ const index_1 = require("../index");
31
+ const PropertiesListMod = __importStar(require("../parser/satisfactory/types/property/PropertiesList"));
32
+ const FINNetworkTraceMod = __importStar(require("../parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace"));
33
+ beforeAll(() => {
34
+ const logOutput = process.stdout;
35
+ console.log = (...e) => {
36
+ logOutput.write(e.map(el => (0, node_util_1.format)(el)).join(' ') + '\n');
37
+ };
38
+ });
39
+ const ParseSaveSync = (savename, file, onDecompressedSaveBody, throwErrors = true) => {
40
+ console.log(`## parsing save ${savename}`);
41
+ const save = index_1.Parser.ParseSave(savename, file, {
42
+ onDecompressedSaveBody,
43
+ onProgressCallback: (progress, msg) => {
44
+ console.log(`${savename} parsing progress`, progress, msg);
45
+ },
46
+ throwErrors
47
+ });
48
+ return save;
49
+ };
50
+ const ParseBlueprintSync = (blueprintname, file, configFileBuffer, onDecompressedBlueprintBody) => {
51
+ return index_1.Parser.ParseBlueprintFiles(blueprintname, file, configFileBuffer, {
52
+ onDecompressedBlueprintBody,
53
+ throwErrors: true
54
+ });
55
+ };
56
+ const WriteSaveSync = (save, onBinaryBeforeCompressing) => {
57
+ let mainFileHeader;
58
+ const mainFileBodyChunks = [];
59
+ index_1.Parser.WriteSave(save, header => {
60
+ mainFileHeader = header;
61
+ }, chunk => {
62
+ mainFileBodyChunks.push(chunk);
63
+ }, { onBinaryBeforeCompressing });
64
+ fs.writeFileSync(path.join(__dirname, save.name + '_on-writing.sav'), Buffer.concat([mainFileHeader, ...mainFileBodyChunks]));
65
+ };
66
+ describe('modification of saves', () => {
67
+ const FindFirst = (save, condition) => {
68
+ for (const level of Object.values(save.levels)) {
69
+ const potentialObject = level.objects.find(condition);
70
+ if (potentialObject) {
71
+ return {
72
+ level,
73
+ object: potentialObject
74
+ };
75
+ }
76
+ }
77
+ };
78
+ const ModifyObjects = (save, ...modifiedObjects) => {
79
+ for (const modifiedObject of modifiedObjects) {
80
+ for (const level of Object.values(save.levels)) {
81
+ for (let i = 0; i < level.objects.length; i++) {
82
+ if (level.objects[i].instanceName === modifiedObject.instanceName) {
83
+ level.objects[i] = modifiedObject;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ };
89
+ const ModifyPlayer = (save) => {
90
+ const firstPlayer = FindFirst(save, obj => obj.typePath === '/Game/FactoryGame/Character/Player/Char_Player.Char_Player_C');
91
+ firstPlayer.object.transform.translation = {
92
+ x: firstPlayer.object.transform.translation.x + 5000,
93
+ y: firstPlayer.object.transform.translation.y + 5000,
94
+ z: firstPlayer.object.transform.translation.z,
95
+ };
96
+ return [firstPlayer];
97
+ };
98
+ const ModifyStorageContainer = (save) => {
99
+ const firstContainer = FindFirst(save, obj => obj.typePath === '/Game/FactoryGame/Buildable/Factory/StorageContainerMk1/Build_StorageContainerMk1.Build_StorageContainerMk1_C');
100
+ const inventoryReference = firstContainer.object.properties.mStorageInventory;
101
+ const inventory = Object.values(save.levels).flatMap(level => level.objects).find(obj => obj.instanceName === inventoryReference.value.pathName);
102
+ const inventoryStacks = inventory.properties.mInventoryStacks;
103
+ const firstStack = inventoryStacks.values[0];
104
+ firstStack.properties.Item.value.itemReference = {
105
+ levelName: '',
106
+ pathName: '/Game/FactoryGame/Resource/Parts/Rotor/Desc_Rotor.Desc_Rotor_C'
107
+ };
108
+ firstStack.properties.NumItems.value = 5;
109
+ return [firstContainer];
110
+ };
111
+ it.each([
112
+ ['modifies position of first player', ModifyPlayer],
113
+ ['modifies an item stack in a storage container', ModifyStorageContainer]
114
+ ])('example %s correctly', (_, modificationMethod) => {
115
+ const savename = '265';
116
+ const file = new Uint8Array(fs.readFileSync(path.join(__dirname, savename + '.sav'))).buffer;
117
+ const save = ParseSaveSync(savename, file);
118
+ const modifiedObjects = modificationMethod(save);
119
+ ModifyObjects(save, ...modifiedObjects.map(wrapper => wrapper.object));
120
+ WriteSaveSync(save, binary => {
121
+ fs.writeFileSync(path.join(__dirname, savename + '_on-writing.bin'), Buffer.from(binary));
122
+ });
123
+ const modifiedFile = new Uint8Array(fs.readFileSync(path.join(__dirname, save.name + '_on-writing.sav'))).buffer;
124
+ const modifiedSave = ParseSaveSync(savename, modifiedFile);
125
+ for (const modifiedObject of modifiedObjects) {
126
+ const relevantLevel = modifiedSave.levels[modifiedObject.level.name];
127
+ const objectToCheck = relevantLevel.objects.find(obj => obj.instanceName === modifiedObject.object.instanceName);
128
+ expect((0, node_util_1.isDeepStrictEqual)(objectToCheck, modifiedObject.object)).toEqual(true);
129
+ }
130
+ });
131
+ });
132
+ describe('parsing of saves', () => {
133
+ const saveList = [
134
+ 'EmptySave10WithoutDestroyedActors',
135
+ 'Release-001',
136
+ 'Release-032',
137
+ '265',
138
+ '269',
139
+ 'Fresh-1.1-Dismantled',
140
+ 'Unlock-1.1-2',
141
+ 'FreshStartU8001-vehicles-2',
142
+ 'FreshStart001',
143
+ 'FreshStart002',
144
+ 'Release-Ported-U1-to-U1.1',
145
+ 'Release-Ported-U1-to-U1.1-Collected-Nuts-and-Berry',
146
+ 'Release-Ported-U1-to-U1.1-Collected-Blue-Slug',
147
+ 'ficsitcam-1',
148
+ 'structuralsolutions-1',
149
+ 'x3-roads-signs',
150
+ 'pep-modtest-1',
151
+ 'Modding-Testing-MLB-003',
152
+ 'Dunarr-076',
153
+ 'Modding-Experimental-01',
154
+ 'Empty-Save-Before-1.2',
155
+ 'Another-1-2',
156
+ 'Ported-11-to-12-Exp'
157
+ ];
158
+ it.each(saveList)('can parse a binary save (%s) to json with stream and with sync', async (savename) => {
159
+ const filepath = path.join(__dirname, savename + '.sav');
160
+ const binaryFilepathStream = path.join(__dirname, savename + '.stream.bin');
161
+ const binaryFilepathSync = path.join(__dirname, savename + '.sync.bin');
162
+ const file = new Uint8Array(fs.readFileSync(filepath)).buffer;
163
+ const outJsonPathStream = path.join(__dirname, savename + '.stream.json');
164
+ const outJsonPathSync = path.join(__dirname, savename + '.sync.json');
165
+ const outJsonStream = fs.createWriteStream(outJsonPathStream, { highWaterMark: 1024 * 1024 * 200 });
166
+ const { stream, startStreaming } = index_1.ReadableStreamParser.CreateReadableStreamFromSaveToJson(savename, file, {
167
+ onDecompressedSaveBody: decompressedBody => {
168
+ fs.writeFileSync(binaryFilepathStream, Buffer.from(decompressedBody));
169
+ }, onProgress: (progress, msg) => {
170
+ console.log(`parsing stream progress ${savename}`, progress, msg);
171
+ }
172
+ });
173
+ const start = performance.now();
174
+ startStreaming();
175
+ stream.pipeTo(node_stream_1.Writable.toWeb(outJsonStream));
176
+ let end = 0;
177
+ await new Promise((resolve, reject) => {
178
+ outJsonStream
179
+ .on('close', () => {
180
+ console.log('outstream closed.');
181
+ end = performance.now();
182
+ return resolve();
183
+ })
184
+ .on('error', (err) => {
185
+ console.log('outstream error', err);
186
+ return reject();
187
+ });
188
+ });
189
+ console.log(`Streaming took ${(end - start) / 1000} seconds.`);
190
+ const start2 = performance.now();
191
+ const save = ParseSaveSync(savename, file, decompressedBody => {
192
+ fs.writeFileSync(binaryFilepathSync, Buffer.from(decompressedBody));
193
+ });
194
+ fs.writeFileSync(outJsonPathSync, JSON.stringify(save));
195
+ const end2 = performance.now();
196
+ console.log(`Sync Parsing took ${(end2 - start2) / 1000} seconds.`);
197
+ const json1 = fs.readFileSync(outJsonPathSync, { encoding: 'utf-8' });
198
+ const json2 = fs.readFileSync(outJsonPathStream, { encoding: 'utf-8' });
199
+ const thing1 = JSON.parse(json1);
200
+ const thing2 = JSON.parse(json2);
201
+ expect(JSON.stringify(thing1).length).toEqual(JSON.stringify(thing2).length);
202
+ const saveSerializedAndRead = () => ParseSaveSync(savename, file);
203
+ expect(saveSerializedAndRead).not.toThrow();
204
+ });
205
+ it.each(saveList)('can write a synchronous save (%s)', async (savename) => {
206
+ const filepath = path.join(__dirname, savename + '.sync.json');
207
+ const save = JSON.parse(fs.readFileSync(filepath, { encoding: 'utf-8' }));
208
+ WriteSaveSync(save, binary => {
209
+ fs.writeFileSync(path.join(__dirname, savename + '_on-writing.bin'), new Uint8Array(Buffer.from(binary)));
210
+ });
211
+ });
212
+ });
213
+ describe('parsing of blueprints', () => {
214
+ it.each([
215
+ 'U1-1-Single-Container',
216
+ 'U1-1-Single-Container-2',
217
+ 'BlueprintWithHeaderV1',
218
+ 'release-single-wall',
219
+ 'release-storage-mk1',
220
+ 'release-storage-mk2-blueprintmk2',
221
+ 'release-two-foundations',
222
+ 'two-foundations-1-2',
223
+ 'mod-circuitry'
224
+ ])('parser can read and write a synchronous blueprint: %s', async (blueprintname) => {
225
+ const filepathBlueprint = path.join(__dirname, blueprintname + '.sbp');
226
+ const filepathBlueprintConfig = path.join(__dirname, blueprintname + '.sbpcfg');
227
+ const binaryFilepath = path.join(__dirname, blueprintname + '.bins');
228
+ const file = new Uint8Array(fs.readFileSync(filepathBlueprint)).buffer;
229
+ const configFileBuffer = new Uint8Array(fs.readFileSync(filepathBlueprintConfig)).buffer;
230
+ let binaryBodyLength = 0;
231
+ const blueprint = ParseBlueprintSync(blueprintname, file, configFileBuffer, (decompressedBody) => {
232
+ binaryBodyLength = decompressedBody.byteLength;
233
+ fs.writeFileSync(binaryFilepath, Buffer.from(decompressedBody));
234
+ });
235
+ fs.writeFileSync(path.join(__dirname, blueprintname + '.json'), JSON.stringify(blueprint, null, 4));
236
+ let mainFileHeader;
237
+ const mainFileBodyChunks = [];
238
+ const response = index_1.Parser.WriteBlueprintFiles(blueprint, header => {
239
+ mainFileHeader = header;
240
+ }, chunk => {
241
+ mainFileBodyChunks.push(chunk);
242
+ }, {
243
+ onMainFileBinaryBeforeCompressing: binary => {
244
+ fs.writeFileSync(path.join(__dirname, blueprintname + '.bins_modified'), new Uint8Array(Buffer.from(binary)));
245
+ expect(binary.byteLength).toEqual(binaryBodyLength);
246
+ },
247
+ });
248
+ fs.writeFileSync(path.join(__dirname, blueprintname + '.sbp_modified'), new Uint8Array(Buffer.concat([mainFileHeader, ...mainFileBodyChunks])));
249
+ fs.writeFileSync(path.join(__dirname, blueprintname + '.sbpcfg_modified'), new Uint8Array(Buffer.from(response.configFileBinary)));
250
+ const mainFileNew = new Uint8Array(fs.readFileSync(path.join(__dirname, blueprintname + '.sbp_modified'))).buffer;
251
+ const configFileNew = new Uint8Array(fs.readFileSync(path.join(__dirname, blueprintname + '.sbpcfg_modified'))).buffer;
252
+ const blueprintNew = ParseBlueprintSync(blueprintname, mainFileNew, configFileNew, (decompressedBody) => {
253
+ expect(decompressedBody.byteLength).toEqual(binaryBodyLength);
254
+ });
255
+ });
256
+ });
257
+ describe('when ignoring errors', () => {
258
+ let spy;
259
+ const file = new Uint8Array(fs.readFileSync(path.join(__dirname, 'Dunarr-027.sav'))).buffer;
260
+ const parseSaveWithoutErrors = () => ParseSaveSync('Dunarr', file, () => { }, false);
261
+ afterEach(() => {
262
+ spy?.mockRestore();
263
+ });
264
+ it('after encountering an error in the property read method, continues parsing.', () => {
265
+ spy = jest.spyOn(FINNetworkTraceMod.FINNetworkTrace, 'read');
266
+ spy.mockImplementationOnce((reader) => {
267
+ throw new Error('unexpected error.');
268
+ });
269
+ expect(parseSaveWithoutErrors).not.toThrow();
270
+ expect(spy).toHaveBeenCalled();
271
+ });
272
+ it('after reading a wrong number of bytes for a property, continues parsing.', () => {
273
+ spy = jest.spyOn(FINNetworkTraceMod.FINNetworkTrace, 'read');
274
+ spy.mockImplementationOnce((reader) => {
275
+ reader.readInt32();
276
+ return {
277
+ reference: {
278
+ levelName: '',
279
+ pathName: ''
280
+ }
281
+ };
282
+ });
283
+ expect(parseSaveWithoutErrors).not.toThrow();
284
+ expect(spy).toHaveBeenCalled();
285
+ });
286
+ it('after encountering a severe error, puts data of object into trailing data.', () => {
287
+ spy = jest.spyOn(PropertiesListMod.PropertiesList, 'ParseList');
288
+ spy.mockImplementationOnce((reader) => {
289
+ throw new Error('unexpected error.');
290
+ });
291
+ const save = parseSaveWithoutErrors();
292
+ const firstObjectInSave = Object.values(save.levels).flatMap(level => level.objects).find(obj => obj.instanceName === 'Persistent_Level:PersistentLevel.BP_EnemySpawner371');
293
+ expect(save).toBeDefined();
294
+ expect(firstObjectInSave).toBeDefined();
295
+ expect(firstObjectInSave.trailingData.length).toEqual(475);
296
+ expect(Object.entries(firstObjectInSave.properties).length).toEqual(0);
297
+ });
298
+ });
299
+ //# sourceMappingURL=parser.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.spec.js","sourceRoot":"","sources":["../../src/test/parser.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,4CAA8B;AAC9B,gDAAkC;AAClC,6CAAuC;AACvC,yCAAsD;AACtD,oCAA+O;AAC/O,wGAA0F;AAC1F,6HAA+G;AAE/G,SAAS,CAAC,GAAG,EAAE;IACd,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IACjC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,CAAQ,EAAE,EAAE;QAC7B,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAA,kBAAM,EAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3D,CAAC,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,IAAqB,EAAE,sBAAwD,EAAE,cAAuB,IAAI,EAAoB,EAAE;IAC1K,OAAO,CAAC,GAA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,WAAW,CAAC,CAAC;QAE/D,GAAiB,CAAC,sBAAsB,CAAC,CAAC,MAAW,EAAE,EAAE;YACzD,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,sBAAsB,EAAE,CAAC;QACtC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,KAAK,qDAAqD,CAAC,CAAC;QAE9K,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QAC3B,MAAM,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE,CAAC;QACxC,MAAM,CAAC,iBAAkB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5D,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAkB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/// <reference types=\"jest\" />\n/// <reference types=\"node\" />\n\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport { Writable } from 'node:stream';\nimport { format, isDeepStrictEqual } from 'node:util';\nimport { ArrayProperty, ContextReader, DynamicStructPropertyValue, FInventoryItem, IntProperty, Level, ObjectProperty, Parser, ReadableStreamParser, SatisfactorySave, SaveComponent, SaveEntity, SaveObject, StructProperty } from '../index';\nimport * as PropertiesListMod from '../parser/satisfactory/types/property/PropertiesList';\nimport * as FINNetworkTraceMod from '../parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace';\n\nbeforeAll(() => {\n\tconst logOutput = process.stdout;\n\tconsole.log = (...e: any[]) => {\n\t\tlogOutput.write(e.map(el => format(el)).join(' ') + '\\n');\n\t};\n});\n\nconst ParseSaveSync = (savename: string, file: ArrayBufferLike, onDecompressedSaveBody?: (body: ArrayBufferLike) => void, throwErrors: boolean = true): SatisfactorySave => {\n\tconsole.log(`## parsing save ${savename}`);\n\tconst save = Parser.ParseSave(savename, file, {\n\t\tonDecompressedSaveBody,\n\t\tonProgressCallback: (progress, msg) => {\n\t\t\tconsole.log(`${savename} parsing progress`, progress, msg);\n\t\t},\n\t\tthrowErrors\n\t});\n\treturn save;\n};\n\n\nconst ParseBlueprintSync = (\n\tblueprintname: string,\n\tfile: ArrayBufferLike,\n\tconfigFileBuffer: ArrayBufferLike,\n\tonDecompressedBlueprintBody: NonNullable<Parameters<typeof Parser.ParseBlueprintFiles>[3]>['onDecompressedBlueprintBody']\n) => {\n\treturn Parser.ParseBlueprintFiles(blueprintname, file, configFileBuffer, {\n\t\tonDecompressedBlueprintBody,\n\t\tthrowErrors: true\n\t});\n}\n\nconst WriteSaveSync = (save: SatisfactorySave, onBinaryBeforeCompressing?: (binary: ArrayBuffer) => void) => {\n\tlet mainFileHeader: Uint8Array;\n\tconst mainFileBodyChunks: Uint8Array[] = [];\n\tParser.WriteSave(save,\n\t\theader => {\n\t\t\tmainFileHeader = header;\n\t\t},\n\t\tchunk => {\n\t\t\tmainFileBodyChunks.push(chunk);\n\t\t},\n\t\t{ onBinaryBeforeCompressing });\n\n\t// write complete .sav file back to disk\n\tfs.writeFileSync(path.join(__dirname, save.name + '_on-writing.sav'), Buffer.concat([mainFileHeader!, ...mainFileBodyChunks]));\n};\n\n\n\ndescribe('modification of saves', () => {\n\tconst FindFirst = (save: SatisfactorySave, condition: (obj: SaveObject) => boolean): { object: SaveEntity | SaveComponent, level: Level } | undefined => {\n\t\tfor (const level of Object.values(save.levels)) {\n\t\t\tconst potentialObject = level.objects.find(condition);\n\t\t\tif (potentialObject) {\n\t\t\t\treturn {\n\t\t\t\t\tlevel,\n\t\t\t\t\tobject: potentialObject\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\tconst ModifyObjects = (save: SatisfactorySave, ...modifiedObjects: (SaveEntity | SaveComponent)[]) => {\n\t\tfor (const modifiedObject of modifiedObjects) {\n\t\t\tfor (const level of Object.values(save.levels)) {\n\t\t\t\tfor (let i = 0; i < level.objects.length; i++) {\n\t\t\t\t\tif (level.objects[i].instanceName === modifiedObject.instanceName) {\n\t\t\t\t\t\tlevel.objects[i] = modifiedObject;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst ModifyPlayer = (save: SatisfactorySave): { object: SaveEntity | SaveComponent, level: Level }[] => {\n\t\tconst firstPlayer = FindFirst(save, obj => obj.typePath === '/Game/FactoryGame/Character/Player/Char_Player.Char_Player_C')!;\n\t\t(firstPlayer.object as SaveEntity).transform.translation = {\n\t\t\tx: (firstPlayer.object as SaveEntity).transform.translation.x + 5000,\n\t\t\ty: (firstPlayer.object as SaveEntity).transform.translation.y + 5000,\n\t\t\tz: (firstPlayer.object as SaveEntity).transform.translation.z,\n\t\t}\n\t\treturn [firstPlayer];\n\t};\n\n\tconst ModifyStorageContainer = (save: SatisfactorySave): { object: SaveEntity | SaveComponent, level: Level }[] => {\n\t\tconst firstContainer = FindFirst(save, obj => obj.typePath === '/Game/FactoryGame/Buildable/Factory/StorageContainerMk1/Build_StorageContainerMk1.Build_StorageContainerMk1_C')!;\n\n\t\tconst inventoryReference = firstContainer.object.properties.mStorageInventory as ObjectProperty;\n\t\tconst inventory = Object.values(save.levels).flatMap(level => level.objects).find(obj => obj.instanceName === inventoryReference.value.pathName) as SaveComponent;\n\t\tconst inventoryStacks = inventory.properties.mInventoryStacks as ArrayProperty;\n\t\tconst firstStack = inventoryStacks.values[0];\n\n\t\t// modify first item stack\n\t\t(((firstStack as DynamicStructPropertyValue).properties.Item as StructProperty).value as FInventoryItem).itemReference = {\n\t\t\tlevelName: '',\n\t\t\tpathName: '/Game/FactoryGame/Resource/Parts/Rotor/Desc_Rotor.Desc_Rotor_C'\n\t\t};\n\t\t((firstStack as DynamicStructPropertyValue).properties.NumItems as IntProperty).value = 5;\n\n\t\treturn [firstContainer];\n\t};\n\n\n\t/**\n\t * this test iterates through a list of \"modificationMethods\", where each modifies one or multiple objects. The test then checks whether the update persists through serialization and de-serialization.\n\t */\n\tit.each([\n\t\t['modifies position of first player', ModifyPlayer],\n\t\t['modifies an item stack in a storage container', ModifyStorageContainer]\n\t])('example %s correctly', (_, modificationMethod: (save: SatisfactorySave) => { object: SaveEntity | SaveComponent, level: Level }[]) => {\n\t\tconst savename = '265';\n\t\tconst file = new Uint8Array(fs.readFileSync(path.join(__dirname, savename + '.sav'))).buffer;\n\t\tconst save = ParseSaveSync(savename, file);\n\n\t\t// modify, write save, read save again\n\t\tconst modifiedObjects = modificationMethod(save);\n\t\tModifyObjects(save, ...modifiedObjects.map(wrapper => wrapper.object));\n\t\tWriteSaveSync(save, binary => {\n\t\t\tfs.writeFileSync(path.join(__dirname, savename + '_on-writing.bin'), Buffer.from(binary));\n\t\t});\n\t\tconst modifiedFile = new Uint8Array(fs.readFileSync(path.join(__dirname, save.name + '_on-writing.sav'))).buffer;\n\t\tconst modifiedSave = ParseSaveSync(savename, modifiedFile);\n\n\t\t// for each modified object, check that modified save file has the equal object.\n\t\tfor (const modifiedObject of modifiedObjects) {\n\t\t\tconst relevantLevel = modifiedSave.levels[modifiedObject.level.name] as Level;\n\t\t\tconst objectToCheck = relevantLevel.objects.find(obj => obj.instanceName === modifiedObject.object.instanceName) as SaveEntity | SaveComponent;\n\t\t\texpect(isDeepStrictEqual(objectToCheck, modifiedObject.object)).toEqual(true);\n\t\t}\n\t});\n});\n\ndescribe('parsing of saves', () => {\n\tconst saveList: string[] = [\n\n\t\t'EmptySave10WithoutDestroyedActors',\t\t\t\t// 1.0 Empty Save without destroyed actors.\n\t\t'Release-001',\t\t\t// 1.0 Save, almost empty.\n\t\t'Release-032',\t\t\t// 1.0 Save\n\t\t'265',\t\t\t\t\t// U8 save ported to 1.0\n\t\t'269',\t\t\t\t\t// U8 save ported to 1.0\n\n\t\t'Fresh-1.1-Dismantled',\t// 1.1 with Dismantled Crashsite.\n\n\t\t'Unlock-1.1-2',\t\t\t// 1.1 Save\n\t\t'FreshStartU8001-vehicles-2',\t// U8 save\n\t\t'FreshStart001',\t\t// U6/U7 save\n\t\t'FreshStart002',\t\t// U6/U7 save, even lower saveVersion (36)\n\n\t\t'Release-Ported-U1-to-U1.1',\t\t\t\t\t\t\t// U1 ported to U1.1\n\t\t'Release-Ported-U1-to-U1.1-Collected-Nuts-and-Berry',\t// U1 ported to U1.1\n\t\t'Release-Ported-U1-to-U1.1-Collected-Blue-Slug',\t\t// U1 ported to U1.1\n\n\t\t// Mods in 1.1\n\t\t'ficsitcam-1',\n\t\t'structuralsolutions-1',\n\t\t'x3-roads-signs',\n\t\t'pep-modtest-1',\n\t\t'Modding-Testing-MLB-003',\t// 1.1 modular LBs and alternates\n\n\t\t'Dunarr-076',\t\t\t\t// 1.1 FicsItNetworks\n\n\t\t'Modding-Experimental-01',\t\t// 1.1 SaveCustomVersion 53. Already has annoying changes to properties.\n\t\t'Empty-Save-Before-1.2',\t\t// 1.1 jsut before 1.2 release\n\t\t'Another-1-2',\t\t\t\t// 1.2 Fresh Release\n\t\t'Ported-11-to-12-Exp'\n\t];\n\n\tit.each(saveList)('can parse a binary save (%s) to json with stream and with sync', async (savename: string) => {\n\n\t\tconst filepath = path.join(__dirname, savename + '.sav');\n\t\tconst binaryFilepathStream = path.join(__dirname, savename + '.stream.bin');\n\t\tconst binaryFilepathSync = path.join(__dirname, savename + '.sync.bin');\n\t\tconst file = new Uint8Array(fs.readFileSync(filepath)).buffer;\n\t\tconst outJsonPathStream = path.join(__dirname, savename + '.stream.json');\n\t\tconst outJsonPathSync = path.join(__dirname, savename + '.sync.json');\n\n\t\t// a high highwatermark can help in not having so many \"pull\"-requests to the readablesource, so less calls on consumer side.\n\t\t// However, the write speed of the writestream is still a limit for consumption.\n\t\tconst outJsonStream = fs.createWriteStream(outJsonPathStream, { highWaterMark: 1024 * 1024 * 200 });\n\t\tconst { stream, startStreaming } = ReadableStreamParser.CreateReadableStreamFromSaveToJson(savename, file, {\n\t\t\tonDecompressedSaveBody: decompressedBody => {\n\t\t\t\tfs.writeFileSync(binaryFilepathStream, Buffer.from(decompressedBody));\n\t\t\t}, onProgress: (progress, msg) => {\n\t\t\t\tconsole.log(`parsing stream progress ${savename}`, progress, msg);\n\t\t\t}\n\t\t});\n\n\t\t// streaming to file, WritableStream is from stream\n\t\tconst start = performance.now();\n\t\tstartStreaming();\n\t\tstream.pipeTo(Writable.toWeb(outJsonStream));\n\n\t\tlet end: number = 0;\n\t\tawait new Promise<void>((resolve, reject) => {\n\t\t\toutJsonStream\n\t\t\t\t.on('close', () => {\n\t\t\t\t\tconsole.log('outstream closed.');\n\t\t\t\t\tend = performance.now();\n\t\t\t\t\treturn resolve();\n\t\t\t\t})\n\t\t\t\t.on('error', (err) => {\n\t\t\t\t\tconsole.log('outstream error', err);\n\t\t\t\t\treturn reject();\n\t\t\t\t});\n\t\t});\n\t\tconsole.log(`Streaming took ${(end - start) / 1000} seconds.`);\n\n\t\t// parse sync as well.\n\t\tconst start2 = performance.now();\n\t\tconst save = ParseSaveSync(savename, file, decompressedBody => {\n\t\t\tfs.writeFileSync(binaryFilepathSync, Buffer.from(decompressedBody));\n\t\t});\n\n\t\tfs.writeFileSync(outJsonPathSync, JSON.stringify(save));\n\t\tconst end2 = performance.now();\n\t\tconsole.log(`Sync Parsing took ${(end2 - start2) / 1000} seconds.`);\n\n\t\tconst json1 = fs.readFileSync(outJsonPathSync, { encoding: 'utf-8' });\n\t\tconst json2 = fs.readFileSync(outJsonPathStream, { encoding: 'utf-8' });\n\n\t\t// check that the minified jsons of stream and sync parsing are equal.\n\n\t\tconst thing1 = JSON.parse(json1) as SatisfactorySave;\n\t\tconst thing2 = JSON.parse(json2) as SatisfactorySave;\n\t\texpect(JSON.stringify(thing1).length).toEqual(JSON.stringify(thing2).length);\n\n\t\t// check reading back written save\n\t\tconst saveSerializedAndRead = () => ParseSaveSync(savename, file);\n\t\texpect(saveSerializedAndRead).not.toThrow();\n\t});\n\n\n\tit.each(saveList)('can write a synchronous save (%s)', async (savename) => {\n\t\tconst filepath = path.join(__dirname, savename + '.sync.json');\n\t\tconst save = JSON.parse(fs.readFileSync(filepath, { encoding: 'utf-8' })) as SatisfactorySave;\n\t\tWriteSaveSync(save, binary => {\n\t\t\tfs.writeFileSync(path.join(__dirname, savename + '_on-writing.bin'), new Uint8Array(Buffer.from(binary)));\n\t\t});\n\t});\n});\n\ndescribe('parsing of blueprints', () => {\n\tit.each([\n\n\t\t'U1-1-Single-Container',\t// U1.1 \n\t\t'U1-1-Single-Container-2',\t// U1.1\n\n\t\t'BlueprintWithHeaderV1',\t// blueprint saved before v2 header was introduced (in U8 i think)\n\n\t\t'release-single-wall',\t\t\t\t\t// U1\n\t\t'release-storage-mk1',\t\t\t\t\t// U1\n\t\t'release-storage-mk2-blueprintmk2',\t\t// U1\n\t\t'release-two-foundations',\t\t\t\t// U1\n\n\t\t'two-foundations-1-2',\t\t\t\t\t// U1.2\n\n\t\t'mod-circuitry'\t\t\t\t\t\t\t// U1.1 mod circuitry\n\n\t])('parser can read and write a synchronous blueprint: %s', async (blueprintname) => {\n\t\tconst filepathBlueprint = path.join(__dirname, blueprintname + '.sbp');\n\t\tconst filepathBlueprintConfig = path.join(__dirname, blueprintname + '.sbpcfg');\n\t\tconst binaryFilepath = path.join(__dirname, blueprintname + '.bins');\n\t\tconst file = new Uint8Array(fs.readFileSync(filepathBlueprint)).buffer;\n\t\tconst configFileBuffer = new Uint8Array(fs.readFileSync(filepathBlueprintConfig)).buffer;\n\n\t\tlet binaryBodyLength = 0;\n\t\tconst blueprint = ParseBlueprintSync(blueprintname, file, configFileBuffer, (decompressedBody) => {\n\t\t\tbinaryBodyLength = decompressedBody.byteLength;\n\t\t\tfs.writeFileSync(binaryFilepath, Buffer.from(decompressedBody));\n\t\t});\n\n\t\tfs.writeFileSync(path.join(__dirname, blueprintname + '.json'), JSON.stringify(blueprint, null, 4));\n\n\t\t// write again\n\t\tlet mainFileHeader: Uint8Array;\n\t\tconst mainFileBodyChunks: Uint8Array[] = [];\n\t\tconst response = Parser.WriteBlueprintFiles(blueprint,\n\t\t\theader => {\n\t\t\t\tmainFileHeader = header;\n\t\t\t}, chunk => {\n\t\t\t\tmainFileBodyChunks.push(chunk);\n\t\t\t},\n\t\t\t{\n\t\t\t\tonMainFileBinaryBeforeCompressing: binary => {\n\t\t\t\t\tfs.writeFileSync(path.join(__dirname, blueprintname + '.bins_modified'), new Uint8Array(Buffer.from(binary)));\n\t\t\t\t\texpect(binary.byteLength).toEqual(binaryBodyLength);\n\t\t\t\t},\n\t\t\t});\n\n\t\t// write complete .sbp file back to disk\n\t\tfs.writeFileSync(path.join(__dirname, blueprintname + '.sbp_modified'), new Uint8Array(Buffer.concat([mainFileHeader!, ...mainFileBodyChunks])));\n\t\tfs.writeFileSync(path.join(__dirname, blueprintname + '.sbpcfg_modified'), new Uint8Array(Buffer.from(response.configFileBinary)));\n\n\t\t// test reading modified blueprint again.\n\t\tconst mainFileNew = new Uint8Array(fs.readFileSync(path.join(__dirname, blueprintname + '.sbp_modified'))).buffer;\n\t\tconst configFileNew = new Uint8Array(fs.readFileSync(path.join(__dirname, blueprintname + '.sbpcfg_modified'))).buffer;\n\n\t\tconst blueprintNew = ParseBlueprintSync(blueprintname, mainFileNew, configFileNew, (decompressedBody) => {\n\t\t\texpect(decompressedBody.byteLength).toEqual(binaryBodyLength);\n\t\t});\n\t});\n});\n\ndescribe('when ignoring errors', () => {\n\tlet spy: jest.SpyInstance | undefined;\n\tconst file = new Uint8Array(fs.readFileSync(path.join(__dirname, 'Dunarr-027.sav'))).buffer;\n\tconst parseSaveWithoutErrors = () => ParseSaveSync('Dunarr', file, () => { }, false);\n\n\tafterEach(() => {\n\t\tspy?.mockRestore();\n\t});\n\n\tit('after encountering an error in the property read method, continues parsing.', () => {\n\t\tspy = jest.spyOn(FINNetworkTraceMod.FINNetworkTrace, 'read');\n\n\t\t// first call for this test throws, subsequent calls use the original read()\n\t\t(spy as jest.Mock).mockImplementationOnce((reader: any) => {\n\t\t\tthrow new Error('unexpected error.');\n\t\t});\n\n\t\texpect(parseSaveWithoutErrors).not.toThrow();\n\t\texpect(spy).toHaveBeenCalled();\n\t});\n\n\tit('after reading a wrong number of bytes for a property, continues parsing.', () => {\n\t\tspy = jest.spyOn(FINNetworkTraceMod.FINNetworkTrace, 'read');\n\n\t\t(spy as jest.Mock).mockImplementationOnce((reader: ContextReader) => {\n\n\t\t\t// custom parsing method. reads way too little.\n\t\t\treader.readInt32();\n\t\t\treturn {\n\t\t\t\treference: {\n\t\t\t\t\tlevelName: '',\n\t\t\t\t\tpathName: ''\n\t\t\t\t}\n\t\t\t} satisfies FINNetworkTraceMod.FINNetworkTrace;\n\t\t});\n\n\t\texpect(parseSaveWithoutErrors).not.toThrow();\n\t\texpect(spy).toHaveBeenCalled();\n\t});\n\n\tit('after encountering a severe error, puts data of object into trailing data.', () => {\n\t\tspy = jest.spyOn(PropertiesListMod.PropertiesList, 'ParseList');\n\n\t\t(spy as jest.Mock).mockImplementationOnce((reader: any) => {\n\t\t\tthrow new Error('unexpected error.');\n\t\t});\n\n\t\tconst save = parseSaveWithoutErrors();\n\t\tconst firstObjectInSave = Object.values(save!.levels).flatMap(level => level.objects).find(obj => obj.instanceName === 'Persistent_Level:PersistentLevel.BP_EnemySpawner371');\n\n\t\texpect(save).toBeDefined();\n\t\texpect(firstObjectInSave).toBeDefined();\n\t\texpect(firstObjectInSave!.trailingData.length).toEqual(475);\n\t\texpect(Object.entries(firstObjectInSave!.properties).length).toEqual(0);\n\t});\n});"]}
@@ -1 +1 @@
1
- window.hierarchyData = "eJyVlk+P2yAQxb8LZ7Y1GGPj465W6qHSVv17WOXgxJMurY0tTKpGq3z3iljJgpMUuOSQvPH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