fix: emit file:// plugin URLs for dsh ESM loader on Windows

This commit is contained in:
2026-09-04 12:08:37 +08:00
parent 01218b2907
commit a14a8d9233
3 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -11,8 +11,9 @@ CONSOLE_PORT="${GYXX_CONSOLE_PORT:-8765}"
BRIDGE_PORT="${GYXX_WB_BRIDGE_PORT:-8790}"
# 1) 渲染 cordis.local.yml(插件路径必须为绝对路径)
# dsh 的 ESM 加载器要求 file:// URLWindows 上必须,POSIX 上同样可用)
sed \
-e "s|__PLUGIN_DIR__|$WORKBENCH_DIR/plugin|g" \
-e "s|__WORKBENCH_DIR__|file://$WORKBENCH_DIR|g" \
-e "s|__PROJECT_ROOT__|$REPO_ROOT|g" \
-e "s|bridgePort: 8790|bridgePort: $BRIDGE_PORT|g" \
-e "s|http://127.0.0.1:8765|http://127.0.0.1:$CONSOLE_PORT|g" \