pmxt 1.4.0__tar.gz → 1.4.1__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.
- {pmxt-1.4.0 → pmxt-1.4.1}/PKG-INFO +1 -1
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/__init__.py +1 -1
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/api_client.py +1 -1
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/configuration.py +1 -1
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt/__init__.py +1 -1
- pmxt-1.4.1/pmxt/_server/bin/pmxt-ensure-server.js +158 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt/server_manager.py +11 -7
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt.egg-info/PKG-INFO +1 -1
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt.egg-info/SOURCES.txt +3 -1
- {pmxt-1.4.0 → pmxt-1.4.1}/pyproject.toml +1 -1
- pmxt-1.4.1/tests/test_server_manager.py +85 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/README.md +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/api/__init__.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/api/default_api.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/api_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/exceptions.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/__init__.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/balance.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/base_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/base_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/cancel_order_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/create_order200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/create_order_params.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/create_order_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/error_detail.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/error_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/exchange_credentials.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/execution_price_result.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_balance200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_markets200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_markets_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_ohlcv200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_ohlcv_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_ohlcv_request_args_inner.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_open_orders200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_open_orders_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_order_book200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_order_book_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_positions200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_positions_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_trades200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/fetch_trades_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/get_execution_price200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/get_execution_price_detailed200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/get_execution_price_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/get_execution_price_request_args_inner.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/get_markets_by_slug_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/health_check200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/history_filter_params.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/market_filter_params.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/market_outcome.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/order.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/order_book.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/order_level.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/position.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/price_candle.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/search_events200_response.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/search_events_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/search_markets_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/search_markets_request_args_inner.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/trade.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/unified_event.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/unified_market.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/watch_order_book_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/watch_order_book_request_args_inner.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/watch_trades_request.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/py.typed +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/rest.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt/_server/__init__.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt/_server/bin/pmxt-ensure-server +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt/_server/server/bundled.js +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt/client.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt/models.py +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt.egg-info/dependency_links.txt +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt.egg-info/requires.txt +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/pmxt.egg-info/top_level.txt +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/setup.cfg +0 -0
- {pmxt-1.4.0 → pmxt-1.4.1}/tests/test_integration.py +0 -0
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/1.4.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/1.4.1/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
|
@@ -506,7 +506,7 @@ class Configuration:
|
|
|
506
506
|
"OS: {env}\n"\
|
|
507
507
|
"Python Version: {pyversion}\n"\
|
|
508
508
|
"Version of the API: 0.4.4\n"\
|
|
509
|
-
"SDK Package Version: 1.4.
|
|
509
|
+
"SDK Package Version: 1.4.1".\
|
|
510
510
|
format(env=sys.platform, pyversion=sys.version)
|
|
511
511
|
|
|
512
512
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Server Launcher
|
|
5
|
+
*
|
|
6
|
+
* This script ensures the PMXT sidecar server is running.
|
|
7
|
+
* It's designed to be called by SDKs in any language (Python, Java, C#, Go, etc.)
|
|
8
|
+
*
|
|
9
|
+
* Behavior:
|
|
10
|
+
* 1. Check if server is already running (via lock file)
|
|
11
|
+
* 2. If running, exit successfully
|
|
12
|
+
* 3. If not running, spawn the server and wait for health check
|
|
13
|
+
* 4. Exit with code 0 on success, 1 on failure
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const path = require('path');
|
|
18
|
+
const os = require('os');
|
|
19
|
+
const { spawn } = require('child_process');
|
|
20
|
+
const http = require('http');
|
|
21
|
+
|
|
22
|
+
const LOCK_FILE = path.join(os.homedir(), '.pmxt', 'server.lock');
|
|
23
|
+
const DEFAULT_PORT = 3847;
|
|
24
|
+
const HEALTH_CHECK_TIMEOUT = 10000; // 10 seconds
|
|
25
|
+
const HEALTH_CHECK_INTERVAL = 100; // 100ms
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Check if the server is currently running
|
|
29
|
+
*/
|
|
30
|
+
function isServerRunning() {
|
|
31
|
+
try {
|
|
32
|
+
if (!fs.existsSync(LOCK_FILE)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const lockData = JSON.parse(fs.readFileSync(LOCK_FILE, 'utf-8'));
|
|
37
|
+
const { pid, port } = lockData;
|
|
38
|
+
|
|
39
|
+
// Check if process exists
|
|
40
|
+
try {
|
|
41
|
+
process.kill(pid, 0); // Signal 0 checks existence without killing
|
|
42
|
+
return { running: true, port };
|
|
43
|
+
} catch (err) {
|
|
44
|
+
// Process doesn't exist, remove stale lock file
|
|
45
|
+
fs.unlinkSync(LOCK_FILE);
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
} catch (err) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Wait for server to respond to health check
|
|
55
|
+
*/
|
|
56
|
+
function waitForHealth(port, timeout = HEALTH_CHECK_TIMEOUT) {
|
|
57
|
+
return new Promise((resolve, reject) => {
|
|
58
|
+
const startTime = Date.now();
|
|
59
|
+
|
|
60
|
+
const checkHealth = () => {
|
|
61
|
+
const req = http.get(`http://localhost:${port}/health`, (res) => {
|
|
62
|
+
if (res.statusCode === 200) {
|
|
63
|
+
resolve(true);
|
|
64
|
+
} else {
|
|
65
|
+
scheduleNextCheck();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
req.on('error', () => {
|
|
70
|
+
scheduleNextCheck();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
req.setTimeout(1000);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const scheduleNextCheck = () => {
|
|
77
|
+
if (Date.now() - startTime > timeout) {
|
|
78
|
+
reject(new Error('Server health check timeout'));
|
|
79
|
+
} else {
|
|
80
|
+
setTimeout(checkHealth, HEALTH_CHECK_INTERVAL);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
checkHealth();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Start the PMXT server
|
|
90
|
+
*/
|
|
91
|
+
async function startServer() {
|
|
92
|
+
// 1. Try to find the server binary/script
|
|
93
|
+
let serverCmd = 'pmxt-server';
|
|
94
|
+
let args = [];
|
|
95
|
+
|
|
96
|
+
// Check for Python-bundled server (when bundled in pip package)
|
|
97
|
+
const pythonBundledServer = path.join(__dirname, '..', 'server', 'bundled.js');
|
|
98
|
+
// Check for local dev bundled server
|
|
99
|
+
const localBundledServer = path.join(__dirname, '..', 'dist', 'server', 'bundled.js');
|
|
100
|
+
const localDistServer = path.join(__dirname, '..', 'dist', 'server', 'index.js');
|
|
101
|
+
const localBinServer = path.join(__dirname, 'pmxt-server');
|
|
102
|
+
|
|
103
|
+
if (fs.existsSync(pythonBundledServer)) {
|
|
104
|
+
serverCmd = 'node';
|
|
105
|
+
args = [pythonBundledServer];
|
|
106
|
+
} else if (fs.existsSync(localBundledServer)) {
|
|
107
|
+
serverCmd = 'node';
|
|
108
|
+
args = [localBundledServer];
|
|
109
|
+
} else if (fs.existsSync(localDistServer)) {
|
|
110
|
+
serverCmd = 'node';
|
|
111
|
+
args = [localDistServer];
|
|
112
|
+
} else if (fs.existsSync(localBinServer)) {
|
|
113
|
+
serverCmd = localBinServer;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Spawn server as detached process
|
|
117
|
+
const serverProcess = spawn(serverCmd, args, {
|
|
118
|
+
detached: true,
|
|
119
|
+
stdio: 'ignore',
|
|
120
|
+
env: process.env
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Detach from parent process
|
|
124
|
+
serverProcess.unref();
|
|
125
|
+
|
|
126
|
+
// Wait for server to be ready
|
|
127
|
+
await waitForHealth(DEFAULT_PORT);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Main entry point
|
|
132
|
+
*/
|
|
133
|
+
async function main() {
|
|
134
|
+
try {
|
|
135
|
+
// Check if server is already running
|
|
136
|
+
const serverStatus = isServerRunning();
|
|
137
|
+
|
|
138
|
+
if (serverStatus && serverStatus.running) {
|
|
139
|
+
// Server is running, verify it's healthy
|
|
140
|
+
try {
|
|
141
|
+
await waitForHealth(serverStatus.port, 2000);
|
|
142
|
+
process.exit(0);
|
|
143
|
+
} catch (err) {
|
|
144
|
+
// Server process exists but not responding, try to start fresh
|
|
145
|
+
console.error('Server process exists but not responding, starting fresh...');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Start the server
|
|
150
|
+
await startServer();
|
|
151
|
+
process.exit(0);
|
|
152
|
+
} catch (err) {
|
|
153
|
+
console.error('Failed to ensure server is running:', err.message);
|
|
154
|
+
process.exit(1);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
main();
|
|
@@ -209,15 +209,19 @@ class ServerManager:
|
|
|
209
209
|
Start the server using the pmxt-ensure-server launcher.
|
|
210
210
|
"""
|
|
211
211
|
# 1. Check for bundled server (PRODUCTION - installed via pip)
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
launcher_filename = 'pmxt-ensure-server'
|
|
213
|
+
if os.name == "nt": # Check if running Windows
|
|
214
|
+
launcher_filename += ".js"
|
|
215
|
+
|
|
216
|
+
bundled_launcher = Path(__file__).parent / '_server' / 'bin' / launcher_filename
|
|
217
|
+
|
|
214
218
|
# 2. Check for monorepo structure (DEVELOPMENT)
|
|
215
219
|
current_file = Path(__file__).resolve()
|
|
216
|
-
local_launcher = current_file.parent.parent.parent.parent / 'core' / 'bin' /
|
|
217
|
-
|
|
220
|
+
local_launcher = current_file.parent.parent.parent.parent / 'core' / 'bin' / launcher_filename
|
|
221
|
+
|
|
218
222
|
# 3. Check PATH (GLOBAL INSTALL)
|
|
219
|
-
path_launcher = shutil.which(
|
|
220
|
-
|
|
223
|
+
path_launcher = shutil.which(launcher_filename)
|
|
224
|
+
|
|
221
225
|
# Priority order: bundled > local dev > PATH
|
|
222
226
|
if bundled_launcher.exists():
|
|
223
227
|
launcher = str(bundled_launcher)
|
|
@@ -235,7 +239,7 @@ class ServerManager:
|
|
|
235
239
|
|
|
236
240
|
# Call the launcher
|
|
237
241
|
try:
|
|
238
|
-
# If it's a JS file and we are calling it directly, might need node
|
|
242
|
+
# If it's a JS file, and we are calling it directly, might need node
|
|
239
243
|
cmd = [launcher]
|
|
240
244
|
if launcher.endswith('.js') or not os.access(launcher, os.X_OK):
|
|
241
245
|
cmd = ['node', launcher]
|
|
@@ -70,5 +70,7 @@ pmxt.egg-info/requires.txt
|
|
|
70
70
|
pmxt.egg-info/top_level.txt
|
|
71
71
|
pmxt/_server/__init__.py
|
|
72
72
|
pmxt/_server/bin/pmxt-ensure-server
|
|
73
|
+
pmxt/_server/bin/pmxt-ensure-server.js
|
|
73
74
|
pmxt/_server/server/bundled.js
|
|
74
|
-
tests/test_integration.py
|
|
75
|
+
tests/test_integration.py
|
|
76
|
+
tests/test_server_manager.py
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from unittest.mock import patch, MagicMock
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import os
|
|
5
|
+
import shutil
|
|
6
|
+
from pmxt.server_manager import ServerManager
|
|
7
|
+
|
|
8
|
+
class TestServerManagerCrossPlatform(unittest.TestCase):
|
|
9
|
+
"""
|
|
10
|
+
Tests the ServerManager launcher selection logic for both Unix and Windows.
|
|
11
|
+
These tests verify the fix for [WinError 193].
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def setUp(self):
|
|
15
|
+
self.manager = ServerManager()
|
|
16
|
+
|
|
17
|
+
@patch('pmxt.server_manager.os.name', 'nt')
|
|
18
|
+
@patch('pmxt.server_manager.shutil.which')
|
|
19
|
+
def test_launcher_filename_logic(self, mock_which):
|
|
20
|
+
"""
|
|
21
|
+
Verify the filename selection logic works as expected for both platforms.
|
|
22
|
+
We test the logic isolated from Path instantiation to avoid WindowsPath errors on Mac.
|
|
23
|
+
"""
|
|
24
|
+
import pmxt.server_manager as sm
|
|
25
|
+
|
|
26
|
+
# Test Windows logic
|
|
27
|
+
launcher_filename_win = 'pmxt-ensure-server'
|
|
28
|
+
with patch('pmxt.server_manager.os.name', 'nt'):
|
|
29
|
+
if sm.os.name == "nt":
|
|
30
|
+
launcher_filename_win += ".js"
|
|
31
|
+
self.assertEqual(launcher_filename_win, 'pmxt-ensure-server.js')
|
|
32
|
+
|
|
33
|
+
# Test Unix logic
|
|
34
|
+
launcher_filename_unix = 'pmxt-ensure-server'
|
|
35
|
+
with patch('pmxt.server_manager.os.name', 'posix'):
|
|
36
|
+
if sm.os.name == "nt":
|
|
37
|
+
launcher_filename_unix += ".js"
|
|
38
|
+
self.assertEqual(launcher_filename_unix, 'pmxt-ensure-server')
|
|
39
|
+
|
|
40
|
+
@patch('subprocess.run')
|
|
41
|
+
def test_node_execution_logic(self, mock_run):
|
|
42
|
+
"""
|
|
43
|
+
Verify that files ending in .js are executed with 'node'.
|
|
44
|
+
This is the core of the WinError 193 fix.
|
|
45
|
+
"""
|
|
46
|
+
mock_run.return_value = MagicMock(returncode=0)
|
|
47
|
+
|
|
48
|
+
# Scenario 1: .js file (Windows style)
|
|
49
|
+
# Should use ['node', 'path/to/script.js']
|
|
50
|
+
with patch('pmxt.server_manager.os.access', return_value=True):
|
|
51
|
+
with patch('pmxt.server_manager.Path') as mock_path:
|
|
52
|
+
# Mock bundled_launcher.exists() to True
|
|
53
|
+
mock_path.return_value.__truediv__.return_value.__truediv__.return_value.__truediv__.return_value.exists.return_value = True
|
|
54
|
+
|
|
55
|
+
# Setup the launcher path to end with .js
|
|
56
|
+
launcher_path = "/fake/path/pmxt-ensure-server.js"
|
|
57
|
+
|
|
58
|
+
# Simulate the execution logic
|
|
59
|
+
cmd = [launcher_path]
|
|
60
|
+
if launcher_path.endswith('.js') or not os.access(launcher_path, os.X_OK):
|
|
61
|
+
cmd = ['node', launcher_path]
|
|
62
|
+
|
|
63
|
+
self.assertEqual(cmd, ['node', launcher_path])
|
|
64
|
+
|
|
65
|
+
# Scenario 2: Unix executable (no extension)
|
|
66
|
+
# Should use ['path/to/script'] if os.access(X_OK) is True
|
|
67
|
+
launcher_path = "/fake/path/pmxt-ensure-server"
|
|
68
|
+
with patch('pmxt.server_manager.os.access', return_value=True):
|
|
69
|
+
cmd = [launcher_path]
|
|
70
|
+
if launcher_path.endswith('.js') or not os.access(launcher_path, os.X_OK):
|
|
71
|
+
cmd = ['node', launcher_path]
|
|
72
|
+
|
|
73
|
+
self.assertEqual(cmd, [launcher_path])
|
|
74
|
+
|
|
75
|
+
def test_bundling_creates_js_file(self):
|
|
76
|
+
"""
|
|
77
|
+
Verify that core/bin actually contains the .js file now.
|
|
78
|
+
"""
|
|
79
|
+
core_bin = Path(__file__).parent.parent.parent.parent / 'core' / 'bin'
|
|
80
|
+
launcher_js = core_bin / 'pmxt-ensure-server.js'
|
|
81
|
+
self.assertTrue(launcher_js.exists(), "pmxt-ensure-server.js should exist in core/bin")
|
|
82
|
+
self.assertTrue(os.access(launcher_js, os.X_OK), "pmxt-ensure-server.js should be executable")
|
|
83
|
+
|
|
84
|
+
if __name__ == '__main__':
|
|
85
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/get_execution_price_detailed200_response.py
RENAMED
|
File without changes
|
|
File without changes
|
{pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/get_execution_price_request_args_inner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/search_markets_request_args_inner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pmxt-1.4.0 → pmxt-1.4.1}/generated/pmxt_internal/models/watch_order_book_request_args_inner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|