@rbxts/app-forge 0.4.0 → 0.4.2

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.
@@ -1,5 +1,7 @@
1
1
  -- Compiled with roblox-ts v3.0.0
2
2
  local TS = _G[script]
3
+ -- Services
4
+ local RunService = TS.import(script, TS.getModule(script, "@rbxts", "services")).RunService
3
5
  -- Packages
4
6
  local usePx = TS.import(script, TS.getModule(script, "@rbxts", "loners-pretty-react-hooks").out).usePx
5
7
  -- Types
@@ -32,7 +34,7 @@ do
32
34
  error("App name is required in Args constructor")
33
35
  end
34
36
  local bind = forge:getBind(name)
35
- if not bind then
37
+ if not bind and RunService:IsRunning() then
36
38
  error("FAILED TO GET BIND FOR APP!")
37
39
  end
38
40
  local px = usePx(target)
@@ -43,7 +45,7 @@ do
43
45
  self.props = _object
44
46
  self.name = name
45
47
  self.bind = bind
46
- self.state = self.bind:getValue()
48
+ self.state = if self.bind then self.bind:getValue() else nil
47
49
  end
48
50
  end
49
51
  return {
package/out/rules.luau CHANGED
@@ -52,6 +52,7 @@ do
52
52
  if not (n ~= "" and n) or n == name then
53
53
  return nil
54
54
  end
55
+ print(self.appManager.loaded)
55
56
  local _n = n
56
57
  local otherApp = AppRegistry[_n]
57
58
  local _result_1 = otherApp
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/app-forge",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "An App Manager for react",
5
5
  "main": "out/init.lua",
6
6
  "packageManager": "bun@1.3.1",