cz.xprees.event-logging 1.0.7 → 1.0.9
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.
|
@@ -39,9 +39,9 @@ namespace Xprees.EventLogging.Api
|
|
|
39
39
|
await request.SendWebRequestAsync(cancellationToken);
|
|
40
40
|
return request.result == UnityWebRequest.Result.Success;
|
|
41
41
|
}
|
|
42
|
-
catch
|
|
42
|
+
catch (Exception e)
|
|
43
43
|
{
|
|
44
|
-
|
|
44
|
+
Debug.LogError(e);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
return false;
|
|
@@ -49,18 +49,36 @@ namespace Xprees.EventLogging.Api
|
|
|
49
49
|
|
|
50
50
|
public async UniTask<bool> SendEventLog(EventLog log, CancellationToken cancellationToken = default)
|
|
51
51
|
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
try
|
|
53
|
+
{
|
|
54
|
+
var request = new UnityWebRequest(LogsUri, UnityWebRequest.kHttpVerbPOST);
|
|
55
|
+
request.AddJsonBody(log);
|
|
56
|
+
await request.SendWebRequestAsync(cancellationToken);
|
|
57
|
+
return request.result == UnityWebRequest.Result.Success;
|
|
58
|
+
}
|
|
59
|
+
catch (Exception e)
|
|
60
|
+
{
|
|
61
|
+
Debug.LogError(e);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return false;
|
|
56
65
|
}
|
|
57
66
|
|
|
58
67
|
public async UniTask<bool> SendEventLogsBatch(List<EventLog> logs, CancellationToken cancellationToken = default)
|
|
59
68
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
try
|
|
70
|
+
{
|
|
71
|
+
var batchRequest = new UnityWebRequest(LogsBatchUri, UnityWebRequest.kHttpVerbPOST);
|
|
72
|
+
batchRequest.AddJsonBody(logs);
|
|
73
|
+
await batchRequest.SendWebRequestAsync(cancellationToken);
|
|
74
|
+
return batchRequest.result == UnityWebRequest.Result.Success;
|
|
75
|
+
}
|
|
76
|
+
catch (Exception e)
|
|
77
|
+
{
|
|
78
|
+
Debug.LogError(e);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return false;
|
|
64
82
|
}
|
|
65
83
|
|
|
66
84
|
public async UniTask<string[]> GetScenarioNames(CancellationToken cancellationToken = default)
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: Publish to NPM registry
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
- release/*
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
publish-gpr:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
permissions:
|
|
13
|
-
contents: read
|
|
14
|
-
packages: write
|
|
15
|
-
environment: Production
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v4
|
|
18
|
-
- uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version: 20
|
|
21
|
-
- name: Version Patcher
|
|
22
|
-
uses: justalemon/VersionPatcher@v0.8
|
|
23
|
-
with:
|
|
24
|
-
version: 1.0.${{ github.run_number }}
|
|
25
|
-
npm-files: 'package.json'
|
|
26
|
-
- uses: JS-DevTools/npm-publish@v3
|
|
27
|
-
with:
|
|
28
|
-
token: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
29
|
-
access: public
|
|
30
|
-
tag: ${{ github.ref_name }}
|
|
31
|
-
ignore-scripts: true
|