plua 1.0.5__tar.gz
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.
- plua-1.0.5/.gitattributes +1 -0
- plua-1.0.5/.github/workflows/version-bump.yml +89 -0
- plua-1.0.5/.github/workflows/windows-build.yml +43 -0
- plua-1.0.5/.gitignore +121 -0
- plua-1.0.5/.vscodeignore +1 -0
- plua-1.0.5/PKG-INFO +977 -0
- plua-1.0.5/README.md +964 -0
- plua-1.0.5/docs/ARCHITECTURE.md +600 -0
- plua-1.0.5/examples/QA_api.lua +10 -0
- plua-1.0.5/examples/QA_basic.lua +31 -0
- plua-1.0.5/examples/QA_http.lua +23 -0
- plua-1.0.5/examples/QA_includeFiles.lua +10 -0
- plua-1.0.5/examples/QA_timers.lua +28 -0
- plua-1.0.5/examples/QAtest.lua +44 -0
- plua-1.0.5/examples/async2_test.lua +13 -0
- plua-1.0.5/examples/async_test.lua +17 -0
- plua-1.0.5/examples/basic.lua +51 -0
- plua-1.0.5/examples/debug_http_callback.lua +18 -0
- plua-1.0.5/examples/example.lua +37 -0
- plua-1.0.5/examples/example_no_mobdebug.lua +37 -0
- plua-1.0.5/examples/extensions_demo.lua +73 -0
- plua-1.0.5/examples/google_call.lua +31 -0
- plua-1.0.5/examples/html2console_demo.lua +24 -0
- plua-1.0.5/examples/http_demo.lua +76 -0
- plua-1.0.5/examples/http_simple_test.lua +30 -0
- plua-1.0.5/examples/libQA.lua +1 -0
- plua-1.0.5/examples/libQB.lua +1 -0
- plua-1.0.5/examples/loop.lua +3 -0
- plua-1.0.5/examples/mqtt_demo.lua +92 -0
- plua-1.0.5/examples/multiple_async_test.lua +32 -0
- plua-1.0.5/examples/network_demo.lua +149 -0
- plua-1.0.5/examples/tcp_error_handling_demo.lua +148 -0
- plua-1.0.5/examples/tcp_nonblocking_demo.lua +106 -0
- plua-1.0.5/examples/tcp_pattern_read_demo.lua +152 -0
- plua-1.0.5/examples/tcp_server_async_demo.lua +106 -0
- plua-1.0.5/examples/tcp_server_demo.lua +100 -0
- plua-1.0.5/examples/tcp_sync_only_demo.lua +101 -0
- plua-1.0.5/examples/tcp_timeout_demo.lua +127 -0
- plua-1.0.5/examples/testapi.lua +7 -0
- plua-1.0.5/examples/timers.lua +60 -0
- plua-1.0.5/examples/web_server_demo.lua +62 -0
- plua-1.0.5/examples/web_server_status_demo.lua +109 -0
- plua-1.0.5/examples/websocket_headers_demo.lua +72 -0
- plua-1.0.5/examples/websocket_server_demo.lua +70 -0
- plua-1.0.5/pyproject.toml +38 -0
- plua-1.0.5/requirements.txt +18 -0
- plua-1.0.5/scripts/build.py +118 -0
- plua-1.0.5/scripts/build_windows.py +199 -0
- plua-1.0.5/scripts/bump_version.py +96 -0
- plua-1.0.5/scripts/download_artifact.sh +28 -0
- plua-1.0.5/scripts/hooks/hook-lupa.py +11 -0
- plua-1.0.5/scripts/run.sh +3 -0
- plua-1.0.5/scripts/run_tests.py +73 -0
- plua-1.0.5/src/extensions/__init__.py +10 -0
- plua-1.0.5/src/extensions/core.py +706 -0
- plua-1.0.5/src/extensions/html_extensions.py +296 -0
- plua-1.0.5/src/extensions/network_extensions.py +2395 -0
- plua-1.0.5/src/extensions/registry.py +118 -0
- plua-1.0.5/src/extensions/web_server.py +413 -0
- plua-1.0.5/src/extensions/websocket_extensions.py +440 -0
- plua-1.0.5/src/lua/README.md +89 -0
- plua-1.0.5/src/lua/fibaro.lua +643 -0
- plua-1.0.5/src/lua/mobdebug.lua +2638 -0
- plua-1.0.5/src/lua/plua/bundled_files.lua +105 -0
- plua-1.0.5/src/lua/plua/class.lua +17 -0
- plua-1.0.5/src/lua/plua/fibaro_api.lua +584 -0
- plua-1.0.5/src/lua/plua/json.lua +2 -0
- plua-1.0.5/src/lua/plua/net.lua +480 -0
- plua-1.0.5/src/lua/plua/qa_mgr.lua +88 -0
- plua-1.0.5/src/lua/plua/quickapp.lua +457 -0
- plua-1.0.5/src/lua/socket.lua +77 -0
- plua-1.0.5/src/plua/__init__.py +8 -0
- plua-1.0.5/src/plua/__main__.py +181 -0
- plua-1.0.5/src/plua/embedded_api_server.py +2030 -0
- plua-1.0.5/src/plua/interpreter.py +999 -0
- plua-1.0.5/src/plua/version.py +38 -0
- plua-1.0.5/tests/unit/README.md +217 -0
- plua-1.0.5/tests/unit/__init__.py +1 -0
- plua-1.0.5/tests/unit/conftest.py +80 -0
- plua-1.0.5/tests/unit/run_plua.py +30 -0
- plua-1.0.5/tests/unit/test_basic.py +78 -0
- plua-1.0.5/tests/unit/test_core_extensions.py +289 -0
- plua-1.0.5/tests/unit/test_integration.py +122 -0
- plua-1.0.5/tests/unit/test_lupa_simple.py +18 -0
- plua-1.0.5/tests/unit/test_net_clients.py +610 -0
- plua-1.0.5/tests/unit/test_network_extensions.py +319 -0
- plua-1.0.5/tests/unit/test_plua_integration.py +116 -0
- plua-1.0.5/tests/unit/test_plua_interpreter.py +308 -0
- plua-1.0.5/tests/unit/test_server.py +36 -0
- plua-1.0.5/tests/unit/test_simple_async.py +27 -0
- plua-1.0.5/uv.lock +289 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lua/mobdebug.lua binary
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Auto Version Bump
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- '**.md'
|
|
8
|
+
- '.github/workflows/version-bump.yml'
|
|
9
|
+
- 'docs/**'
|
|
10
|
+
- '*.md'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
bump-version:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
|
|
23
|
+
- name: Setup Python
|
|
24
|
+
uses: actions/setup-python@v4
|
|
25
|
+
with:
|
|
26
|
+
python-version: '3.12'
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
pip install toml
|
|
31
|
+
|
|
32
|
+
- name: Bump version
|
|
33
|
+
id: bump
|
|
34
|
+
run: |
|
|
35
|
+
echo "Reading current version from pyproject.toml..."
|
|
36
|
+
|
|
37
|
+
# Read current version
|
|
38
|
+
python -c "
|
|
39
|
+
import toml
|
|
40
|
+
import re
|
|
41
|
+
import os
|
|
42
|
+
|
|
43
|
+
# Read current version
|
|
44
|
+
with open('pyproject.toml', 'r') as f:
|
|
45
|
+
data = toml.load(f)
|
|
46
|
+
|
|
47
|
+
current_version = data['project']['version']
|
|
48
|
+
print(f'Current version: {current_version}')
|
|
49
|
+
|
|
50
|
+
# Parse version components
|
|
51
|
+
match = re.match(r'(\d+)\.(\d+)\.(\d+)', current_version)
|
|
52
|
+
if match:
|
|
53
|
+
major, minor, patch = match.groups()
|
|
54
|
+
new_patch = int(patch) + 1
|
|
55
|
+
new_version = f'{major}.{minor}.{new_patch}'
|
|
56
|
+
print(f'New version: {new_version}')
|
|
57
|
+
|
|
58
|
+
# Update pyproject.toml
|
|
59
|
+
data['project']['version'] = new_version
|
|
60
|
+
with open('pyproject.toml', 'w') as f:
|
|
61
|
+
toml.dump(data, f)
|
|
62
|
+
|
|
63
|
+
print('Updated pyproject.toml')
|
|
64
|
+
|
|
65
|
+
# Set output for next steps
|
|
66
|
+
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
|
|
67
|
+
f.write(f'old_version={current_version}\n')
|
|
68
|
+
f.write(f'new_version={new_version}\n')
|
|
69
|
+
else:
|
|
70
|
+
print('Could not parse version format')
|
|
71
|
+
exit(1)
|
|
72
|
+
"
|
|
73
|
+
|
|
74
|
+
- name: Commit and push changes
|
|
75
|
+
run: |
|
|
76
|
+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
77
|
+
git config --local user.name "github-actions[bot]"
|
|
78
|
+
|
|
79
|
+
# Check if there are changes to commit
|
|
80
|
+
if git diff --quiet pyproject.toml; then
|
|
81
|
+
echo "No version changes to commit"
|
|
82
|
+
exit 0
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
git add pyproject.toml
|
|
86
|
+
git commit -m "Auto-bump version from ${{ steps.bump.outputs.old_version }} to ${{ steps.bump.outputs.new_version }} [skip ci]"
|
|
87
|
+
git push
|
|
88
|
+
|
|
89
|
+
echo "Version bumped from ${{ steps.bump.outputs.old_version }} to ${{ steps.bump.outputs.new_version }}"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Build Windows Executable
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ main ]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build-windows:
|
|
12
|
+
runs-on: windows-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout code
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.12'
|
|
22
|
+
|
|
23
|
+
- name: Install build dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
echo "Installing requirements..."
|
|
27
|
+
pip install -r requirements.txt
|
|
28
|
+
echo "Installing PyInstaller..."
|
|
29
|
+
pip install pyinstaller
|
|
30
|
+
echo "Checking installed packages..."
|
|
31
|
+
pip list
|
|
32
|
+
|
|
33
|
+
- name: Test lupa import
|
|
34
|
+
run: python -c "import lupa; print('Lupa import successful')"
|
|
35
|
+
|
|
36
|
+
- name: Build executable with PyInstaller
|
|
37
|
+
run: pyinstaller --onefile --collect-submodules lupa --collect-submodules toml --collect-submodules plua --collect-submodules extensions src/plua/__main__.py --name plua --add-data "src/lua;lua" --add-data "src/extensions;extensions" --add-data "examples;examples" --add-data "pyproject.toml;."
|
|
38
|
+
|
|
39
|
+
- name: Upload executable
|
|
40
|
+
uses: actions/upload-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: plua-windows-exe
|
|
43
|
+
path: dist/plua.exe
|
plua-1.0.5/.gitignore
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
share/python-wheels/
|
|
20
|
+
*.egg-info/
|
|
21
|
+
.installed.cfg
|
|
22
|
+
*.egg
|
|
23
|
+
MANIFEST
|
|
24
|
+
|
|
25
|
+
# Virtual environments
|
|
26
|
+
.env
|
|
27
|
+
.venv
|
|
28
|
+
env/
|
|
29
|
+
venv/
|
|
30
|
+
ENV/
|
|
31
|
+
env.bak/
|
|
32
|
+
venv.bak/
|
|
33
|
+
.uv/
|
|
34
|
+
|
|
35
|
+
# IDE and editor files
|
|
36
|
+
.vscode/
|
|
37
|
+
.idea/
|
|
38
|
+
*.swp
|
|
39
|
+
*.swo
|
|
40
|
+
*~
|
|
41
|
+
.DS_Store
|
|
42
|
+
Thumbs.db
|
|
43
|
+
|
|
44
|
+
# Jupyter Notebook
|
|
45
|
+
.ipynb_checkpoints
|
|
46
|
+
|
|
47
|
+
# pyenv
|
|
48
|
+
.python-version
|
|
49
|
+
|
|
50
|
+
# pipenv
|
|
51
|
+
Pipfile.lock
|
|
52
|
+
|
|
53
|
+
# PEP 582
|
|
54
|
+
__pypackages__/
|
|
55
|
+
|
|
56
|
+
# Celery
|
|
57
|
+
celerybeat-schedule
|
|
58
|
+
celerybeat.pid
|
|
59
|
+
|
|
60
|
+
# SageMath parsed files
|
|
61
|
+
*.sage.py
|
|
62
|
+
|
|
63
|
+
# Environments
|
|
64
|
+
.env
|
|
65
|
+
.venv
|
|
66
|
+
env/
|
|
67
|
+
venv/
|
|
68
|
+
ENV/
|
|
69
|
+
env.bak/
|
|
70
|
+
venv.bak/
|
|
71
|
+
|
|
72
|
+
# Spyder project settings
|
|
73
|
+
.spyderproject
|
|
74
|
+
.spyproject
|
|
75
|
+
|
|
76
|
+
# Rope project settings
|
|
77
|
+
.ropeproject
|
|
78
|
+
|
|
79
|
+
# mkdocs documentation
|
|
80
|
+
/site
|
|
81
|
+
|
|
82
|
+
# mypy
|
|
83
|
+
.mypy_cache/
|
|
84
|
+
.dmypy.json
|
|
85
|
+
dmypy.json
|
|
86
|
+
|
|
87
|
+
# Pyre type checker
|
|
88
|
+
.pyre/
|
|
89
|
+
|
|
90
|
+
# pytest
|
|
91
|
+
.pytest_cache/
|
|
92
|
+
|
|
93
|
+
# PLua specific
|
|
94
|
+
test_output.txt
|
|
95
|
+
*.log
|
|
96
|
+
*.tmp
|
|
97
|
+
.plua.lua
|
|
98
|
+
*.plua.lua
|
|
99
|
+
plua_cache/
|
|
100
|
+
plua_temp/
|
|
101
|
+
plua_debug/
|
|
102
|
+
|
|
103
|
+
# OS generated files
|
|
104
|
+
.DS_Store
|
|
105
|
+
.DS_Store?
|
|
106
|
+
._*
|
|
107
|
+
.Spotlight-V100
|
|
108
|
+
.Trashes
|
|
109
|
+
ehthumbs.db
|
|
110
|
+
Thumbs.db
|
|
111
|
+
|
|
112
|
+
# Temporary files
|
|
113
|
+
*.tmp
|
|
114
|
+
*.temp
|
|
115
|
+
*.bak
|
|
116
|
+
*.backup
|
|
117
|
+
/old
|
|
118
|
+
|
|
119
|
+
# Network test files (if any)
|
|
120
|
+
test_*.log
|
|
121
|
+
debug_*.log
|
plua-1.0.5/.vscodeignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lua/mobdebug.lua
|