@quenty/templateprovider 11.56.1 → 11.57.0
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,12 @@
|
|
|
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.57.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@11.56.1...@quenty/templateprovider@11.57.0) (2026-11-24)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Add HasTemplate API ([3fb60ec](https://github.com/Quenty/NevermoreEngine/commit/3fb60ec1116c7f6222a3480573d7358eff119200))
|
|
11
|
+
|
|
6
12
|
## [11.56.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@11.56.0...@quenty/templateprovider@11.56.1) (2026-11-18)
|
|
7
13
|
|
|
8
14
|
**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.
|
|
3
|
+
"version": "11.57.0",
|
|
4
4
|
"description": "Base of a template retrieval system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@quenty/loader": "10.11.3",
|
|
40
40
|
"@quenty/maid": "3.12.4",
|
|
41
41
|
"@quenty/nevermore-test-runner": "1.6.4",
|
|
42
|
-
"@quenty/observablecollection": "12.
|
|
42
|
+
"@quenty/observablecollection": "12.56.0",
|
|
43
43
|
"@quenty/playermock": "1.11.2",
|
|
44
44
|
"@quenty/promise": "10.25.2",
|
|
45
45
|
"@quenty/promisemaid": "5.25.2",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "191a328ce40545ac6fb0282d33dde5b0576494e6"
|
|
58
58
|
}
|
|
@@ -870,6 +870,19 @@ function TemplateProvider.IsTemplateAvailable(self: TemplateProvider, templateNa
|
|
|
870
870
|
return self._templateMapList:GetItemForKeyAtIndex(templateName, -1) ~= nil
|
|
871
871
|
end
|
|
872
872
|
|
|
873
|
+
--[=[
|
|
874
|
+
Returns whether or not a template exists, including templates the server has not yet replicated
|
|
875
|
+
to the client. Use [TemplateProvider.PromiseTemplate] to retrieve it.
|
|
876
|
+
|
|
877
|
+
@param templateName string
|
|
878
|
+
@return boolean
|
|
879
|
+
]=]
|
|
880
|
+
function TemplateProvider.HasTemplate(self: TemplateProvider, templateName: string): boolean
|
|
881
|
+
assert(type(templateName) == "string", "Bad templateName")
|
|
882
|
+
|
|
883
|
+
return self:_findTemplateOrTombstone(templateName) ~= nil
|
|
884
|
+
end
|
|
885
|
+
|
|
873
886
|
--[=[
|
|
874
887
|
Returns all current registered items.
|
|
875
888
|
|
|
@@ -758,6 +758,19 @@ describe("TemplateProvider across a server and a client", function()
|
|
|
758
758
|
controller:Destroy()
|
|
759
759
|
end)
|
|
760
760
|
|
|
761
|
+
it("reports unreplicated templates as existing on the client", function()
|
|
762
|
+
local controller = setup()
|
|
763
|
+
local root = controller.newInstance("Folder", "Templates")
|
|
764
|
+
controller.newInstance("Model", "Sword", root)
|
|
765
|
+
local realms = controller.newRealms(root)
|
|
766
|
+
|
|
767
|
+
expect(realms.client:HasTemplate("Sword")).toBe(true)
|
|
768
|
+
expect(realms.client:HasTemplate("Missing")).toBe(false)
|
|
769
|
+
expect(realms.server:HasTemplate("Sword")).toBe(true)
|
|
770
|
+
|
|
771
|
+
controller:Destroy()
|
|
772
|
+
end)
|
|
773
|
+
|
|
761
774
|
it("hands the container its templates back when the server provider is destroyed", function()
|
|
762
775
|
local controller = setup()
|
|
763
776
|
local root = controller.newInstance("Folder", "Templates")
|