@quenty/templateprovider 11.55.1 → 11.56.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
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
|
+
## [11.56.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@11.56.0...@quenty/templateprovider@11.56.1) (2026-11-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
9
|
+
|
|
10
|
+
# [11.56.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@11.55.1...@quenty/templateprovider@11.56.0) (2026-10-24)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
13
|
+
|
|
6
14
|
## [11.55.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@11.55.0...@quenty/templateprovider@11.55.1) (2026-10-20)
|
|
7
15
|
|
|
8
16
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/templateprovider",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.56.1",
|
|
4
4
|
"description": "Base of a template retrieval system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,31 +28,31 @@
|
|
|
28
28
|
"Quenty"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@quenty/baseobject": "10.16.
|
|
32
|
-
"@quenty/brio": "14.38.
|
|
33
|
-
"@quenty/collectionserviceutils": "8.39.
|
|
31
|
+
"@quenty/baseobject": "10.16.4",
|
|
32
|
+
"@quenty/brio": "14.38.2",
|
|
33
|
+
"@quenty/collectionserviceutils": "8.39.2",
|
|
34
34
|
"@quenty/ducktype": "5.11.3",
|
|
35
35
|
"@quenty/enums": "1.3.3",
|
|
36
|
-
"@quenty/insertserviceutils": "10.25.
|
|
37
|
-
"@quenty/instanceutils": "13.38.
|
|
38
|
-
"@quenty/jestutils": "1.1.
|
|
36
|
+
"@quenty/insertserviceutils": "10.25.2",
|
|
37
|
+
"@quenty/instanceutils": "13.38.2",
|
|
38
|
+
"@quenty/jestutils": "1.1.4",
|
|
39
39
|
"@quenty/loader": "10.11.3",
|
|
40
|
-
"@quenty/maid": "3.12.
|
|
41
|
-
"@quenty/nevermore-test-runner": "1.6.
|
|
42
|
-
"@quenty/observablecollection": "12.
|
|
43
|
-
"@quenty/playermock": "1.11.
|
|
44
|
-
"@quenty/promise": "10.25.
|
|
45
|
-
"@quenty/promisemaid": "5.25.
|
|
46
|
-
"@quenty/remoting": "12.46.
|
|
47
|
-
"@quenty/rx": "13.35.
|
|
48
|
-
"@quenty/servicebag": "11.21.
|
|
49
|
-
"@quenty/string": "3.5.
|
|
40
|
+
"@quenty/maid": "3.12.4",
|
|
41
|
+
"@quenty/nevermore-test-runner": "1.6.4",
|
|
42
|
+
"@quenty/observablecollection": "12.55.1",
|
|
43
|
+
"@quenty/playermock": "1.11.2",
|
|
44
|
+
"@quenty/promise": "10.25.2",
|
|
45
|
+
"@quenty/promisemaid": "5.25.2",
|
|
46
|
+
"@quenty/remoting": "12.46.2",
|
|
47
|
+
"@quenty/rx": "13.35.2",
|
|
48
|
+
"@quenty/servicebag": "11.21.4",
|
|
49
|
+
"@quenty/string": "3.5.4",
|
|
50
50
|
"@quenty/table": "3.9.2",
|
|
51
|
-
"@quenty/tie": "10.52.
|
|
52
|
-
"@quentystudios/jest-lua": "3.10.0-quenty.
|
|
51
|
+
"@quenty/tie": "10.52.2",
|
|
52
|
+
"@quentystudios/jest-lua": "3.10.0-quenty.3"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "f51b2de38a02f8d92758da8d381a378e760170aa"
|
|
58
58
|
}
|
|
@@ -12,7 +12,6 @@ local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
|
|
12
12
|
local Jest = require("Jest")
|
|
13
13
|
local JestUtils = require("JestUtils")
|
|
14
14
|
local Maid = require("Maid")
|
|
15
|
-
local PromiseTestUtils = require("PromiseTestUtils")
|
|
16
15
|
local ServiceBag = require("ServiceBag")
|
|
17
16
|
local TaggedTemplateProvider = require("TaggedTemplateProvider")
|
|
18
17
|
local TemplateProvider = require("TemplateProvider")
|
|
@@ -101,14 +100,10 @@ describe("TaggedTemplateProvider.new", function()
|
|
|
101
100
|
local provider = controller.newProvider()
|
|
102
101
|
|
|
103
102
|
local sword = controller.newTagged("Model", "Sword")
|
|
104
|
-
expect(
|
|
105
|
-
return provider:GetTemplate("Sword") == sword
|
|
106
|
-
end)).toBe(true)
|
|
103
|
+
expect(provider:GetTemplate("Sword") == sword).toBe(true)
|
|
107
104
|
|
|
108
105
|
CollectionService:RemoveTag(sword, controller.tagName)
|
|
109
|
-
expect(
|
|
110
|
-
return provider:GetTemplate("Sword") == nil
|
|
111
|
-
end)).toBe(true)
|
|
106
|
+
expect(provider:GetTemplate("Sword")).toBeNil()
|
|
112
107
|
|
|
113
108
|
controller:Destroy()
|
|
114
109
|
end)
|
|
@@ -15,6 +15,7 @@ local Observable = require("Observable")
|
|
|
15
15
|
local PlayerMockService = require("PlayerMockService")
|
|
16
16
|
local PlayerMockServiceClient = require("PlayerMockServiceClient")
|
|
17
17
|
local PromiseTestUtils = require("PromiseTestUtils")
|
|
18
|
+
local RxTestUtils = require("RxTestUtils")
|
|
18
19
|
local ServiceBag = require("ServiceBag")
|
|
19
20
|
local TemplateProvider = require("TemplateProvider")
|
|
20
21
|
local TieRealmService = require("TieRealmService")
|
|
@@ -36,7 +37,7 @@ type Controller = {
|
|
|
36
37
|
newInstance: (className: string, name: string, parent: Instance?) -> Instance,
|
|
37
38
|
newMaid: () -> Maid.Maid,
|
|
38
39
|
newBrioObservable: (template: Instance) -> Observable.Observable<Brio.Brio<Instance>>,
|
|
39
|
-
|
|
40
|
+
maid: Maid.Maid,
|
|
40
41
|
Destroy: (self: Controller) -> (),
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -117,13 +118,7 @@ local function setup(): Controller
|
|
|
117
118
|
end) :: any
|
|
118
119
|
end,
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
local emissions = {}
|
|
122
|
-
maid:GiveTask(observable:Subscribe(function(value)
|
|
123
|
-
table.insert(emissions, value)
|
|
124
|
-
end))
|
|
125
|
-
return emissions
|
|
126
|
-
end,
|
|
121
|
+
maid = maid,
|
|
127
122
|
|
|
128
123
|
Destroy = function(_self)
|
|
129
124
|
maid:DoCleaning()
|
|
@@ -258,9 +253,7 @@ describe("TemplateProvider.GetTemplate", function()
|
|
|
258
253
|
|
|
259
254
|
local sword = controller.newInstance("Model", "Sword", root)
|
|
260
255
|
|
|
261
|
-
expect(
|
|
262
|
-
return provider:GetTemplate("Sword") == sword
|
|
263
|
-
end)).toBe(true)
|
|
256
|
+
expect(provider:GetTemplate("Sword") == sword).toBe(true)
|
|
264
257
|
|
|
265
258
|
controller:Destroy()
|
|
266
259
|
end)
|
|
@@ -273,9 +266,7 @@ describe("TemplateProvider.GetTemplate", function()
|
|
|
273
266
|
|
|
274
267
|
sword.Parent = nil
|
|
275
268
|
|
|
276
|
-
expect(
|
|
277
|
-
return provider:GetTemplate("Sword") == nil
|
|
278
|
-
end)).toBe(true)
|
|
269
|
+
expect(provider:GetTemplate("Sword")).toBeNil()
|
|
279
270
|
|
|
280
271
|
controller:Destroy()
|
|
281
272
|
end)
|
|
@@ -288,9 +279,7 @@ describe("TemplateProvider.GetTemplate", function()
|
|
|
288
279
|
|
|
289
280
|
sword.Name = "Blade"
|
|
290
281
|
|
|
291
|
-
expect(
|
|
292
|
-
return provider:GetTemplate("Blade") == sword and provider:GetTemplate("Sword") == nil
|
|
293
|
-
end)).toBe(true)
|
|
282
|
+
expect(provider:GetTemplate("Blade") == sword and provider:GetTemplate("Sword") == nil).toBe(true)
|
|
294
283
|
|
|
295
284
|
controller:Destroy()
|
|
296
285
|
end)
|
|
@@ -537,6 +526,31 @@ describe("TemplateProvider.AddTemplates", function()
|
|
|
537
526
|
controller:Destroy()
|
|
538
527
|
end)
|
|
539
528
|
|
|
529
|
+
it("provides every initial container when their folders become containers too", function()
|
|
530
|
+
local controller = setup()
|
|
531
|
+
|
|
532
|
+
-- The skip depends on where containers hash, so one provider rarely shows it
|
|
533
|
+
for _ = 1, 30 do
|
|
534
|
+
local containers = {}
|
|
535
|
+
for index = 1, 5 do
|
|
536
|
+
local container = controller.newInstance("Configuration", `Container{index}`)
|
|
537
|
+
controller.newInstance("ModuleScript", `Template{index}`, container)
|
|
538
|
+
for folderIndex = 1, 3 do
|
|
539
|
+
controller.newInstance("Folder", `Folder{folderIndex}`, container)
|
|
540
|
+
end
|
|
541
|
+
table.insert(containers, container)
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
local provider = controller.newProvider(containers)
|
|
545
|
+
|
|
546
|
+
for index = 1, 5 do
|
|
547
|
+
expect(provider:GetTemplate(`Template{index}`)).never.toBeNil()
|
|
548
|
+
end
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
controller:Destroy()
|
|
552
|
+
end)
|
|
553
|
+
|
|
540
554
|
it("rejects a table entry that is not an instance or observable", function()
|
|
541
555
|
local controller = setup()
|
|
542
556
|
local provider = controller.newProvider({})
|
|
@@ -571,8 +585,8 @@ describe("TemplateProvider.GetTemplateList", function()
|
|
|
571
585
|
local list = provider:GetTemplateList()
|
|
572
586
|
|
|
573
587
|
expect(#list).toBe(2)
|
|
574
|
-
expect(
|
|
575
|
-
expect(
|
|
588
|
+
expect(list).toContain(weapons)
|
|
589
|
+
expect(list).toContain(sword)
|
|
576
590
|
|
|
577
591
|
controller:Destroy()
|
|
578
592
|
end)
|
|
@@ -598,8 +612,8 @@ describe("TemplateProvider.GetContainerList", function()
|
|
|
598
612
|
local list = provider:GetContainerList()
|
|
599
613
|
|
|
600
614
|
expect(#list).toBe(2)
|
|
601
|
-
expect(
|
|
602
|
-
expect(
|
|
615
|
+
expect(list).toContain(root)
|
|
616
|
+
expect(list).toContain(weapons)
|
|
603
617
|
|
|
604
618
|
controller:Destroy()
|
|
605
619
|
end)
|
|
@@ -670,7 +684,7 @@ describe("TemplateProvider.ObserveChildTemplateNameList", function()
|
|
|
670
684
|
local controller = setup()
|
|
671
685
|
local provider = controller.newProvider({})
|
|
672
686
|
|
|
673
|
-
local emissions = controller.
|
|
687
|
+
local emissions = RxTestUtils.collectList(controller.maid, provider:ObserveChildTemplateNameList("Weapons"))
|
|
674
688
|
|
|
675
689
|
expect(emissions).toEqual({ {} })
|
|
676
690
|
|
|
@@ -684,7 +698,7 @@ describe("TemplateProvider.ObserveChildTemplateNameList", function()
|
|
|
684
698
|
controller.newInstance("Model", "Sword", weapons)
|
|
685
699
|
local provider = controller.newProvider({})
|
|
686
700
|
|
|
687
|
-
local emissions = controller.
|
|
701
|
+
local emissions = RxTestUtils.collectList(controller.maid, provider:ObserveChildTemplateNameList("Weapons"))
|
|
688
702
|
controller.newMaid():GiveTask(provider:AddTemplates(root))
|
|
689
703
|
|
|
690
704
|
expect(emissions).toEqual({ {}, { "Sword" } })
|
|
@@ -699,18 +713,14 @@ describe("TemplateProvider.ObserveChildTemplateNameList", function()
|
|
|
699
713
|
local sword = controller.newInstance("Model", "Sword", weapons)
|
|
700
714
|
local provider = controller.newProvider(root)
|
|
701
715
|
|
|
702
|
-
local emissions = controller.
|
|
716
|
+
local emissions = RxTestUtils.collectList(controller.maid, provider:ObserveChildTemplateNameList("Weapons"))
|
|
703
717
|
|
|
704
718
|
controller.newInstance("Model", "Bow", weapons)
|
|
705
|
-
expect(
|
|
706
|
-
return #emissions == 2
|
|
707
|
-
end)).toBe(true)
|
|
719
|
+
expect(#emissions).toEqual(2)
|
|
708
720
|
expect(sorted(emissions[2])).toEqual({ "Bow", "Sword" })
|
|
709
721
|
|
|
710
722
|
sword.Parent = nil
|
|
711
|
-
expect(
|
|
712
|
-
return #emissions == 3
|
|
713
|
-
end)).toBe(true)
|
|
723
|
+
expect(#emissions).toEqual(3)
|
|
714
724
|
expect(emissions[3]).toEqual({ "Bow" })
|
|
715
725
|
|
|
716
726
|
controller:Destroy()
|
|
@@ -723,11 +733,9 @@ describe("TemplateProvider.ObserveChildTemplateNameList", function()
|
|
|
723
733
|
local sword = controller.newInstance("Model", "Sword", weapons)
|
|
724
734
|
local provider = controller.newProvider(root)
|
|
725
735
|
|
|
726
|
-
local emissions = controller.
|
|
736
|
+
local emissions = RxTestUtils.collectList(controller.maid, provider:ObserveChildTemplateNameList("Weapons"))
|
|
727
737
|
local handle = controller.newInstance("Part", "Handle", sword)
|
|
728
738
|
handle.Parent = nil
|
|
729
|
-
task.wait()
|
|
730
|
-
task.wait()
|
|
731
739
|
|
|
732
740
|
expect(emissions).toEqual({ { "Sword" } })
|
|
733
741
|
|
|
@@ -795,9 +803,7 @@ describe("TemplateProvider across a server and a client", function()
|
|
|
795
803
|
expect(template).never.toBe(sword)
|
|
796
804
|
expect(template.Name).toBe("Sword")
|
|
797
805
|
expect(template:FindFirstChild("Handle")).never.toBeNil()
|
|
798
|
-
expect(
|
|
799
|
-
return realms.client:GetTemplate("Sword") == template
|
|
800
|
-
end)).toBe(true)
|
|
806
|
+
expect(realms.client:GetTemplate("Sword") == template).toBe(true)
|
|
801
807
|
|
|
802
808
|
controller:Destroy()
|
|
803
809
|
end)
|
|
@@ -883,18 +889,15 @@ describe("TemplateProvider across a server and a client", function()
|
|
|
883
889
|
local sword = controller.newInstance("Model", "Sword", weapons)
|
|
884
890
|
local realms = controller.newRealms(root)
|
|
885
891
|
|
|
886
|
-
local emissions =
|
|
892
|
+
local emissions =
|
|
893
|
+
RxTestUtils.collectList(controller.maid, realms.client:ObserveChildTemplateNameList("Weapons"))
|
|
887
894
|
expect(emissions).toEqual({ { "Sword" } })
|
|
888
895
|
|
|
889
896
|
controller.newInstance("Model", "Bow", weapons)
|
|
890
|
-
expect(
|
|
891
|
-
return table.concat(sorted(emissions[#emissions]), ",") == "Bow,Sword"
|
|
892
|
-
end)).toBe(true)
|
|
897
|
+
expect(table.concat(sorted(emissions[#emissions]), ",")).toEqual("Bow,Sword")
|
|
893
898
|
|
|
894
899
|
sword:Destroy()
|
|
895
|
-
expect(
|
|
896
|
-
return table.concat(emissions[#emissions], ",") == "Bow"
|
|
897
|
-
end)).toBe(true)
|
|
900
|
+
expect(table.concat(emissions[#emissions], ",")).toEqual("Bow")
|
|
898
901
|
|
|
899
902
|
controller:Destroy()
|
|
900
903
|
end)
|