feat: tfcode

This commit is contained in:
Gab
2026-04-04 17:56:41 +11:00
parent ffc99307a8
commit c5af4f99e1
17 changed files with 643 additions and 10 deletions

View File

@@ -68,9 +68,14 @@ function runPythonSync(method, config = null) {
const apiKey = config?.api_key || process.env.TF_API_KEY || ""
const region = config?.region || process.env.TF_REGION || "au"
// Add embedded python path to sys.path
const embeddedPythonPath = join(__dirname, "..", "python")
const pythonCode = `
import json, sys, os
try:
# Add embedded tf_sync module path
sys.path.insert(0, "${embeddedPythonPath}")
os.environ["TF_WORKSPACE_ID"] = "${wsId}"
os.environ["TF_API_KEY"] = "${apiKey}"
os.environ["TF_REGION"] = "${region}"