fortnite-replay-analysis 1.0.1 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fortnite-replay-analysis",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Fortniteのリプレイ解析をNode.jsから呼べる自己完結型C#バイナリラッパー",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,6 +20,11 @@
20
20
  ],
21
21
  "author": "yuyutti",
22
22
  "license": "MIT",
23
+ "files": [
24
+ "index.js",
25
+ "README.md",
26
+ "CSproj/bin/Release/net8.0/"
27
+ ],
23
28
  "dependencies": {
24
29
  "decimal.js": "^10.5.0"
25
30
  }
@@ -1,15 +0,0 @@
1
- <Project Sdk="Microsoft.NET.Sdk">
2
-
3
- <PropertyGroup>
4
- <OutputType>Exe</OutputType>
5
- <TargetFramework>net8.0</TargetFramework>
6
- <ImplicitUsings>enable</ImplicitUsings>
7
- <Nullable>enable</Nullable>
8
- </PropertyGroup>
9
-
10
- <ItemGroup>
11
- <PackageReference Include="FortniteReplayReader" Version="2.4.0" />
12
- <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
13
- </ItemGroup>
14
-
15
- </Project>
package/CSproj/Program.cs DELETED
@@ -1,36 +0,0 @@
1
- using System;
2
- using System.Threading.Tasks;
3
- using Newtonsoft.Json;
4
- using FortniteReplayReader;
5
-
6
- public class Startup
7
- {
8
- public static async Task<string> Invoke(string replayFile)
9
- {
10
- var reader = new ReplayReader();
11
- var replay = await Task.Run(() => reader.ReadReplay(replayFile));
12
- return JsonConvert.SerializeObject(replay.PlayerData, Formatting.Indented);
13
- }
14
-
15
- public static async Task Main(string[] args)
16
- {
17
- Console.OutputEncoding = System.Text.Encoding.UTF8;
18
-
19
- if (args.Length < 1)
20
- {
21
- Console.Error.WriteLine("Usage: dotnet run <replayFilePath>");
22
- Environment.Exit(1);
23
- }
24
-
25
- try
26
- {
27
- var playerDataJson = await Invoke(args[0]);
28
- Console.WriteLine(playerDataJson);
29
- }
30
- catch (Exception ex)
31
- {
32
- Console.Error.WriteLine("Error: " + ex.Message);
33
- Environment.Exit(1);
34
- }
35
- }
36
- }
package/test.js DELETED
@@ -1,21 +0,0 @@
1
- const path = require('path');
2
- const fs = require('fs');
3
- const { ReplayAnalysis } = require('./index.js');
4
-
5
- (async () => {
6
- try {
7
- const replayFilePath = path.resolve(__dirname, 'replay', 'conoma-custam.replay'); // 実際のreplayファイルパス
8
- const result = await ReplayAnalysis(replayFilePath, { bot: true, sort: true });
9
- // jsoutputフォルダに出力
10
- const outputDir = path.join(__dirname, 'jsoutput');
11
- fs.mkdirSync(outputDir, { recursive: true });
12
- const rawPath = path.join(outputDir, 'rawPlayerData.json');
13
- const processedPath = path.join(outputDir, 'processedPlayerInfo.json');
14
-
15
- fs.writeFileSync(rawPath, JSON.stringify(result.rawPlayerData, null, 4), 'utf8');
16
- fs.writeFileSync(processedPath, JSON.stringify(result.processedPlayerInfo, null, 4), 'utf8');
17
-
18
- } catch (error) {
19
- console.error('エラー:', error);
20
- }
21
- })();