lenix 1.0.4 → 1.1.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.
@@ -1,17 +1,14 @@
1
1
  #!/bin/bash
2
2
 
3
- # Detect actual shell
4
- SHELL_CONFIG="${HOME}/.bashrc"
5
-
6
- if [[ "$SHELL" == *"zsh"* ]]; then
3
+ if [ -n "$ZSH_VERSION" ]; then
7
4
  SHELL_CONFIG="${HOME}/.zshrc"
8
- elif [[ "$SHELL" == *"bash"* ]]; then
9
- # Bash needs .bash_profile to source .bashrc
5
+ elif [ -n "$BASH_VERSION" ]; then
10
6
  SHELL_CONFIG="${HOME}/.bashrc"
11
7
  PROFILE_CONFIG="${HOME}/.bash_profile"
8
+ else
9
+ SHELL_CONFIG="${HOME}/.profile"
12
10
  fi
13
11
 
14
- # Create shell config if it doesn't exist
15
12
  touch "$SHELL_CONFIG"
16
13
 
17
14
  echo "===================================="
@@ -20,7 +17,6 @@ echo "===================================="
20
17
  echo ""
21
18
  echo "This script will add the following lines to: $SHELL_CONFIG"
22
19
  echo ""
23
- echo "# Lua local modules setup"
24
20
  echo "eval \$(luarocks path --bin)"
25
21
  echo "export LUA_PATH=\"./lua_modules/share/lua/5.4/?.lua;./lua_modules/share/lua/5.4/?/init.lua;;\""
26
22
  echo "export LUA_CPATH=\"./lua_modules/lib/lua/5.4/?.so;;\""
@@ -34,7 +30,7 @@ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
34
30
  fi
35
31
 
36
32
  if grep -q "# Lua local modules setup" "$SHELL_CONFIG"; then
37
- echo "⚠️ Already installed in $SHELL_CONFIG"
33
+ echo " Already installed in $SHELL_CONFIG"
38
34
  echo "Installation aborted."
39
35
  exit 0
40
36
  fi
@@ -46,9 +42,9 @@ echo 'export LUA_PATH="./lua_modules/share/lua/5.4/?.lua;./lua_modules/share/lua
46
42
  echo 'export LUA_CPATH="./lua_modules/lib/lua/5.4/?.so;;"' >> "$SHELL_CONFIG"
47
43
  echo '# Lua local modules end.' >> "$SHELL_CONFIG"
48
44
 
49
- # For bash, ensure .bash_profile sources .bashrc
50
- if [[ "$SHELL" == *"bash"* ]] && [ -n "$PROFILE_CONFIG" ]; then
51
- if [ ! -f "$PROFILE_CONFIG" ] || ! grep -q "source.*bashrc" "$PROFILE_CONFIG"; then
45
+ if [ -n "$BASH_VERSION" ] && [ -n "$PROFILE_CONFIG" ]; then
46
+ touch "$PROFILE_CONFIG"
47
+ if ! grep -q "source.*bashrc" "$PROFILE_CONFIG"; then
52
48
  echo '' >> "$PROFILE_CONFIG"
53
49
  echo '# Source .bashrc' >> "$PROFILE_CONFIG"
54
50
  echo 'if [ -f ~/.bashrc ]; then source ~/.bashrc; fi' >> "$PROFILE_CONFIG"
@@ -58,12 +54,12 @@ fi
58
54
  source "$SHELL_CONFIG" 2>/dev/null || true
59
55
 
60
56
  echo ""
61
- echo "✓ Setup complete!"
62
- echo "✓ Added to: $SHELL_CONFIG"
57
+ echo "Setup complete!"
58
+ echo "Added to: $SHELL_CONFIG"
63
59
  echo ""
64
- echo "📦 Usage:"
60
+ echo "Usage:"
65
61
  echo " luarocks install --tree ./lua_modules <package>"
66
62
  echo ""
67
- echo "⚠️ IMPORTANT: Restart your terminal for changes to take effect"
63
+ echo " IMPORTANT: Restart your terminal for changes to take effect"
68
64
  echo ""
69
65
  echo "To undo, remove lines containing '# Lua local modules setup' from $SHELL_CONFIG"
@@ -1,4 +1,4 @@
1
1
  import { writeFile } from 'fs/promises';
2
2
  type FileContent = Parameters<typeof writeFile>[1];
3
- declare const createFxmanifest: (content?: FileContent) => Promise<void>;
4
- export { createFxmanifest };
3
+ export declare const createFxmanifest: (content?: FileContent) => Promise<void>;
4
+ export {};
@@ -20,5 +20,4 @@ const generateContent = () => {
20
20
  }
21
21
  return defaultContent;
22
22
  };
23
- const createFxmanifest = async (content) => await writeFile('fxmanifest.lua', content || generateContent());
24
- export { createFxmanifest };
23
+ export const createFxmanifest = async (content) => await writeFile('fxmanifest.lua', content || generateContent());
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- declare const _default: {};
2
- export default _default;
1
+ export * from '~/wait';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export default {};
1
+ export * from '~/wait';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Delay execution for a given duration.
3
+ * @param ms - Duration in milliseconds (1000ms = 1 second)
4
+ */
5
+ export declare const wait: (ms: number) => Promise<unknown>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Delay execution for a given duration.
3
+ * @param ms - Duration in milliseconds (1000ms = 1 second)
4
+ */
5
+ export const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lenix",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "",
5
5
  "author": "Lenix",
6
6
  "license": "GPL-3.0",