@quenty/templateprovider 8.0.0-canary.331.7eefa75.0 → 8.0.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 +76 -1
- package/LICENSE.md +1 -1
- package/package.json +8 -8
- package/src/Shared/TemplateProvider.lua +19 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,82 @@
|
|
|
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.0.0
|
|
6
|
+
# [8.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.9.0...@quenty/templateprovider@8.0.0) (2023-10-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [7.9.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.8.0...@quenty/templateprovider@7.9.0) (2023-08-23)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [7.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.7.0...@quenty/templateprovider@7.8.0) (2023-07-28)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [7.7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.6.0...@quenty/templateprovider@7.7.0) (2023-06-17)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [7.6.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.5.1...@quenty/templateprovider@7.6.0) (2023-04-10)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [7.5.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.5.0...@quenty/templateprovider@7.5.1) (2023-04-07)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# [7.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.4.0...@quenty/templateprovider@7.5.0) (2023-04-06)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Features
|
|
58
|
+
|
|
59
|
+
* Template registration order is respected ([11d0ef9](https://github.com/Quenty/NevermoreEngine/commit/11d0ef9411b3c3faa0041cd06adc6cc4f1acef70))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# [7.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.3.0...@quenty/templateprovider@7.4.0) (2023-03-31)
|
|
66
|
+
|
|
67
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# [7.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.2.0...@quenty/templateprovider@7.3.0) (2023-03-05)
|
|
74
|
+
|
|
75
|
+
**Note:** Version bump only for package @quenty/templateprovider
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# [7.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/templateprovider@7.1.0...@quenty/templateprovider@7.2.0) (2023-02-27)
|
|
7
82
|
|
|
8
83
|
**Note:** Version bump only for package @quenty/templateprovider
|
|
9
84
|
|
package/LICENSE.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/templateprovider",
|
|
3
|
-
"version": "8.0.0
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Base of a template retrieval system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "
|
|
29
|
-
"@quenty/insertserviceutils": "7.0.0
|
|
30
|
-
"@quenty/loader": "
|
|
31
|
-
"@quenty/maid": "2.
|
|
32
|
-
"@quenty/promise": "7.0.0
|
|
33
|
-
"@quenty/string": "3.1.0"
|
|
28
|
+
"@quenty/baseobject": "^7.0.0",
|
|
29
|
+
"@quenty/insertserviceutils": "^7.0.0",
|
|
30
|
+
"@quenty/loader": "^7.0.0",
|
|
31
|
+
"@quenty/maid": "^2.6.0",
|
|
32
|
+
"@quenty/promise": "^7.0.0",
|
|
33
|
+
"@quenty/string": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "fdeae46099587019ec5fc15317dc673aed379400"
|
|
39
39
|
}
|
|
@@ -58,13 +58,15 @@ function TemplateProvider.new(container, replicationParent)
|
|
|
58
58
|
|
|
59
59
|
self._replicationParent = replicationParent
|
|
60
60
|
self._containersToInitializeSet = {}
|
|
61
|
+
self._containersToInitializeList = {}
|
|
61
62
|
|
|
62
63
|
if typeof(container) == "Instance" or type(container) == "number" then
|
|
63
|
-
self
|
|
64
|
+
self:_registerContainer(container)
|
|
64
65
|
elseif typeof(container) == "table" then
|
|
65
66
|
for _, item in pairs(container) do
|
|
66
67
|
assert(typeof(item) == "Instance" or type(item) == "number", "Bad item in initialization set")
|
|
67
|
-
|
|
68
|
+
|
|
69
|
+
self:_registerContainer(item)
|
|
68
70
|
|
|
69
71
|
-- For easy debugging/iteration loop
|
|
70
72
|
if typeof(item) == "Instance"
|
|
@@ -79,12 +81,21 @@ function TemplateProvider.new(container, replicationParent)
|
|
|
79
81
|
|
|
80
82
|
-- Make sure to replicate our parent
|
|
81
83
|
if self._replicationParent then
|
|
82
|
-
self
|
|
84
|
+
self:_registerContainer(self._replicationParent)
|
|
83
85
|
end
|
|
84
86
|
|
|
85
87
|
return self
|
|
86
88
|
end
|
|
87
89
|
|
|
90
|
+
function TemplateProvider:_registerContainer(container)
|
|
91
|
+
assert(typeof(container) == "Instance" or type(container) == "number", "Bad container")
|
|
92
|
+
|
|
93
|
+
if not self._containersToInitializeSet[container] then
|
|
94
|
+
self._containersToInitializeSet[container] = true
|
|
95
|
+
table.insert(self._containersToInitializeList, container)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
88
99
|
--[=[
|
|
89
100
|
Initializes the container provider. Should be done via [ServiceBag].
|
|
90
101
|
]=]
|
|
@@ -98,7 +109,7 @@ function TemplateProvider:Init()
|
|
|
98
109
|
|
|
99
110
|
self._promises = {} -- [name] = Promise
|
|
100
111
|
|
|
101
|
-
for
|
|
112
|
+
for _, container in pairs(self._containersToInitializeList) do
|
|
102
113
|
self:AddContainer(container)
|
|
103
114
|
end
|
|
104
115
|
end
|
|
@@ -358,10 +369,10 @@ end
|
|
|
358
369
|
|
|
359
370
|
function TemplateProvider:_addToRegistery(child)
|
|
360
371
|
local childName = child.Name
|
|
361
|
-
if self._registry[childName] then
|
|
362
|
-
warn(("[TemplateProvider._addToRegistery] - Duplicate %q in registery. Overridding")
|
|
363
|
-
|
|
364
|
-
end
|
|
372
|
+
-- if self._registry[childName] then
|
|
373
|
+
-- warn(("[TemplateProvider._addToRegistery] - Duplicate %q in registery. Overridding")
|
|
374
|
+
-- :format(childName))
|
|
375
|
+
-- end
|
|
365
376
|
|
|
366
377
|
self._registry[childName] = child
|
|
367
378
|
|