@quenty/datastore 13.19.1 → 13.19.2
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 +10 -10
- package/src/Server/PlayerDataStoreService.lua +11 -16
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
|
+
## [13.19.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/datastore@13.19.1...@quenty/datastore@13.19.2) (2025-03-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/datastore
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [13.19.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/datastore@13.19.0...@quenty/datastore@13.19.1) (2025-03-20)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/datastore",
|
|
3
|
-
"version": "13.19.
|
|
3
|
+
"version": "13.19.2",
|
|
4
4
|
"description": "Quenty's Datastore implementation for Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,21 +27,21 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@quenty/baseobject": "^10.8.0",
|
|
30
|
-
"@quenty/bindtocloseservice": "^8.16.
|
|
30
|
+
"@quenty/bindtocloseservice": "^8.16.1",
|
|
31
31
|
"@quenty/loader": "^10.8.0",
|
|
32
32
|
"@quenty/maid": "^3.4.0",
|
|
33
|
-
"@quenty/math": "^2.7.
|
|
34
|
-
"@quenty/pagesutils": "^5.11.
|
|
35
|
-
"@quenty/promise": "^10.10.
|
|
36
|
-
"@quenty/rx": "^13.16.
|
|
37
|
-
"@quenty/servicebag": "^11.11.
|
|
33
|
+
"@quenty/math": "^2.7.1",
|
|
34
|
+
"@quenty/pagesutils": "^5.11.1",
|
|
35
|
+
"@quenty/promise": "^10.10.1",
|
|
36
|
+
"@quenty/rx": "^13.16.1",
|
|
37
|
+
"@quenty/servicebag": "^11.11.1",
|
|
38
38
|
"@quenty/signal": "^7.10.0",
|
|
39
39
|
"@quenty/symbol": "^3.4.0",
|
|
40
|
-
"@quenty/table": "^3.7.
|
|
41
|
-
"@quenty/valueobject": "^13.16.
|
|
40
|
+
"@quenty/table": "^3.7.1",
|
|
41
|
+
"@quenty/valueobject": "^13.16.1"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
|
|
47
47
|
}
|
|
@@ -79,11 +79,10 @@ end
|
|
|
79
79
|
@param player Player
|
|
80
80
|
@return Promise<DataStore>
|
|
81
81
|
]=]
|
|
82
|
-
function PlayerDataStoreService:PromiseDataStore(player)
|
|
83
|
-
return self:PromiseManager()
|
|
84
|
-
:
|
|
85
|
-
|
|
86
|
-
end)
|
|
82
|
+
function PlayerDataStoreService:PromiseDataStore(player: Player)
|
|
83
|
+
return self:PromiseManager():Then(function(manager)
|
|
84
|
+
return manager:GetDataStore(player)
|
|
85
|
+
end)
|
|
87
86
|
end
|
|
88
87
|
|
|
89
88
|
--[=[
|
|
@@ -92,10 +91,9 @@ end
|
|
|
92
91
|
@return Promise
|
|
93
92
|
]=]
|
|
94
93
|
function PlayerDataStoreService:PromiseAddRemovingCallback(callback)
|
|
95
|
-
return self:PromiseManager()
|
|
96
|
-
:
|
|
97
|
-
|
|
98
|
-
end)
|
|
94
|
+
return self:PromiseManager():Then(function(manager)
|
|
95
|
+
manager:AddRemovingCallback(callback)
|
|
96
|
+
end)
|
|
99
97
|
end
|
|
100
98
|
|
|
101
99
|
--[=[
|
|
@@ -112,12 +110,9 @@ function PlayerDataStoreService:PromiseManager()
|
|
|
112
110
|
return DataStorePromises.promiseDataStore(self._dataStoreName, self._dataStoreScope)
|
|
113
111
|
end)
|
|
114
112
|
:Then(function(dataStore)
|
|
115
|
-
local manager = self._maid:Add(PlayerDataStoreManager.new(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return tostring(player.UserId)
|
|
119
|
-
end,
|
|
120
|
-
true))
|
|
113
|
+
local manager = self._maid:Add(PlayerDataStoreManager.new(dataStore, function(player)
|
|
114
|
+
return tostring(player.UserId)
|
|
115
|
+
end, true))
|
|
121
116
|
|
|
122
117
|
-- A lot safer if we're hot reloading or need to monitor bind to close calls
|
|
123
118
|
self._maid:GiveTask(self._bindToCloseService:RegisterPromiseOnCloseCallback(function()
|
|
@@ -134,4 +129,4 @@ function PlayerDataStoreService:Destroy()
|
|
|
134
129
|
self._maid:DoCleaning()
|
|
135
130
|
end
|
|
136
131
|
|
|
137
|
-
return PlayerDataStoreService
|
|
132
|
+
return PlayerDataStoreService
|