mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 16:31:18 +02:00
Fixed plugins on Windows
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"coverage": "vitest run --coverage",
|
"coverage": "vitest run --coverage",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"replace-version": "node ./scripts/replace-version.cjs"
|
"replace-version": "node scripts/replace-version.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/commands": "^6.2.1",
|
"@codemirror/commands": "^6.2.1",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ new Promise(async () => {
|
|||||||
const pathPkg = path.join(pluginDir, 'package.json');
|
const pathPkg = path.join(pluginDir, 'package.json');
|
||||||
|
|
||||||
const pkg = JSON.parse(readFileSync(pathPkg, 'utf8'));
|
const pkg = JSON.parse(readFileSync(pathPkg, 'utf8'));
|
||||||
const mod = (await import(pathMod)).default ?? {};
|
const mod = (await import(`file://${pathMod}`)).default ?? {};
|
||||||
|
|
||||||
const info: PluginInfo = {
|
const info: PluginInfo = {
|
||||||
capabilities: [],
|
capabilities: [],
|
||||||
|
|||||||
@@ -2512,69 +2512,6 @@
|
|||||||
"clipboard-manager:deny-write-text"
|
"clipboard-manager:deny-write-text"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "deep-link:default -> Allows reading the opened deep link via the get_current command",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:default"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "deep-link:allow-get-current -> Enables the get_current command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:allow-get-current"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "deep-link:allow-is-registered -> Enables the is_registered command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:allow-is-registered"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "deep-link:allow-register -> Enables the register command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:allow-register"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "deep-link:allow-unregister -> Enables the unregister command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:allow-unregister"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "deep-link:deny-get-current -> Denies the get_current command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:deny-get-current"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "deep-link:deny-is-registered -> Denies the is_registered command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:deny-is-registered"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "deep-link:deny-register -> Denies the register command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:deny-register"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "deep-link:deny-unregister -> Denies the unregister command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deep-link:deny-unregister"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
|||||||
@@ -897,7 +897,10 @@ async fn cmd_request_to_curl(
|
|||||||
let request_json = serde_json::to_string(&rendered).map_err(|e| e.to_string())?;
|
let request_json = serde_json::to_string(&rendered).map_err(|e| e.to_string())?;
|
||||||
|
|
||||||
let manager: State<PluginManager> = app.state();
|
let manager: State<PluginManager> = app.state();
|
||||||
let import_response = manager.inner().run_export_curl(request_json.as_str()).await?;
|
let import_response = manager
|
||||||
|
.inner()
|
||||||
|
.run_export_curl(request_json.as_str())
|
||||||
|
.await?;
|
||||||
Ok(import_response.data)
|
Ok(import_response.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1569,6 +1572,7 @@ async fn cmd_check_for_updates(
|
|||||||
|
|
||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
|
#[allow(unused_mut)]
|
||||||
let mut builder = tauri::Builder::default()
|
let mut builder = tauri::Builder::default()
|
||||||
.plugin(
|
.plugin(
|
||||||
tauri_plugin_log::Builder::default()
|
tauri_plugin_log::Builder::default()
|
||||||
@@ -1613,11 +1617,6 @@ pub fn run() {
|
|||||||
builder = builder.plugin(tauri_plugin_mac_window::init());
|
builder = builder.plugin(tauri_plugin_mac_window::init());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
{
|
|
||||||
builder = builder; // Don't complain about not being mut
|
|
||||||
}
|
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
let app_data_dir = app.path().app_data_dir().unwrap();
|
let app_data_dir = app.path().app_data_dir().unwrap();
|
||||||
|
|||||||
@@ -24,11 +24,15 @@ pub async fn node_start<R: Runtime>(app: &AppHandle<R>, temp_dir: &PathBuf) -> S
|
|||||||
.path()
|
.path()
|
||||||
.resolve("plugins", BaseDirectory::Resource)
|
.resolve("plugins", BaseDirectory::Resource)
|
||||||
.expect("failed to resolve plugin directory resource");
|
.expect("failed to resolve plugin directory resource");
|
||||||
|
let plugins_dir = plugins_dir.to_string_lossy().to_string();
|
||||||
|
|
||||||
|
// Remove UNC prefix for Windows paths
|
||||||
|
let plugins_dir = plugins_dir.replace("\\\\?\\", "");
|
||||||
|
|
||||||
info!(
|
info!(
|
||||||
"Starting plugin runtime port_file={} plugins_dir={}",
|
"Starting plugin runtime port_file={} plugins_dir={}",
|
||||||
port_file_path.to_string_lossy(),
|
port_file_path.to_string_lossy(),
|
||||||
plugins_dir.to_string_lossy(),
|
plugins_dir,
|
||||||
);
|
);
|
||||||
|
|
||||||
let (mut rx, _child) = app
|
let (mut rx, _child) = app
|
||||||
|
|||||||
Reference in New Issue
Block a user