Release RuneStone 0.1.4 with installable plugins and settings

This commit is contained in:
Knotty Wyvern
2026-10-04 15:05:51 -07:00
parent 0268c5c9f0
commit 6b7af0d527
82 changed files with 4150 additions and 212 deletions
+36 -1
View File
@@ -3032,7 +3032,7 @@ dependencies = [
[[package]]
name = "runestone"
version = "0.1.3"
version = "0.1.4"
dependencies = [
"base64 0.23.1",
"dunce",
@@ -3041,12 +3041,15 @@ dependencies = [
"portable-pty",
"serde",
"serde_json",
"sha2",
"tauri",
"tauri-build",
"tauri-plugin-dialog",
"tauri-plugin-opener",
"thiserror 2.0.20",
"uuid",
"windows-sys 0.61.2",
"zip",
]
[[package]]
@@ -4294,6 +4297,12 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "typed-path"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e"
[[package]]
name = "typeid"
version = "1.0.3"
@@ -5341,6 +5350,20 @@ dependencies = [
"syn 3.0.6",
]
[[package]]
name = "zip"
version = "8.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b"
dependencies = [
"crc32fast",
"flate2",
"indexmap 2.14.2",
"memchr",
"typed-path",
"zopfli",
]
[[package]]
name = "zlib-rs"
version = "0.6.8"
@@ -5353,6 +5376,18 @@ version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
[[package]]
name = "zopfli"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"
dependencies = [
"bumpalo",
"crc32fast",
"log",
"simd-adler32",
]
[[package]]
name = "zvariant"
version = "5.15.0"
+4 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "runestone"
version = "0.1.3"
version = "0.1.4"
description = "Writing workspace plus script editor"
authors = ["you"]
edition = "2021"
@@ -25,6 +25,9 @@ tauri-plugin-dialog = "2.7.3"
windows-sys = { version = "0.61.2", features = ["Win32_Storage_FileSystem", "Win32_UI_Input_KeyboardAndMouse"] }
base64 = "0.23.1"
portable-pty = "0.9.0"
zip = { version = "8.6.0", default-features = false, features = ["deflate"] }
sha2 = "0.10"
uuid = { version = "1", features = ["v4"] }
# Read the optimization guideline for more details: https://tauri.app/concept/size/#cargo-configuration
+13
View File
@@ -19,6 +19,19 @@ fn main() {
"workspace_abs_path",
"workspace_reveal",
"workspace_search",
"plugins_snapshot",
"plugins_choose",
"plugins_cancel",
"plugins_install",
"plugins_set_enabled",
"plugins_load",
"plugins_release",
"plugins_prepare_remove",
"plugins_remove",
"plugins_retry_remove",
"plugins_reveal",
"plugins_data",
"plugins_asset",
"pty_open",
"pty_write",
"pty_resize",
+13
View File
@@ -29,6 +29,19 @@
"allow-workspace-abs-path",
"allow-workspace-reveal",
"allow-workspace-search",
"allow-plugins-snapshot",
"allow-plugins-choose",
"allow-plugins-cancel",
"allow-plugins-install",
"allow-plugins-set-enabled",
"allow-plugins-load",
"allow-plugins-release",
"allow-plugins-prepare-remove",
"allow-plugins-remove",
"allow-plugins-retry-remove",
"allow-plugins-reveal",
"allow-plugins-data",
"allow-plugins-asset",
"allow-pty-open",
"allow-pty-write",
"allow-pty-resize",
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-asset"
description = "Enables the plugins_asset command without any pre-configured scope."
commands.allow = ["plugins_asset"]
[[permission]]
identifier = "deny-plugins-asset"
description = "Denies the plugins_asset command without any pre-configured scope."
commands.deny = ["plugins_asset"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-cancel"
description = "Enables the plugins_cancel command without any pre-configured scope."
commands.allow = ["plugins_cancel"]
[[permission]]
identifier = "deny-plugins-cancel"
description = "Denies the plugins_cancel command without any pre-configured scope."
commands.deny = ["plugins_cancel"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-choose"
description = "Enables the plugins_choose command without any pre-configured scope."
commands.allow = ["plugins_choose"]
[[permission]]
identifier = "deny-plugins-choose"
description = "Denies the plugins_choose command without any pre-configured scope."
commands.deny = ["plugins_choose"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-data"
description = "Enables the plugins_data command without any pre-configured scope."
commands.allow = ["plugins_data"]
[[permission]]
identifier = "deny-plugins-data"
description = "Denies the plugins_data command without any pre-configured scope."
commands.deny = ["plugins_data"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-install"
description = "Enables the plugins_install command without any pre-configured scope."
commands.allow = ["plugins_install"]
[[permission]]
identifier = "deny-plugins-install"
description = "Denies the plugins_install command without any pre-configured scope."
commands.deny = ["plugins_install"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-load"
description = "Enables the plugins_load command without any pre-configured scope."
commands.allow = ["plugins_load"]
[[permission]]
identifier = "deny-plugins-load"
description = "Denies the plugins_load command without any pre-configured scope."
commands.deny = ["plugins_load"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-prepare-remove"
description = "Enables the plugins_prepare_remove command without any pre-configured scope."
commands.allow = ["plugins_prepare_remove"]
[[permission]]
identifier = "deny-plugins-prepare-remove"
description = "Denies the plugins_prepare_remove command without any pre-configured scope."
commands.deny = ["plugins_prepare_remove"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-release"
description = "Enables the plugins_release command without any pre-configured scope."
commands.allow = ["plugins_release"]
[[permission]]
identifier = "deny-plugins-release"
description = "Denies the plugins_release command without any pre-configured scope."
commands.deny = ["plugins_release"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-remove"
description = "Enables the plugins_remove command without any pre-configured scope."
commands.allow = ["plugins_remove"]
[[permission]]
identifier = "deny-plugins-remove"
description = "Denies the plugins_remove command without any pre-configured scope."
commands.deny = ["plugins_remove"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-retry-remove"
description = "Enables the plugins_retry_remove command without any pre-configured scope."
commands.allow = ["plugins_retry_remove"]
[[permission]]
identifier = "deny-plugins-retry-remove"
description = "Denies the plugins_retry_remove command without any pre-configured scope."
commands.deny = ["plugins_retry_remove"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-reveal"
description = "Enables the plugins_reveal command without any pre-configured scope."
commands.allow = ["plugins_reveal"]
[[permission]]
identifier = "deny-plugins-reveal"
description = "Denies the plugins_reveal command without any pre-configured scope."
commands.deny = ["plugins_reveal"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-set-enabled"
description = "Enables the plugins_set_enabled command without any pre-configured scope."
commands.allow = ["plugins_set_enabled"]
[[permission]]
identifier = "deny-plugins-set-enabled"
description = "Denies the plugins_set_enabled command without any pre-configured scope."
commands.deny = ["plugins_set_enabled"]
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!
[[permission]]
identifier = "allow-plugins-snapshot"
description = "Enables the plugins_snapshot command without any pre-configured scope."
commands.allow = ["plugins_snapshot"]
[[permission]]
identifier = "deny-plugins-snapshot"
description = "Denies the plugins_snapshot command without any pre-configured scope."
commands.deny = ["plugins_snapshot"]
+16
View File
@@ -1,4 +1,5 @@
mod pty;
mod plugins;
mod workspace;
use pty::PtyState;
@@ -12,6 +13,7 @@ pub fn run() {
.plugin(tauri_plugin_dialog::init())
.manage(WorkspaceState::new())
.manage(PtyState::new())
.manage(plugins::PluginState::default())
.invoke_handler(tauri::generate_handler![
workspace::workspace_open,
workspace::workspace_open_window,
@@ -30,6 +32,19 @@ pub fn run() {
workspace::workspace_abs_path,
workspace::workspace_reveal,
workspace::workspace_search,
plugins::plugins_snapshot,
plugins::plugins_choose,
plugins::plugins_cancel,
plugins::plugins_install,
plugins::plugins_set_enabled,
plugins::plugins_load,
plugins::plugins_release,
plugins::plugins_prepare_remove,
plugins::plugins_remove,
plugins::plugins_retry_remove,
plugins::plugins_reveal,
plugins::plugins_data,
plugins::plugins_asset,
pty::pty_open,
pty::pty_write,
pty::pty_resize,
@@ -43,6 +58,7 @@ pub fn run() {
.run(|app, event| {
if let tauri::RunEvent::WindowEvent { label, event: tauri::WindowEvent::Destroyed, .. } = &event {
app.state::<PtyState>().close_window(label);
app.state::<plugins::PluginState>().close_window(label);
app.state::<WorkspaceState>().close_window(label);
}
if matches!(event, tauri::RunEvent::Exit) {
File diff suppressed because it is too large Load Diff
+40 -13
View File
@@ -456,7 +456,11 @@ pub fn workspace_open(
#[tauri::command]
pub fn workspace_list(window: tauri::Window, state: State<WorkspaceState>, rel: String) -> WsResult<Vec<TreeEntry>> {
let root = current_root(&state, window.label())?;
let dir = resolve_existing(&root, &rel)?;
list_entries(&root, &rel)
}
fn list_entries(root: &Path, rel: &str) -> WsResult<Vec<TreeEntry>> {
let dir = resolve_existing(root, rel)?;
if !dir.is_dir() {
return Err(err("path is not a folder"));
}
@@ -464,12 +468,7 @@ pub fn workspace_list(window: tauri::Window, state: State<WorkspaceState>, rel:
let mut entries = Vec::new();
let walker = ignore::WalkBuilder::new(&dir)
.max_depth(Some(1))
.hidden(false)
.git_ignore(true)
.require_git(false)
.git_global(true)
.git_exclude(true)
.parents(true)
.standard_filters(false)
.build();
for result in walker {
@@ -788,17 +787,18 @@ pub struct SearchHit {
#[tauri::command]
pub fn workspace_search(window: tauri::Window, state: State<WorkspaceState>, query: String) -> WsResult<Vec<SearchHit>> {
let root = current_root(&state, window.label())?;
search_entries(&root, &query)
}
fn search_entries(root: &Path, query: &str) -> WsResult<Vec<SearchHit>> {
let needle = query.trim().to_lowercase();
if needle.is_empty() {
return Ok(Vec::new());
}
let root = current_root(&state, window.label())?;
let mut hits = Vec::new();
let walker = ignore::WalkBuilder::new(&root)
.hidden(false)
.git_ignore(true)
.require_git(false)
.git_global(true)
let walker = ignore::WalkBuilder::new(root)
.standard_filters(false)
.filter_entry(|entry| {
entry.depth() == 0 || !is_internal_name(&entry.file_name().to_string_lossy())
})
@@ -887,6 +887,33 @@ mod tests {
use super::*;
use std::path::PathBuf;
#[test]
fn ignore_files_do_not_hide_workspace_entries_or_search_results() {
let fixture = std::env::temp_dir().join(format!("rs-ignore-rules-{}", std::process::id()));
let root = fixture.join("workspace");
fs::create_dir_all(root.join(".git/info")).unwrap();
fs::write(fixture.join(".ignore"), "parent-excluded/\n").unwrap();
fs::write(root.join(".gitignore"), "papers/\n").unwrap();
fs::write(root.join(".ignore"), "local-excluded/\n").unwrap();
fs::write(root.join(".git/info/exclude"), "git-excluded/\n").unwrap();
for folder in ["papers", "local-excluded", "git-excluded", "parent-excluded", ".hidden-notes"] {
fs::create_dir_all(root.join(folder)).unwrap();
fs::write(root.join(folder).join("note.md"), "unique search phrase").unwrap();
}
fs::write(root.join("papers/.gitignore"), "note.md\n").unwrap();
let root = dunce::canonicalize(root).unwrap();
let entries = list_entries(&root, "").unwrap();
let hits = search_entries(&root, "unique search phrase").unwrap();
for folder in ["papers", "local-excluded", "git-excluded", "parent-excluded", ".hidden-notes"] {
assert!(entries.iter().any(|entry| entry.rel_path == folder && entry.kind == "folder"), "{folder}");
let note = format!("{folder}/note.md");
assert!(list_entries(&root, folder).unwrap().iter().any(|entry| entry.rel_path == note), "{note}");
assert!(hits.iter().any(|hit| hit.rel_path == note && hit.line == 1), "{note}");
}
assert!(!entries.iter().any(|entry| entry.name == ".git"));
fs::remove_dir_all(fixture).unwrap();
}
#[test]
fn windows_keep_independent_roots_and_cleanup() {
let state = WorkspaceState::new();
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "RuneStone",
"version": "0.1.3",
"version": "0.1.4",
"identifier": "com.runestone.app",
"build": {
"beforeDevCommand": "pnpm dev",