@quenty/templateprovider 11.23.3 → 11.23.4
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 +11 -11
- package/src/Shared/TemplateProvider.lua +14 -10
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
|
+
## [11.23.4](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@11.23.3...@quenty/templateprovider@11.23.4) (2025-12-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Update typing to be more accurate ([e4c3d05](https://github.com/Quenty/NevermoreEngine/commit/e4c3d05a0aa9f45a37cbfa372c5e0d8a748c9323))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [11.23.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@11.23.2...@quenty/templateprovider@11.23.3) (2025-12-28)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/templateprovider
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/templateprovider",
|
|
3
|
-
"version": "11.23.
|
|
3
|
+
"version": "11.23.4",
|
|
4
4
|
"description": "Base of a template retrieval system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@quenty/baseobject": "^10.9.0",
|
|
29
|
-
"@quenty/brio": "^14.20.
|
|
30
|
-
"@quenty/collectionserviceutils": "^8.21.
|
|
29
|
+
"@quenty/brio": "^14.20.2",
|
|
30
|
+
"@quenty/collectionserviceutils": "^8.21.2",
|
|
31
31
|
"@quenty/ducktype": "^5.9.0",
|
|
32
|
-
"@quenty/insertserviceutils": "^10.12.
|
|
33
|
-
"@quenty/instanceutils": "^13.20.
|
|
32
|
+
"@quenty/insertserviceutils": "^10.12.1",
|
|
33
|
+
"@quenty/instanceutils": "^13.20.3",
|
|
34
34
|
"@quenty/loader": "^10.9.0",
|
|
35
35
|
"@quenty/maid": "^3.5.0",
|
|
36
|
-
"@quenty/observablecollection": "^12.24.
|
|
37
|
-
"@quenty/promise": "^10.12.
|
|
38
|
-
"@quenty/promisemaid": "^5.12.
|
|
39
|
-
"@quenty/remoting": "^12.21.
|
|
40
|
-
"@quenty/rx": "^13.20.
|
|
36
|
+
"@quenty/observablecollection": "^12.24.4",
|
|
37
|
+
"@quenty/promise": "^10.12.1",
|
|
38
|
+
"@quenty/promisemaid": "^5.12.1",
|
|
39
|
+
"@quenty/remoting": "^12.21.3",
|
|
40
|
+
"@quenty/rx": "^13.20.1",
|
|
41
41
|
"@quenty/string": "^3.3.3",
|
|
42
42
|
"@quenty/table": "^3.8.0"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "e4614dfea3bf2580ec2b10552c311b273ed1387c"
|
|
48
48
|
}
|
|
@@ -84,7 +84,7 @@ export type TemplateProvider = typeof(setmetatable(
|
|
|
84
84
|
_maid: Maid.Maid,
|
|
85
85
|
_templateMapList: any, -- ObservableMapList.ObservableMapList<Instance>,
|
|
86
86
|
_unreplicatedTemplateMapList: any, -- ObservableMapList.ObservableMapList<Instance>,
|
|
87
|
-
_containerRootCountingMap: ObservableCountingMap.ObservableCountingMap<Instance>,
|
|
87
|
+
_containerRootCountingMap: any, -- ObservableCountingMap.ObservableCountingMap<Instance>,
|
|
88
88
|
_remoting: Remoting.Remoting,
|
|
89
89
|
_tombstoneLookup: { [string]: Instance },
|
|
90
90
|
_pendingTemplatePromises: { [string]: Promise.Promise<Instance> },
|
|
@@ -136,7 +136,7 @@ end
|
|
|
136
136
|
|
|
137
137
|
@param serviceBag ServiceBag
|
|
138
138
|
]=]
|
|
139
|
-
function TemplateProvider.Init(self: TemplateProvider, serviceBag: ServiceBag.ServiceBag)
|
|
139
|
+
function TemplateProvider.Init(self: TemplateProvider, serviceBag: ServiceBag.ServiceBag): ()
|
|
140
140
|
assert(not self._serviceBag, "Already initialized")
|
|
141
141
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
142
142
|
self._maid = Maid.new()
|
|
@@ -153,7 +153,7 @@ function TemplateProvider.Init(self: TemplateProvider, serviceBag: ServiceBag.Se
|
|
|
153
153
|
self:_setupTemplateCache()
|
|
154
154
|
end
|
|
155
155
|
|
|
156
|
-
function TemplateProvider._setupTemplateCache(self: TemplateProvider)
|
|
156
|
+
function TemplateProvider._setupTemplateCache(self: TemplateProvider): ()
|
|
157
157
|
if self._replicationMode == TemplateReplicationModes.SERVER then
|
|
158
158
|
self._tombstoneLookup = {}
|
|
159
159
|
self._remoting = self._maid:Add(Remoting.Server.new(ReplicatedStorage, self.ServiceName .. "TemplateProvider"))
|
|
@@ -208,7 +208,7 @@ function TemplateProvider._setupTemplateCache(self: TemplateProvider)
|
|
|
208
208
|
end))
|
|
209
209
|
end
|
|
210
210
|
|
|
211
|
-
function TemplateProvider._handleContainer(self: TemplateProvider, containerMaid: Maid.Maid, container: Instance)
|
|
211
|
+
function TemplateProvider._handleContainer(self: TemplateProvider, containerMaid: Maid.Maid, container: Instance): ()
|
|
212
212
|
if
|
|
213
213
|
self._replicationMode == TemplateReplicationModes.SERVER
|
|
214
214
|
and not container:IsA("Camera")
|
|
@@ -257,7 +257,7 @@ function TemplateProvider._replicateTombstones(
|
|
|
257
257
|
topMaid: Maid.Maid,
|
|
258
258
|
unreplicatedParent,
|
|
259
259
|
replicatedParent
|
|
260
|
-
)
|
|
260
|
+
): ()
|
|
261
261
|
assert(self._replicationMode == TemplateReplicationModes.SERVER, "Only should be invoked on server")
|
|
262
262
|
|
|
263
263
|
-- Tombstone each child so the client knows what is replicated
|
|
@@ -566,7 +566,7 @@ function TemplateProvider.AddTemplates(self: TemplateProvider, container: Templa
|
|
|
566
566
|
elseif Observable.isObservable(container) then
|
|
567
567
|
local topMaid = Maid.new()
|
|
568
568
|
|
|
569
|
-
self:_addObservableTemplates(topMaid, container)
|
|
569
|
+
self:_addObservableTemplates(topMaid, container :: any)
|
|
570
570
|
|
|
571
571
|
self._maid[topMaid] = topMaid
|
|
572
572
|
topMaid:GiveTask(function()
|
|
@@ -607,7 +607,11 @@ function TemplateProvider.AddTemplates(self: TemplateProvider, container: Templa
|
|
|
607
607
|
end
|
|
608
608
|
end
|
|
609
609
|
|
|
610
|
-
function TemplateProvider._addObservableTemplates(
|
|
610
|
+
function TemplateProvider._addObservableTemplates(
|
|
611
|
+
self: TemplateProvider,
|
|
612
|
+
topMaid: Maid.Maid,
|
|
613
|
+
observable: Observable.Observable<Brio.Brio<Instance>>
|
|
614
|
+
): ()
|
|
611
615
|
topMaid:GiveTask(observable:Subscribe(function(result)
|
|
612
616
|
if Brio.isBrio(result) then
|
|
613
617
|
if result:IsDead() then
|
|
@@ -626,7 +630,7 @@ function TemplateProvider._addObservableTemplates(self: TemplateProvider, topMai
|
|
|
626
630
|
end))
|
|
627
631
|
end
|
|
628
632
|
|
|
629
|
-
function TemplateProvider._addInstanceTemplate(self: TemplateProvider, topMaid: Maid.Maid, template: Instance)
|
|
633
|
+
function TemplateProvider._addInstanceTemplate(self: TemplateProvider, topMaid: Maid.Maid, template: Instance): ()
|
|
630
634
|
if self:_shouldAddChildrenAsTemplates(template) then
|
|
631
635
|
topMaid:GiveTask(self._containerRootCountingMap:Add(template))
|
|
632
636
|
end
|
|
@@ -658,7 +662,7 @@ end
|
|
|
658
662
|
@param templateName string
|
|
659
663
|
@return boolean
|
|
660
664
|
]=]
|
|
661
|
-
function TemplateProvider.IsTemplateAvailable(self: TemplateProvider, templateName: string)
|
|
665
|
+
function TemplateProvider.IsTemplateAvailable(self: TemplateProvider, templateName: string): boolean
|
|
662
666
|
assert(type(templateName) == "string", "Bad templateName")
|
|
663
667
|
|
|
664
668
|
return self._templateMapList:GetItemForKeyAtIndex(templateName, -1) ~= nil
|
|
@@ -707,7 +711,7 @@ TemplateProvider.GetAll = assert(TemplateProvider.GetTemplateList, "Missing meth
|
|
|
707
711
|
--[=[
|
|
708
712
|
Cleans up the provider
|
|
709
713
|
]=]
|
|
710
|
-
function TemplateProvider.Destroy(self: TemplateProvider)
|
|
714
|
+
function TemplateProvider.Destroy(self: TemplateProvider): ()
|
|
711
715
|
self._maid:DoCleaning()
|
|
712
716
|
end
|
|
713
717
|
|