@quenty/brio 8.4.0 → 8.5.1-canary.330.de4a2f4.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 +16 -0
- package/package.json +5 -5
- package/src/Shared/RxBrioUtils.lua +32 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.5.1-canary.330.de4a2f4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/brio@8.5.0...@quenty/brio@8.5.1-canary.330.de4a2f4.0) (2023-02-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/brio
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [8.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/brio@8.4.0...@quenty/brio@8.5.0) (2023-02-21)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @quenty/brio
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [8.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/brio@8.3.0...@quenty/brio@8.4.0) (2023-01-11)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @quenty/brio
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/brio",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.1-canary.330.de4a2f4.0",
|
|
4
4
|
"description": "Brios wrap an object and either are alive or dead",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/loader": "
|
|
30
|
-
"@quenty/maid": "
|
|
31
|
-
"@quenty/rx": "
|
|
29
|
+
"@quenty/loader": "6.1.0",
|
|
30
|
+
"@quenty/maid": "2.4.0",
|
|
31
|
+
"@quenty/rx": "7.5.1-canary.330.de4a2f4.0"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "de4a2f4cacbb79bb0d35e3de34c24552ac5470cb"
|
|
37
37
|
}
|
|
@@ -704,12 +704,39 @@ end
|
|
|
704
704
|
|
|
705
705
|
@since 3.6.0
|
|
706
706
|
@function switchToBrio
|
|
707
|
-
@return (source: Observable<T
|
|
707
|
+
@return (source: Observable<T | Brio<T>>) -> Observable<Brio<T>>
|
|
708
708
|
@within RxBrioUtils
|
|
709
709
|
]=]
|
|
710
|
-
RxBrioUtils.switchToBrio
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
710
|
+
function RxBrioUtils.switchToBrio()
|
|
711
|
+
return function(source)
|
|
712
|
+
return Observable.new(function(sub)
|
|
713
|
+
local topMaid = Maid.new()
|
|
714
|
+
|
|
715
|
+
topMaid:GiveTask(source:Subscribe(function(result, ...)
|
|
716
|
+
if Brio.isBrio(result) then
|
|
717
|
+
if result:IsDead() then
|
|
718
|
+
topMaid._last = nil
|
|
719
|
+
return
|
|
720
|
+
end
|
|
721
|
+
|
|
722
|
+
local maid = result:ToMaid()
|
|
723
|
+
local newBrio = Brio.new(result:GetValue())
|
|
724
|
+
maid:GiveTask(newBrio)
|
|
725
|
+
|
|
726
|
+
topMaid._last = maid
|
|
727
|
+
sub:Fire(newBrio)
|
|
728
|
+
else
|
|
729
|
+
local newBrio = Brio.new(result, ...)
|
|
730
|
+
|
|
731
|
+
topMaid._last = newBrio
|
|
732
|
+
sub:Fire(newBrio)
|
|
733
|
+
end
|
|
734
|
+
end, sub:GetFailComplete()))
|
|
735
|
+
|
|
736
|
+
return topMaid
|
|
737
|
+
end)
|
|
738
|
+
end
|
|
739
|
+
end
|
|
740
|
+
|
|
714
741
|
|
|
715
742
|
return RxBrioUtils
|