@rbxts/replion 1.0.5 → 1.0.7

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/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  ## Install
4
4
  Install with [wally](https://wally.run/):\
5
- `Replion = "shouxtech/replion@1.0.5"`
5
+ `Replion = "shouxtech/replion@1.0.7"`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/replion",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "src/init.lua",
6
6
  "scripts": {},
package/src/Client.lua CHANGED
@@ -1,7 +1,8 @@
1
1
  --!strict
2
- local dependencies = script.Parent.Parent;
2
+ local isTypeScriptEnv = script.Parent.Name == 'src';
3
+ local dependencies = if isTypeScriptEnv then script.Parent.Parent.Parent else script.Parent.Parent;
3
4
  local Shared = require(script.Parent.Shared);
4
- local Signal = require(dependencies:FindFirstChild('Signal') or dependencies['sleitnick-signal']);
5
+ local Signal = require(isTypeScriptEnv and dependencies['sleitnick-signal'] or dependencies.Signal);
5
6
 
6
7
  type Observer = (newValue: any, oldValue: any) -> ();
7
8
 
package/src/Server.lua CHANGED
@@ -1,9 +1,10 @@
1
1
  --!strict
2
2
  local Players = game:GetService('Players');
3
3
 
4
- local dependencies = script.Parent.Parent;
4
+ local isTypeScriptEnv = script.Parent.Name == 'src';
5
+ local dependencies = if isTypeScriptEnv then script.Parent.Parent.Parent else script.Parent.Parent;
5
6
  local Shared = require(script.Parent.Shared);
6
- local Sift = require(dependencies:FindFirstChild('Sift') or dependencies.sift.out);
7
+ local Sift = require(isTypeScriptEnv and dependencies.sift.out or dependencies.Sift);
7
8
 
8
9
  type ServerConfig = {
9
10
  channel: string;