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.

Files changed (101) hide show
  1. package/CHANGELOG.md +230 -0
  2. package/CONTRIBUTING.md +67 -0
  3. package/INSTALL.ja.md +204 -0
  4. package/INSTALL.md +229 -0
  5. package/LICENSE +21 -0
  6. package/README.ja.md +389 -0
  7. package/README.md +607 -0
  8. package/bin/fpasoterm +2882 -0
  9. package/completions/_fpasoterm +81 -0
  10. package/completions/fpasoterm.bash +55 -0
  11. package/completions/fpasoterm.fish +64 -0
  12. package/completions/fpasoterm.ps1 +47 -0
  13. package/docs/capability-diagnostics.en.md +77 -0
  14. package/docs/capability-diagnostics.ja.md +63 -0
  15. package/docs/completion.en.md +141 -0
  16. package/docs/completion.ja.md +113 -0
  17. package/docs/config.en.md +554 -0
  18. package/docs/config.ja.md +544 -0
  19. package/docs/debugging.en.md +72 -0
  20. package/docs/debugging.ja.md +66 -0
  21. package/docs/diagnostics.en.md +69 -0
  22. package/docs/diagnostics.ja.md +64 -0
  23. package/docs/font-diagnostics.en.md +116 -0
  24. package/docs/font-diagnostics.ja.md +105 -0
  25. package/docs/fpasoterm-plugin.d.ts +51 -0
  26. package/docs/known-issues.en.md +23 -0
  27. package/docs/known-issues.ja.md +23 -0
  28. package/docs/plugins.en.md +266 -0
  29. package/docs/plugins.ja.md +176 -0
  30. package/docs/pr-review.en.md +177 -0
  31. package/docs/pr-review.ja.md +170 -0
  32. package/docs/release-checklist.en.md +72 -0
  33. package/docs/release-checklist.ja.md +71 -0
  34. package/docs/security.en.md +36 -0
  35. package/docs/security.ja.md +31 -0
  36. package/docs/spec.en.md +106 -0
  37. package/docs/spec.ja.md +99 -0
  38. package/docs/sshfs.en.md +28 -0
  39. package/docs/sshfs.ja.md +28 -0
  40. package/docs/sync.en.md +280 -0
  41. package/docs/sync.ja.md +280 -0
  42. package/examples/apply-default-appearance.bat +8 -0
  43. package/examples/apply-default-appearance.ps1 +7 -0
  44. package/examples/apply-default-appearance.sh +7 -0
  45. package/examples/apply-runtime-appearance.bat +8 -0
  46. package/examples/apply-runtime-appearance.ps1 +7 -0
  47. package/examples/apply-runtime-appearance.sh +7 -0
  48. package/examples/config/default-appearance.toml +36 -0
  49. package/examples/config/minimal.toml +30 -0
  50. package/examples/config/profiles.toml +20 -0
  51. package/examples/config/runtime-appearance.toml +24 -0
  52. package/examples/config/sync-folder.toml +17 -0
  53. package/examples/config/tui-compatibility.toml +7 -0
  54. package/examples/config/with-plugins.toml +33 -0
  55. package/examples/plugins/hello.ts +17 -0
  56. package/examples/plugins/status-banner.ts +14 -0
  57. package/examples/plugins/theme.ts +32 -0
  58. package/examples/plugins/welcome-banner.ts +16 -0
  59. package/extra/linux/icons/hicolor/128x128/apps/fpasoterm.png +0 -0
  60. package/extra/linux/icons/hicolor/16x16/apps/fpasoterm.png +0 -0
  61. package/extra/linux/icons/hicolor/192x192/apps/fpasoterm.png +0 -0
  62. package/extra/linux/icons/hicolor/256x256/apps/fpasoterm.png +0 -0
  63. package/extra/linux/icons/hicolor/32x32/apps/fpasoterm.png +0 -0
  64. package/extra/linux/icons/hicolor/48x48/apps/fpasoterm.png +0 -0
  65. package/extra/linux/icons/hicolor/512x512/apps/fpasoterm.png +0 -0
  66. package/extra/linux/icons/hicolor/64x64/apps/fpasoterm.png +0 -0
  67. package/extra/linux/io.github.oyoguhito.fpasoterm.desktop +10 -0
  68. package/extra/logo/fpasoterm.png +0 -0
  69. package/extra/macos/fpasoterm.icns +0 -0
  70. package/extra/windows/fpasoterm.cmd +40 -0
  71. package/extra/windows/fpasoterm.ico +0 -0
  72. package/package.json +81 -0
  73. package/scripts/build-artifacts.js +183 -0
  74. package/scripts/generate-icon.js +251 -0
  75. package/scripts/init-jj-empty-main +41 -0
  76. package/scripts/install-linux-desktop.js +238 -0
  77. package/scripts/run +16 -0
  78. package/scripts/security/scan-secrets.js +89 -0
  79. package/scripts/tests/smoke.js +2476 -0
  80. package/scripts/uninstall-desktop.js +20 -0
  81. package/scripts/uninstall-linux-desktop.js +96 -0
  82. package/scripts/uninstall-windows-path.js +94 -0
  83. package/src/config.js +855 -0
  84. package/src/renderer/confirm.html +71 -0
  85. package/src/renderer/index.html +223 -0
  86. package/src/renderer/renderer.js +4166 -0
  87. package/src/renderer/styles.css +969 -0
  88. package/src/renderer/vendor/addon-fit/addon-fit.js +2 -0
  89. package/src/renderer/vendor/addon-image/LICENSE +19 -0
  90. package/src/renderer/vendor/addon-image/addon-image.js +3 -0
  91. package/src/renderer/vendor/addon-web-links/LICENSE +19 -0
  92. package/src/renderer/vendor/addon-web-links/addon-web-links.js +2 -0
  93. package/src/renderer/vendor/xterm/xterm.css +292 -0
  94. package/src/renderer/vendor/xterm/xterm.js +2 -0
  95. package/src-tauri/Cargo.lock +5253 -0
  96. package/src-tauri/Cargo.toml +29 -0
  97. package/src-tauri/build.rs +140 -0
  98. package/src-tauri/capabilities/default.json +13 -0
  99. package/src-tauri/default-config.toml +128 -0
  100. package/src-tauri/src/main.rs +9347 -0
  101. package/src-tauri/tauri.conf.json +60 -0
