@quenty/receiptprocessing 7.17.0 → 7.17.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/CHANGELOG.md +8 -0
- package/package.json +6 -6
- package/src/Server/ReceiptProcessingService.lua +24 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.17.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/receiptprocessing@7.17.0...@quenty/receiptprocessing@7.17.1) (2025-03-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/receiptprocessing
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [7.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/receiptprocessing@7.16.0...@quenty/receiptprocessing@7.17.0) (2025-02-18)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/receiptprocessing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/receiptprocessing",
|
|
3
|
-
"version": "7.17.
|
|
3
|
+
"version": "7.17.1",
|
|
4
4
|
"description": "Centralize receipt processing within games since this is a constrained resource.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"@quenty/enumutils": "^3.4.0",
|
|
29
29
|
"@quenty/loader": "^10.8.0",
|
|
30
30
|
"@quenty/maid": "^3.4.0",
|
|
31
|
-
"@quenty/promise": "^10.10.
|
|
32
|
-
"@quenty/rx": "^13.16.
|
|
33
|
-
"@quenty/servicebag": "^11.11.
|
|
31
|
+
"@quenty/promise": "^10.10.1",
|
|
32
|
+
"@quenty/rx": "^13.16.1",
|
|
33
|
+
"@quenty/servicebag": "^11.11.1",
|
|
34
34
|
"@quenty/signal": "^7.10.0",
|
|
35
|
-
"@quenty/valueobject": "^13.16.
|
|
35
|
+
"@quenty/valueobject": "^13.16.1"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
|
|
41
41
|
}
|
|
@@ -57,7 +57,7 @@ end
|
|
|
57
57
|
@param player Player
|
|
58
58
|
@return Observable<ReceiptInfo>
|
|
59
59
|
]=]
|
|
60
|
-
function ReceiptProcessingService:ObserveReceiptProcessedForPlayer(player)
|
|
60
|
+
function ReceiptProcessingService:ObserveReceiptProcessedForPlayer(player: Player)
|
|
61
61
|
assert(typeof(player) == "Instance" and player:IsA("Player"), "Bad player")
|
|
62
62
|
|
|
63
63
|
return self:ObserveReceiptProcessedForUserId(player.UserId)
|
|
@@ -68,7 +68,7 @@ end
|
|
|
68
68
|
@param userId number
|
|
69
69
|
@return Observable<ReceiptInfo>
|
|
70
70
|
]=]
|
|
71
|
-
function ReceiptProcessingService:ObserveReceiptProcessedForUserId(userId)
|
|
71
|
+
function ReceiptProcessingService:ObserveReceiptProcessedForUserId(userId: number)
|
|
72
72
|
assert(type(userId) == "number", "Bad userId")
|
|
73
73
|
|
|
74
74
|
return self._receiptProcessedForUserId:Observe(userId)
|
|
@@ -87,10 +87,10 @@ function ReceiptProcessingService:RegisterReceiptProcessor(processor, priority)
|
|
|
87
87
|
priority = priority or 0
|
|
88
88
|
|
|
89
89
|
local data = {
|
|
90
|
-
traceback = debug.traceback()
|
|
91
|
-
priority = priority
|
|
92
|
-
timestamp = os.clock()
|
|
93
|
-
processor = processor
|
|
90
|
+
traceback = debug.traceback(),
|
|
91
|
+
priority = priority,
|
|
92
|
+
timestamp = os.clock(),
|
|
93
|
+
processor = processor,
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
table.insert(self._processors, data)
|
|
@@ -114,7 +114,9 @@ end
|
|
|
114
114
|
|
|
115
115
|
function ReceiptProcessingService:_handleProcessReceiptAsync(receiptInfo)
|
|
116
116
|
if not self._processors then
|
|
117
|
-
warn(
|
|
117
|
+
warn(
|
|
118
|
+
"[ReceiptProcessingService._handleProcessReceiptAsync] - We're leaking memory. Receipt processing service is already cleaned up."
|
|
119
|
+
)
|
|
118
120
|
return Enum.ProductPurchaseDecision.NotProcessedYet
|
|
119
121
|
end
|
|
120
122
|
|
|
@@ -128,7 +130,13 @@ function ReceiptProcessingService:_handleProcessReceiptAsync(receiptInfo)
|
|
|
128
130
|
if Promise.isPromise(result) then
|
|
129
131
|
local ok, promiseResult = result:Yield()
|
|
130
132
|
if not ok then
|
|
131
|
-
warn(
|
|
133
|
+
warn(
|
|
134
|
+
string.format(
|
|
135
|
+
"[ReceiptProcessingService._handleProcessReceiptAsync] - Promise failed with %q.\n%s",
|
|
136
|
+
tostring(promiseResult),
|
|
137
|
+
data.traceback
|
|
138
|
+
)
|
|
139
|
+
)
|
|
132
140
|
continue
|
|
133
141
|
end
|
|
134
142
|
|
|
@@ -141,7 +149,13 @@ function ReceiptProcessingService:_handleProcessReceiptAsync(receiptInfo)
|
|
|
141
149
|
elseif result == nil then
|
|
142
150
|
continue
|
|
143
151
|
else
|
|
144
|
-
warn(
|
|
152
|
+
warn(
|
|
153
|
+
string.format(
|
|
154
|
+
"[ReceiptProcessingService._handleProcessReceiptAsync] - Got unexpected result of type %q from receiptInfo.\n%s",
|
|
155
|
+
typeof(result),
|
|
156
|
+
data.traceback
|
|
157
|
+
)
|
|
158
|
+
)
|
|
145
159
|
end
|
|
146
160
|
end
|
|
147
161
|
|
|
@@ -167,4 +181,4 @@ function ReceiptProcessingService:Destroy()
|
|
|
167
181
|
self._processors = nil
|
|
168
182
|
end
|
|
169
183
|
|
|
170
|
-
return ReceiptProcessingService
|
|
184
|
+
return ReceiptProcessingService
|