fpasoterm 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fpasoterm might be problematic. Click here for more details.
- package/CHANGELOG.md +230 -0
- package/CONTRIBUTING.md +67 -0
- package/INSTALL.ja.md +204 -0
- package/INSTALL.md +229 -0
- package/LICENSE +21 -0
- package/README.ja.md +389 -0
- package/README.md +607 -0
- package/bin/fpasoterm +2882 -0
- package/completions/_fpasoterm +81 -0
- package/completions/fpasoterm.bash +55 -0
- package/completions/fpasoterm.fish +64 -0
- package/completions/fpasoterm.ps1 +47 -0
- package/docs/capability-diagnostics.en.md +77 -0
- package/docs/capability-diagnostics.ja.md +63 -0
- package/docs/completion.en.md +141 -0
- package/docs/completion.ja.md +113 -0
- package/docs/config.en.md +554 -0
- package/docs/config.ja.md +544 -0
- package/docs/debugging.en.md +72 -0
- package/docs/debugging.ja.md +66 -0
- package/docs/diagnostics.en.md +69 -0
- package/docs/diagnostics.ja.md +64 -0
- package/docs/font-diagnostics.en.md +116 -0
- package/docs/font-diagnostics.ja.md +105 -0
- package/docs/fpasoterm-plugin.d.ts +51 -0
- package/docs/known-issues.en.md +23 -0
- package/docs/known-issues.ja.md +23 -0
- package/docs/plugins.en.md +266 -0
- package/docs/plugins.ja.md +176 -0
- package/docs/pr-review.en.md +177 -0
- package/docs/pr-review.ja.md +170 -0
- package/docs/release-checklist.en.md +72 -0
- package/docs/release-checklist.ja.md +71 -0
- package/docs/security.en.md +36 -0
- package/docs/security.ja.md +31 -0
- package/docs/spec.en.md +106 -0
- package/docs/spec.ja.md +99 -0
- package/docs/sshfs.en.md +28 -0
- package/docs/sshfs.ja.md +28 -0
- package/docs/sync.en.md +280 -0
- package/docs/sync.ja.md +280 -0
- package/examples/apply-default-appearance.bat +8 -0
- package/examples/apply-default-appearance.ps1 +7 -0
- package/examples/apply-default-appearance.sh +7 -0
- package/examples/apply-runtime-appearance.bat +8 -0
- package/examples/apply-runtime-appearance.ps1 +7 -0
- package/examples/apply-runtime-appearance.sh +7 -0
- package/examples/config/default-appearance.toml +36 -0
- package/examples/config/minimal.toml +30 -0
- package/examples/config/profiles.toml +20 -0
- package/examples/config/runtime-appearance.toml +24 -0
- package/examples/config/sync-folder.toml +17 -0
- package/examples/config/tui-compatibility.toml +7 -0
- package/examples/config/with-plugins.toml +33 -0
- package/examples/plugins/hello.ts +17 -0
- package/examples/plugins/status-banner.ts +14 -0
- package/examples/plugins/theme.ts +32 -0
- package/examples/plugins/welcome-banner.ts +16 -0
- package/extra/linux/icons/hicolor/128x128/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/16x16/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/192x192/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/256x256/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/32x32/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/48x48/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/512x512/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/64x64/apps/fpasoterm.png +0 -0
- package/extra/linux/io.github.oyoguhito.fpasoterm.desktop +10 -0
- package/extra/logo/fpasoterm.png +0 -0
- package/extra/macos/fpasoterm.icns +0 -0
- package/extra/windows/fpasoterm.cmd +40 -0
- package/extra/windows/fpasoterm.ico +0 -0
- package/package.json +81 -0
- package/scripts/build-artifacts.js +183 -0
- package/scripts/generate-icon.js +251 -0
- package/scripts/init-jj-empty-main +41 -0
- package/scripts/install-linux-desktop.js +238 -0
- package/scripts/run +16 -0
- package/scripts/security/scan-secrets.js +89 -0
- package/scripts/tests/smoke.js +2476 -0
- package/scripts/uninstall-desktop.js +20 -0
- package/scripts/uninstall-linux-desktop.js +96 -0
- package/scripts/uninstall-windows-path.js +94 -0
- package/src/config.js +855 -0
- package/src/renderer/confirm.html +71 -0
- package/src/renderer/index.html +223 -0
- package/src/renderer/renderer.js +4166 -0
- package/src/renderer/styles.css +969 -0
- package/src/renderer/vendor/addon-fit/addon-fit.js +2 -0
- package/src/renderer/vendor/addon-image/LICENSE +19 -0
- package/src/renderer/vendor/addon-image/addon-image.js +3 -0
- package/src/renderer/vendor/addon-web-links/LICENSE +19 -0
- package/src/renderer/vendor/addon-web-links/addon-web-links.js +2 -0
- package/src/renderer/vendor/xterm/xterm.css +292 -0
- package/src/renderer/vendor/xterm/xterm.js +2 -0
- package/src-tauri/Cargo.lock +5253 -0
- package/src-tauri/Cargo.toml +29 -0
- package/src-tauri/build.rs +140 -0
- package/src-tauri/capabilities/default.json +13 -0
- package/src-tauri/default-config.toml +128 -0
- package/src-tauri/src/main.rs +9347 -0
- package/src-tauri/tauri.conf.json +60 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "fpasoterm"
|
|
3
|
+
version = "1.6.0"
|
|
4
|
+
description = "Cross-platform terminal with Japanese IME support."
|
|
5
|
+
authors = ["oyoguhito"]
|
|
6
|
+
edition = "2021"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
|
|
9
|
+
[build-dependencies]
|
|
10
|
+
tauri-build = { version = "2.5.2", features = [] }
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
base64 = "0.22"
|
|
14
|
+
encoding_rs = "0.8"
|
|
15
|
+
hmac = "0.12"
|
|
16
|
+
portable-pty = "0.9.0"
|
|
17
|
+
serde = { version = "1.0", features = ["derive"] }
|
|
18
|
+
serde_json = "1.0"
|
|
19
|
+
sha2 = "0.10"
|
|
20
|
+
tauri = { version = "2.9.2", features = ["image-png", "macos-private-api", "protocol-asset"] }
|
|
21
|
+
tauri-plugin-notification = "=2.3.3"
|
|
22
|
+
toml = "0.9.8"
|
|
23
|
+
ureq = "2.12.1"
|
|
24
|
+
|
|
25
|
+
[target.'cfg(unix)'.dependencies]
|
|
26
|
+
libc = "0.2"
|
|
27
|
+
|
|
28
|
+
[target.'cfg(windows)'.dependencies]
|
|
29
|
+
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_NetworkManagement_WNet", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_DataExchange", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Memory", "Win32_System_Threading", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] }
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
use std::env;
|
|
2
|
+
use std::fs;
|
|
3
|
+
use std::path::{Path, PathBuf};
|
|
4
|
+
use std::process::Command;
|
|
5
|
+
|
|
6
|
+
// Runs git from the repository root and returns trimmed standard output.
|
|
7
|
+
fn git_output(root: &Path, arguments: &[&str]) -> Option<String> {
|
|
8
|
+
let output = Command::new("git")
|
|
9
|
+
.arg("-C")
|
|
10
|
+
.arg(root)
|
|
11
|
+
.args(arguments)
|
|
12
|
+
.output()
|
|
13
|
+
.ok()?;
|
|
14
|
+
if !output.status.success() {
|
|
15
|
+
return None;
|
|
16
|
+
}
|
|
17
|
+
let value = String::from_utf8(output.stdout).ok()?;
|
|
18
|
+
let value = value.trim().to_string();
|
|
19
|
+
(!value.is_empty()).then_some(value)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Registers HEAD and its active ref so a branch switch rebuilds the commit id.
|
|
23
|
+
fn watch_git_revision(root: &Path) {
|
|
24
|
+
let Some(head_path) = git_output(root, &["rev-parse", "--git-path", "HEAD"]) else {
|
|
25
|
+
return;
|
|
26
|
+
};
|
|
27
|
+
let head_path = root.join(head_path);
|
|
28
|
+
println!("cargo:rerun-if-changed={}", head_path.display());
|
|
29
|
+
|
|
30
|
+
if let Ok(head) = fs::read_to_string(&head_path) {
|
|
31
|
+
if let Some(reference) = head.trim().strip_prefix("ref: ") {
|
|
32
|
+
if let Some(reference_path) = git_output(root, &["rev-parse", "--git-path", reference])
|
|
33
|
+
{
|
|
34
|
+
println!(
|
|
35
|
+
"cargo:rerun-if-changed={}",
|
|
36
|
+
root.join(reference_path).display()
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if let Some(packed_refs) = git_output(root, &["rev-parse", "--git-path", "packed-refs"]) {
|
|
42
|
+
println!(
|
|
43
|
+
"cargo:rerun-if-changed={}",
|
|
44
|
+
root.join(packed_refs).display()
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// jj keeps the working-copy commit outside Git's HEAD. Watch its state when
|
|
50
|
+
// present so contributor builds refresh the version shown by Help and --version.
|
|
51
|
+
fn watch_jj_revision(root: &Path) {
|
|
52
|
+
for relative_path in [".jj/working_copy/tree_state", ".jj/repo/op_heads"] {
|
|
53
|
+
let path = root.join(relative_path);
|
|
54
|
+
if path.exists() {
|
|
55
|
+
println!("cargo:rerun-if-changed={}", path.display());
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Tauri bundles frontendDist from outside Cargo's normal source tree. Watch
|
|
61
|
+
// every renderer asset so a cached native build cannot retain an older menu or
|
|
62
|
+
// Help panel after a checkout changes only HTML, JavaScript, or CSS.
|
|
63
|
+
fn watch_frontend_assets(path: &Path) {
|
|
64
|
+
println!("cargo:rerun-if-changed={}", path.display());
|
|
65
|
+
let Ok(entries) = fs::read_dir(path) else {
|
|
66
|
+
return;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
for entry in entries.flatten() {
|
|
70
|
+
let entry_path = entry.path();
|
|
71
|
+
if entry_path.is_dir() {
|
|
72
|
+
watch_frontend_assets(&entry_path);
|
|
73
|
+
} else {
|
|
74
|
+
println!("cargo:rerun-if-changed={}", entry_path.display());
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Returns the current jj commit only in a jj checkout. Release archives and
|
|
80
|
+
// regular Git clones intentionally continue through the Git fallback below.
|
|
81
|
+
fn jj_working_copy_commit(root: &Path) -> Option<String> {
|
|
82
|
+
if !root.join(".jj").is_dir() {
|
|
83
|
+
return None;
|
|
84
|
+
}
|
|
85
|
+
let home = env::var_os("HOME").map(PathBuf::from);
|
|
86
|
+
let mise_data = env::var_os("MISE_DATA_DIR")
|
|
87
|
+
.map(PathBuf::from)
|
|
88
|
+
.or_else(|| home.as_ref().map(|path| path.join(".local/share/mise")));
|
|
89
|
+
let mut candidates = Vec::new();
|
|
90
|
+
if let Some(path) = env::var_os("JJ").map(PathBuf::from) {
|
|
91
|
+
candidates.push(path);
|
|
92
|
+
}
|
|
93
|
+
if let Some(path) = mise_data {
|
|
94
|
+
candidates.push(path.join("shims/jj"));
|
|
95
|
+
}
|
|
96
|
+
if let Some(path) = home {
|
|
97
|
+
candidates.push(path.join(".cargo/bin/jj"));
|
|
98
|
+
}
|
|
99
|
+
let jj_program = candidates
|
|
100
|
+
.into_iter()
|
|
101
|
+
.find(|path| path.is_file())
|
|
102
|
+
.unwrap_or_else(|| PathBuf::from("jj"));
|
|
103
|
+
let output = Command::new(jj_program)
|
|
104
|
+
.current_dir(root)
|
|
105
|
+
.args(["log", "-r", "@", "--no-graph", "-T", "commit_id"])
|
|
106
|
+
.output()
|
|
107
|
+
.ok()?;
|
|
108
|
+
if !output.status.success() {
|
|
109
|
+
return None;
|
|
110
|
+
}
|
|
111
|
+
let value = String::from_utf8(output.stdout).ok()?;
|
|
112
|
+
let value = value.trim().to_string();
|
|
113
|
+
(!value.is_empty()).then_some(value)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Embeds an override for reproducible packaging, the jj working copy for
|
|
117
|
+
// contributor builds, or the checkout's Git HEAD. The value is shown by Help.
|
|
118
|
+
fn build_commit(root: &Path) -> String {
|
|
119
|
+
env::var("FPASOTERM_BUILD_COMMIT")
|
|
120
|
+
.ok()
|
|
121
|
+
.filter(|value| !value.trim().is_empty())
|
|
122
|
+
.or_else(|| jj_working_copy_commit(root))
|
|
123
|
+
.or_else(|| git_output(root, &["rev-parse", "HEAD"]))
|
|
124
|
+
.unwrap_or_else(|| "unknown".to_string())
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
fn main() {
|
|
128
|
+
let manifest_dir =
|
|
129
|
+
PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("Cargo manifest directory"));
|
|
130
|
+
let repository_root = manifest_dir.parent().unwrap_or(&manifest_dir);
|
|
131
|
+
println!("cargo:rerun-if-env-changed=FPASOTERM_BUILD_COMMIT");
|
|
132
|
+
watch_git_revision(repository_root);
|
|
133
|
+
watch_jj_revision(repository_root);
|
|
134
|
+
watch_frontend_assets(&repository_root.join("src/renderer"));
|
|
135
|
+
println!(
|
|
136
|
+
"cargo:rustc-env=FPASOTERM_BUILD_COMMIT={}",
|
|
137
|
+
build_commit(repository_root)
|
|
138
|
+
);
|
|
139
|
+
tauri_build::build();
|
|
140
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../gen/schemas/desktop-schema.json",
|
|
3
|
+
"identifier": "default",
|
|
4
|
+
"description": "Permissions required by the fpasoterm main window.",
|
|
5
|
+
"windows": ["main"],
|
|
6
|
+
"permissions": [
|
|
7
|
+
"core:default",
|
|
8
|
+
"core:event:default",
|
|
9
|
+
"core:event:allow-listen",
|
|
10
|
+
"core:window:allow-start-resize-dragging",
|
|
11
|
+
"notification:default"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# fpasoterm user configuration.
|
|
2
|
+
|
|
3
|
+
[window]
|
|
4
|
+
title = "fpasoterm"
|
|
5
|
+
width = 1000
|
|
6
|
+
height = 680
|
|
7
|
+
minWidth = 420
|
|
8
|
+
minHeight = 260
|
|
9
|
+
backgroundColor = "rgba(0, 0, 0, 0)"
|
|
10
|
+
titlebarColor = "#1565c0"
|
|
11
|
+
titleLocked = true
|
|
12
|
+
themeSource = "system"
|
|
13
|
+
frame = false
|
|
14
|
+
rememberBounds = true
|
|
15
|
+
|
|
16
|
+
[terminal]
|
|
17
|
+
allowTransparency = true
|
|
18
|
+
cursorBlink = true
|
|
19
|
+
cursorStyle = "block"
|
|
20
|
+
fontFamily = "\"DejaVu Sans Mono\", \"Noto Sans Mono\", \"Noto Sans Mono CJK JP\", \"Noto Sans Mono CJK KR\", \"Noto Sans Mono CJK SC\", \"NanumGothicCoding\", \"BIZ UDGothic\", \"Symbols Nerd Font Mono\", \"Symbols Nerd Font\", \"JetBrainsMono Nerd Font\", \"Noto Sans CJK JP\", \"Noto Sans CJK KR\", \"Noto Sans CJK SC\", \"Noto Sans CJK TC\", \"Hiragino Kaku Gothic ProN\", \"Apple SD Gothic Neo\", \"Malgun Gothic\", Meiryo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
21
|
+
fontSize = 14
|
|
22
|
+
lineHeight = 1
|
|
23
|
+
minimumContrastRatio = 1
|
|
24
|
+
rescaleOverlappingGlyphs = false
|
|
25
|
+
backgroundOpacity = 0.65
|
|
26
|
+
scrollback = 1000
|
|
27
|
+
termName = "xterm-256color"
|
|
28
|
+
# encoding controls decoding of PTY output. Keep UTF-8 unless a legacy program
|
|
29
|
+
# explicitly emits Shift_JIS or EUC-JP bytes.
|
|
30
|
+
encoding = "utf-8"
|
|
31
|
+
shell = ""
|
|
32
|
+
# Enables enhanced Kitty keyboard negotiation for compatible TUIs. Keep false
|
|
33
|
+
# unless needed; this is separate from the currently disabled graphics addon.
|
|
34
|
+
kittyKeyboard = false
|
|
35
|
+
|
|
36
|
+
# [terminal.images] is reserved for a future stable renderer.
|
|
37
|
+
# Current builds ignore this section. Do not add it to config.toml.
|
|
38
|
+
|
|
39
|
+
[terminal.theme]
|
|
40
|
+
background = "rgba(16, 19, 23, 0.65)"
|
|
41
|
+
foreground = "#e8edf2"
|
|
42
|
+
cursor = "#f5d76e"
|
|
43
|
+
selectionBackground = "#35506b"
|
|
44
|
+
black = "#11151a"
|
|
45
|
+
red = "#ff6b6b"
|
|
46
|
+
green = "#8bd17c"
|
|
47
|
+
yellow = "#f5d76e"
|
|
48
|
+
blue = "#7bb7ff"
|
|
49
|
+
magenta = "#d7a8ff"
|
|
50
|
+
cyan = "#63d4d5"
|
|
51
|
+
white = "#e8edf2"
|
|
52
|
+
brightBlack = "#5d6978"
|
|
53
|
+
brightRed = "#ff8f8f"
|
|
54
|
+
brightGreen = "#ade89f"
|
|
55
|
+
brightYellow = "#ffe08a"
|
|
56
|
+
brightBlue = "#a4ceff"
|
|
57
|
+
brightMagenta = "#e3c3ff"
|
|
58
|
+
brightCyan = "#9de9ea"
|
|
59
|
+
brightWhite = "#ffffff"
|
|
60
|
+
|
|
61
|
+
[ime]
|
|
62
|
+
duplicateGuard = true
|
|
63
|
+
duplicateWindowMs = 800
|
|
64
|
+
repeatedTextWindowMs = 140
|
|
65
|
+
|
|
66
|
+
# Mod means Ctrl on Windows/Linux and Cmd on macOS. Set prefix = "Ctrl+Alt"
|
|
67
|
+
# when Ctrl+Shift is reserved by a Windows application or keyboard layout.
|
|
68
|
+
# An individual value may be a key such as "N" or a full shortcut such as
|
|
69
|
+
# "Ctrl+Alt+KeyN". KeyN-style values bind by physical keyboard position.
|
|
70
|
+
[keybindings]
|
|
71
|
+
prefix = "Mod+Shift"
|
|
72
|
+
logMenu = "L"
|
|
73
|
+
logToggle = "S"
|
|
74
|
+
logShow = "P"
|
|
75
|
+
copy = "C"
|
|
76
|
+
paste = "V"
|
|
77
|
+
menu = "M"
|
|
78
|
+
help = "H"
|
|
79
|
+
newWindow = "N"
|
|
80
|
+
openCwd = "o"
|
|
81
|
+
broadcast = "B"
|
|
82
|
+
kill = "K"
|
|
83
|
+
tile = "T"
|
|
84
|
+
closeAll = "X"
|
|
85
|
+
|
|
86
|
+
[plugins]
|
|
87
|
+
enabled = []
|
|
88
|
+
|
|
89
|
+
[sync]
|
|
90
|
+
enabled = false
|
|
91
|
+
provider = "folder"
|
|
92
|
+
path = ""
|
|
93
|
+
channel = "default"
|
|
94
|
+
diagnostics = true
|
|
95
|
+
maxBytes = 1048576
|
|
96
|
+
commands = false
|
|
97
|
+
commandSecret = ""
|
|
98
|
+
commandTtlSeconds = 60
|
|
99
|
+
|
|
100
|
+
[logging]
|
|
101
|
+
enabled = true
|
|
102
|
+
directory = ""
|
|
103
|
+
autoStart = false
|
|
104
|
+
maxBytes = 10485760
|
|
105
|
+
|
|
106
|
+
# OSC safety controls. OSC 52 can change the OS clipboard, so disable it when
|
|
107
|
+
# terminal output is untrusted. OSC 7/133 only update local diagnostics.
|
|
108
|
+
[security]
|
|
109
|
+
osc52 = "trusted"
|
|
110
|
+
osc52MaxBytes = 65536
|
|
111
|
+
osc7 = true
|
|
112
|
+
osc133 = true
|
|
113
|
+
# OSC 8 URLs always require a confirmation dialog. Enable external browser
|
|
114
|
+
# opening only for terminal output you trust. OSC 9/99 notifications are off
|
|
115
|
+
# by default and rate-limited when enabled.
|
|
116
|
+
osc8Open = false
|
|
117
|
+
oscNotifications = false
|
|
118
|
+
oscNotificationMinIntervalMs = 5000
|
|
119
|
+
|
|
120
|
+
# Profiles are optional named overlays selected with --profile <name>.
|
|
121
|
+
# They may contain [window], [terminal], [ime], [keybindings], [sync],
|
|
122
|
+
# [logging], or [security] settings. The selected profile overrides them.
|
|
123
|
+
#
|
|
124
|
+
# [profiles.large-font.terminal]
|
|
125
|
+
# fontSize = 18
|
|
126
|
+
#
|
|
127
|
+
# [profiles.transparent.terminal]
|
|
128
|
+
# backgroundOpacity = 0.65
|