mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 11:51:13 +01:00
From SEA to regular NodeJS
This commit is contained in:
@@ -23,10 +23,16 @@ pub async fn node_start<R: Runtime>(app: &AppHandle<R>, temp_dir: &PathBuf) -> S
|
||||
let plugins_dir = app
|
||||
.path()
|
||||
.resolve("plugins", BaseDirectory::Resource)
|
||||
.expect("failed to resolve plugin directory resource");
|
||||
let plugins_dir = plugins_dir.to_string_lossy().to_string();
|
||||
.expect("failed to resolve plugin directory resource")
|
||||
.to_string_lossy()
|
||||
.to_string();
|
||||
|
||||
// Remove UNC prefix for Windows paths
|
||||
let plugin_runtime_dir = app
|
||||
.path()
|
||||
.resolve("plugin-runtime", BaseDirectory::Resource)
|
||||
.expect("failed to resolve plugin runtime resource");
|
||||
|
||||
// HACK: Remove UNC prefix for Windows paths
|
||||
let plugins_dir = plugins_dir.replace("\\\\?\\", "");
|
||||
|
||||
info!(
|
||||
@@ -37,10 +43,11 @@ pub async fn node_start<R: Runtime>(app: &AppHandle<R>, temp_dir: &PathBuf) -> S
|
||||
|
||||
let (mut rx, _child) = app
|
||||
.shell()
|
||||
.sidecar("yaakplugins")
|
||||
.sidecar("node")
|
||||
.unwrap()
|
||||
.env("GRPC_PORT_FILE_PATH", port_file_path.clone())
|
||||
.env("PLUGINS_DIR", plugins_dir)
|
||||
.args(&[plugin_runtime_dir.join("index.cjs")])
|
||||
.spawn()
|
||||
.unwrap();
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"category": "DeveloperTool",
|
||||
"externalBin": [
|
||||
"vendored/protoc/protoc",
|
||||
"vendored/plugin-runtime/yaakplugins"
|
||||
"vendored/node/node"
|
||||
],
|
||||
"icon": [
|
||||
"icons/release/32x32.png",
|
||||
@@ -55,7 +55,8 @@
|
||||
"resources": {
|
||||
"migrations": "migrations",
|
||||
"vendored/protoc/include": "protoc-include",
|
||||
"vendored/plugins": "plugins"
|
||||
"vendored/plugins": "plugins",
|
||||
"../plugin-runtime/build": "plugin-runtime"
|
||||
},
|
||||
"shortDescription": "Play with APIs, intuitively",
|
||||
"targets": [
|
||||
|
||||
Reference in New Issue
Block a user