@quenty/bindtocloseservice 8.17.0 → 8.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 +11 -0
- package/package.json +8 -8
- package/src/Server/BindToCloseService.lua +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [8.17.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/bindtocloseservice@8.17.0...@quenty/bindtocloseservice@8.17.1) (2025-04-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [8.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/bindtocloseservice@8.16.2...@quenty/bindtocloseservice@8.17.0) (2025-04-02)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/bindtocloseservice
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/bindtocloseservice",
|
|
3
|
-
"version": "8.17.
|
|
3
|
+
"version": "8.17.1",
|
|
4
4
|
"description": "Bind to game close API in a centralized location.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@quenty/loader": "^10.8.
|
|
31
|
-
"@quenty/maid": "^3.4.
|
|
32
|
-
"@quenty/promise": "^10.10.
|
|
33
|
-
"@quenty/symbol": "^3.4.
|
|
30
|
+
"@quenty/loader": "^10.8.1",
|
|
31
|
+
"@quenty/maid": "^3.4.1",
|
|
32
|
+
"@quenty/promise": "^10.10.2",
|
|
33
|
+
"@quenty/symbol": "^3.4.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@quenty/contentproviderutils": "^12.17.
|
|
37
|
-
"@quenty/playerthumbnailutils": "^10.10.
|
|
36
|
+
"@quenty/contentproviderutils": "^12.17.1",
|
|
37
|
+
"@quenty/playerthumbnailutils": "^10.10.2"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
|
|
40
40
|
}
|
|
@@ -13,11 +13,12 @@ local PromiseUtils = require("PromiseUtils")
|
|
|
13
13
|
local Symbol = require("Symbol")
|
|
14
14
|
local Promise = require("Promise")
|
|
15
15
|
local Maid = require("Maid")
|
|
16
|
+
local _ServiceBag = require("ServiceBag")
|
|
16
17
|
|
|
17
18
|
local BindToCloseService = {}
|
|
18
19
|
BindToCloseService.ServiceName = "BindToCloseService"
|
|
19
20
|
|
|
20
|
-
function BindToCloseService:Init(serviceBag)
|
|
21
|
+
function BindToCloseService:Init(serviceBag: _ServiceBag.ServiceBag)
|
|
21
22
|
assert(not self._serviceBag, "Already initialized")
|
|
22
23
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
23
24
|
self._maid = Maid.new()
|
|
@@ -47,7 +48,7 @@ end
|
|
|
47
48
|
function BindToCloseService:_promiseClose()
|
|
48
49
|
local promises = {}
|
|
49
50
|
|
|
50
|
-
for _, caller in
|
|
51
|
+
for _, caller in self._subscriptions do
|
|
51
52
|
local promise = caller()
|
|
52
53
|
if Promise.isPromise(promise) then
|
|
53
54
|
table.insert(promises, promise)
|
|
@@ -65,7 +66,7 @@ end
|
|
|
65
66
|
@param saveCallback function
|
|
66
67
|
@return function -- Call to unregister callback
|
|
67
68
|
]=]
|
|
68
|
-
function BindToCloseService:RegisterPromiseOnCloseCallback(saveCallback)
|
|
69
|
+
function BindToCloseService:RegisterPromiseOnCloseCallback(saveCallback: () -> ())
|
|
69
70
|
assert(type(saveCallback) == "function", "Bad saveCallback")
|
|
70
71
|
|
|
71
72
|
local id = Symbol.named("savingCallbackId")
|