chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:44:08 +08:00
commit 983960e2dd
1244 changed files with 281996 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { spawn } from 'node:child_process'
import {
PYTHON_BRIDGE_ENTRY_PATH,
PYTHON_BRIDGE_RUNTIME_BIN_PATH
} from '@/constants'
import { LogHelper } from '@/helpers/log-helper'
/**
* Run the Python bridge directly from source with Leon's managed Python
* runtime. This keeps local development aligned with the runtime used by Leon.
*/
;(async () => {
const args = process.argv.slice(2)
const child = spawn(
PYTHON_BRIDGE_RUNTIME_BIN_PATH,
[PYTHON_BRIDGE_ENTRY_PATH, ...args],
{
stdio: 'inherit',
windowsHide: true
}
)
child.on('exit', (code) => {
process.exit(code ?? 0)
})
child.on('error', (error) => {
LogHelper.error(`Failed to start the Python bridge: ${error}`)
process.exit(1)
})
})()