@@ -0,0 +1,20 @@
1
+ const childProcess = require('node:child_process');
2
+ const path = require('node:path');
3
+
4
+ const root = path.resolve(__dirname, '..');
5
+
6
+ // Runs the platform-specific uninstaller used by the npm script entry point.
7
+ function main() {
8
+ if (process.platform === 'win32') {
9
+ childProcess.execFileSync(process.execPath, [path.join(root, 'scripts', 'uninstall-windows-path.js')], {
10
+ stdio: 'inherit',
11
+ });
12
+ return;
13
+ }
14
+
15
+ childProcess.execFileSync(process.execPath, [path.join(root, 'scripts', 'uninstall-linux-desktop.js')], {
16
+ stdio: 'inherit',
17
+ });
18
+ }
19
+
20
+ main();
@@ -0,0 +1,96 @@
1
+ const childProcess = require('node:child_process');
2
+ const fs = require('node:fs');
3
+ const os = require('node:os');
4
+ const path = require('node:path');
5
+
6
+ const dataHome = process.env.XDG_DATA_HOME || path.join(os.homedir(), '.local', 'share');
7
+ const binHome = process.env.XDG_BIN_HOME || path.join(os.homedir(), '.local', 'bin');
8
+ const configHome = process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config');
9
+ const cacheHome = process.env.XDG_CACHE_HOME || path.join(os.homedir(), '.cache');
10
+ const applicationsDir = path.join(dataHome, 'applications');
11
+ const iconsDir = path.join(dataHome, 'icons', 'hicolor');
12
+ const appDataDir = path.join(dataHome, 'io.github.oyoguhito.fpasoterm');
13
+ const configDir = path.join(configHome, 'fpasoterm');
14
+ const cacheDir = path.join(cacheHome, 'fpasoterm');
15
+ const iconSizes = [16, 32, 48, 64, 128, 192, 256, 512];
16
+
17
+ // Removes a file if it was installed by fpasoterm or a legacy version.
18
+ function removeFile(target) {
19
+ if (!fs.existsSync(target)) {
20
+ console.log(`not found: ${target}`);
21
+ return;
22
+ }
23
+
24
+ fs.rmSync(target, { force: true });
25
+ console.log(`removed: ${target}`);
26
+ }
27
+
28
+ // Removes a directory only when no other application files remain inside it.
29
+ function removeEmptyDir(target) {
30
+ try {
31
+ fs.rmdirSync(target);
32
+ console.log(`removed empty directory: ${target}`);
33
+ } catch (error) {
34
+ if (!['ENOENT', 'ENOTEMPTY'].includes(error.code)) {
35
+ throw error;
36
+ }
37
+ }
38
+ }
39
+
40
+ // Removes a private fpasoterm directory such as config, cache, or WebKit data.
41
+ function removeDir(target) {
42
+ if (!fs.existsSync(target)) {
43
+ console.log(`not found: ${target}`);
44
+ return;
45
+ }
46
+
47
+ fs.rmSync(target, { recursive: true, force: true });
48
+ console.log(`removed: ${target}`);
49
+ }
50
+
51
+ // Checks whether the applications directory still contains desktop entries.
52
+ function hasDesktopEntries(target) {
53
+ try {
54
+ return fs.readdirSync(target).some((entry) => entry.endsWith('.desktop'));
55
+ } catch (error) {
56
+ if (error.code === 'ENOENT') {
57
+ return false;
58
+ }
59
+ throw error;
60
+ }
61
+ }
62
+
63
+ // Runs optional desktop cache refresh commands when available.
64
+ function runOptional(command, args) {
65
+ const result = childProcess.spawnSync(command, args, { stdio: 'inherit' });
66
+ if (result.error && result.error.code !== 'ENOENT') {
67
+ throw result.error;
68
+ }
69
+ }
70
+
71
+ removeFile(path.join(binHome, 'fpasoterm'));
72
+ removeFile(path.join(applicationsDir, 'io.github.oyoguhito.fpasoterm.desktop'));
73
+ removeFile(path.join(applicationsDir, 'fpasoterm.desktop'));
74
+ removeFile(path.join(applicationsDir, 'io.github.oyoguhito.FpasoTerm.desktop'));
75
+
76
+ for (const size of iconSizes) {
77
+ const iconDir = path.join(iconsDir, `${size}x${size}`, 'apps');
78
+ removeFile(path.join(iconDir, 'fpasoterm.png'));
79
+ removeFile(path.join(iconDir, 'io.github.oyoguhito.fpasoterm.png'));
80
+ removeEmptyDir(iconDir);
81
+ removeEmptyDir(path.dirname(iconDir));
82
+ }
83
+
84
+ runOptional('update-desktop-database', [applicationsDir]);
85
+ runOptional('gtk-update-icon-cache', ['-q', iconsDir]);
86
+
87
+ removeDir(configDir);
88
+ removeDir(cacheDir);
89
+ removeDir(appDataDir);
90
+
91
+ if (!hasDesktopEntries(applicationsDir)) {
92
+ removeFile(path.join(applicationsDir, 'mimeinfo.cache'));
93
+ }
94
+
95
+ removeEmptyDir(applicationsDir);
96
+ removeEmptyDir(iconsDir);
@@ -0,0 +1,94 @@
1
+ const childProcess = require('node:child_process');
2
+
3
+ // Normalizes a Windows PATH entry enough for case-insensitive comparison.
4
+ function normalizePathEntry(value) {
5
+ return value
6
+ .trim()
7
+ .replace(/^"+|"+$/g, '')
8
+ .replaceAll('/', '\\')
9
+ .replace(/[\\;]+$/g, '')
10
+ .toLowerCase();
11
+ }
12
+
13
+ // Keeps this uninstaller scoped to fpasoterm-owned directories only.
14
+ function isFpasotermPathEntry(value) {
15
+ const normalized = normalizePathEntry(value);
16
+ if (!normalized) {
17
+ return false;
18
+ }
19
+
20
+ const parts = normalized.split('\\').filter(Boolean);
21
+ const last = parts.at(-1);
22
+ const parent = parts.at(-2);
23
+ return last === 'fpasoterm' || parent === 'fpasoterm' || normalized.includes('\\fpasoterm\\');
24
+ }
25
+
26
+ // Reads the current user's Path value through PowerShell's .NET API.
27
+ function readUserPath() {
28
+ return childProcess.execFileSync(
29
+ 'powershell.exe',
30
+ [
31
+ '-NoProfile',
32
+ '-ExecutionPolicy',
33
+ 'Bypass',
34
+ '-Command',
35
+ "[Environment]::GetEnvironmentVariable('Path', 'User')",
36
+ ],
37
+ { encoding: 'utf8' },
38
+ ).trim();
39
+ }
40
+
41
+ // Writes the current user's Path through .NET to avoid truncating long values.
42
+ function writeUserPath(value) {
43
+ childProcess.execFileSync(
44
+ 'powershell.exe',
45
+ [
46
+ '-NoProfile',
47
+ '-ExecutionPolicy',
48
+ 'Bypass',
49
+ '-Command',
50
+ "[Environment]::SetEnvironmentVariable('Path', $env:FPASOTERM_UNINSTALL_USER_PATH, 'User')",
51
+ ],
52
+ {
53
+ env: {
54
+ ...process.env,
55
+ FPASOTERM_UNINSTALL_USER_PATH: value,
56
+ },
57
+ stdio: 'inherit',
58
+ },
59
+ );
60
+ }
61
+
62
+ // Removes fpasoterm-specific entries from the current user's Path.
63
+ function main() {
64
+ const currentPath = readUserPath();
65
+ const entries = currentPath.split(';').filter((entry) => entry.trim());
66
+ const kept = [];
67
+ const removed = [];
68
+ const seen = new Set();
69
+
70
+ for (const entry of entries) {
71
+ const normalized = normalizePathEntry(entry);
72
+ if (isFpasotermPathEntry(entry)) {
73
+ removed.push(entry);
74
+ continue;
75
+ }
76
+ if (!seen.has(normalized)) {
77
+ seen.add(normalized);
78
+ kept.push(entry);
79
+ }
80
+ }
81
+
82
+ if (removed.length === 0) {
83
+ console.log('no fpasoterm path entries found in the current user Path');
84
+ return;
85
+ }
86
+
87
+ writeUserPath(kept.join(';'));
88
+ for (const entry of removed) {
89
+ console.log(`removed user Path entry: ${entry}`);
90
+ }
91
+ console.log('restart terminals or sign out and back in for the updated Path to be visible everywhere');
92
+ }
93
+
94
+ main();