inmem-memo 1.0.0 → 1.0.1

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.
Files changed (3) hide show
  1. package/README.md +92 -83
  2. package/bin/cli.js +97 -62
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  <img src="src/assets/icon.png" width="128" height="128" alt="InMem Scratchpad Icon" />
6
6
 
7
- ### 超高速・完全インメモリ型スクラッチパッド メモアプリケーション
8
- **npm / npx で即座に起動・インストール可能(Windows / macOS / Linux マルチプラットフォーム対応)**
7
+ ### Ultra-Fast, Pure In-Memory Scratchpad Memo Application
8
+ **Instantly launchable and installable via npm / npx across Windows, macOS, and Linux**
9
9
 
10
10
  [![npm version](https://img.shields.io/npm/v/inmem-memo.svg?style=flat-square&color=cb3837)](https://www.npmjs.com/package/inmem-memo)
11
11
  [![Framework: Tauri v2](https://img.shields.io/badge/Framework-Tauri%20v2.0-6366f1.svg?style=flat-square&logo=tauri&logoColor=white)](https://v2.tauri.app/)
@@ -13,138 +13,147 @@
13
13
  [![Storage: In-Memory Only](https://img.shields.io/badge/Storage-In--Memory%20Only-f59e0b.svg?style=flat-square)](https://github.com/)
14
14
  [![License: MIT](https://img.shields.io/badge/License-MIT-10b981.svg?style=flat-square)](LICENSE)
15
15
 
16
+ <br />
17
+
18
+ [📖 日本語のドキュメントはこちら (Japanese README)](./docs/ja/README.md)
19
+
16
20
  </div>
17
21
 
18
22
  ---
19
23
 
20
- ## 🚀 クイックスタート (npm / npx)
24
+ > 🤖 **Built with Vibe Coding**:
25
+ > This entire project—from architecture and Rust/Tauri native internals to UI design, undo history stacks, and automated CI/CD release pipelines—was designed, implemented, and refined through AI-assisted **Vibe Coding** (collaborative pair programming with AI).
26
+
27
+ ---
28
+
29
+ ## 🚀 Quick Start (npm / npx)
21
30
 
22
- Node.js がインストールされていれば、**インストール不要で今すぐ実行**できます:
31
+ No complex installation required. If you have Node.js installed, you can launch the native app instantly:
23
32
 
24
33
  ```bash
25
- # インストールなしで即座に起動
34
+ # Launch immediately without permanent installation
26
35
  npx inmem-memo
27
36
  ```
28
37
 
29
- グローバルコマンドとして常駐させたい場合:
38
+ To install as a permanent global CLI command:
30
39
 
31
40
  ```bash
32
- # グローバルインストール
41
+ # Global installation
33
42
  npm install -g inmem-memo
34
43
 
35
- # どこからでも起動
44
+ # Launch from anywhere in your terminal
36
45
  inmem-memo
37
46
  ```
38
47
 
39
48
  > [!TIP]
40
- > **🍎 macOS で初回起動時にセキュリティ警告が表示された場合**
41
- > Mac の **「システム設定」➔「プライバシーとセキュリティ」** を開き、画面下部の「"inmem-memo" は開発元を確認できないためブロックされました」の横にある **「このまま開く (Open Anyway)」** を1回クリックしてください。以降は通常通り起動します。
49
+ > **🍎 macOS First-Time Launch Note**
50
+ > If macOS Gatekeeper displays a security notice on first launch, open **System Settings ➔ Privacy & Security**, scroll down, and click **"Open Anyway"** next to `inmem-memo`. Subsequent launches will open immediately without prompts.
42
51
 
43
52
  ---
44
53
 
45
- ## 📖 コンセプト
54
+ ## 📖 Concept
46
55
 
47
- **「すぐに書いて、すぐに捨てる。」**
56
+ **"Write fast, discard immediately."**
48
57
 
49
- 日常のコーディングや作業中に発生する一時的なJSONの確認、正規表現による文字列置換、作業ログの控えなど、「保存する必要はないが今すぐ広げて使いたい」メモに特化した軽量スクラッチパッドです。
58
+ During development and daily work, we constantly need a temporary place to paste and inspect JSON payloads, perform quick regex string replacements, or jot down transient notes.
50
59
 
51
- タイトル編集・ファイル保存・フォルダ階層・検索インデックスといった複雑な管理機能をあえて排除し、**Rust + Tauri v2 による極限の高速起動と軽量性、完全なインメモリ設計**を実現しています。
60
+ InMem Scratchpad eliminates traditional note management overhead—such as title editing, file naming, folder hierarchies, and disk indexing—in favor of **instant startup speed, pure in-memory security, and ultra-low resource usage** powered by **Tauri v2 + Rust**.
52
61
 
53
62
  ---
54
63
 
55
- ## 🌟 主な機能・特長
56
-
57
- ### 1. 🛡️ 完全インメモリ保護ポリシー (Pure In-Memory)
58
- - **メモ本文の非永続化**: メモ内容はハードディスク・データベース・localStorage に一切書き込まれません。
59
- - **プロセスの完全終了とデータ破棄**: アプリケーションを完全に終了(設定画面の「アプリを完全終了」またはトレイメニューの「Quit」)すると、OSのメモリ解放によりデータは即座に完全消滅します。
60
- - **誤終了防止**: テキスト入力中にウィンドウを閉じようとした場合の警告アラートを標準装備。
61
-
62
- ### 2. ⚡ 右側クイックアクション・ツールバー (JSON整形 & 正規表現置換)
63
- - **JSON自動整形 (JSON Format)**:
64
- - ツールバー最上段に標準配置。崩れたJSON文字列をインデント付き(2スペース)で瞬時に美しく自動整形。
65
- - **カスタム正規表現アクション**:
66
- - 設定画面から「よく使う正規表現置換」をユーザー自身で自由に追加・編集・並べ替え・保存可能。
67
- - **ライブテスト機能**: 設定画面内で正規表現の動作をリアルタイムにプレビュー確認可能。
68
- - **ワンクリック追加プリセット**:
69
- - 「空行を削除」(`^\s*$\n` ➔ `""`)
70
- - 「行末スペース削除」(`[ \t]+$` ➔ `""`)
71
- - 「カンマを改行に」(`,\s*` ➔ `\n`)
72
- - 「HTMLタグ除去」(`<[^>]+>` ➔ `""`)
73
- - 「連続空白を1つに」(`[ \t]+` ➔ `" "`)
74
-
75
- ### 3. ↩️ `Ctrl + Z` (Undo) & `Ctrl + Y` (Redo) 履歴スタックの完全サポート
76
- - JSON整形や正規表現アクションを実行した後でも、**`Ctrl + Z`(Mac: `Cmd + Z`)** を押すだけで、アクション実行前の元のテキストへ一瞬で完璧に巻き戻せます。
77
- - やり直したい場合は **`Ctrl + Y`** または **`Ctrl + Shift + Z`(Mac: `Cmd + Shift + Z`)** で復元可能。
78
- - ヘッダーにも視覚的な「↩️ 戻す」「↪️ やり直す」アイコンボタンを搭載。
79
-
80
- ### 4. ⌨️ グローバルショートカット & タスクトレイ常駐
81
- - **常駐バックグラウンド待機**: ウィンドウの「×」ボタンを押すと、プロセスを終了せずにタスクトレイ(Windows)/ メニューバー(macOS)へ最小化。
82
- - **瞬時のホットキー呼び出し**:
83
- - 別の作業中(ブラウザやIDEなど)でも、ショートカットキーを押すだけで画面最前面に即座にポップアップ表示 / 非表示。
84
- - デフォルトは `Ctrl + Shift + M`(Mac: `Cmd + Shift + M`)。
85
- - 設定画面の**キー入力レコーダー**で、お好みのショートカットキーに直感的に変更可能(即時反映)。
86
-
87
- ### 5. ⚙️ 設定のローカル永続化 & 完全終了ボタン
88
- - メモ本文はメモリ限定ですが、以下の**ユーザー設定項目はローカル(localStorage)に安全に永続化**されます:
89
- - グローバルショートカットキー
90
- - 登録したカスタム正規表現アクション一覧
91
- - カラーテーマ(Midnight Dark / OLED Pure Black)
92
- - エディタ設定(フォントサイズ 13px/15px/17px、Tabインデント幅 2/4、自動折り返し)
93
- - **アプリの完全終了 (Exit)**:
94
- - 設定画面の「メモリ・終了」タブ、またはトレイの右クリックメニューから、タスクトレイ常駐を含めたプロセス全体を完全に終了できます。
95
-
96
- ### 6. 🎨 プレミアム UI & Markdown プレビュー
97
- - **Dark Glassmorphism UI**: 深みのあるグラデーションと洗練されたダークモード。
98
- - **Markdown プレビュー**: `Preview` ボタンでエディタとレンダリング表示をシームレスに切り替え。
99
- - **リアルタイムメトリクス**: ステータスバーに文字数・単語数・行数をライブ表示。
100
- - **ワンクリック操作**: 全文コピー (`Copy`)、手動バックアップ用エクスポート (`Export .md`)、クリア (`Clear`)。
64
+ ## 🌟 Key Features
65
+
66
+ ### 1. 🛡️ Pure In-Memory Security Policy
67
+ - **Zero Disk Persistence for Memo Text**: Note text is kept purely in RAM. It is never written to disk, databases, or `localStorage`.
68
+ - **Complete Erasure on Process Exit**: Terminating the application (via "Quit App" in settings or tray menu) immediately releases all allocated memory back to the OS.
69
+ - **Unload Guard**: Built-in confirmation prompt to prevent accidental data loss while typing.
70
+
71
+ ### 2. ⚡ Right Quick-Action Toolbar (JSON Format & Regex Replacements)
72
+ - **Built-in JSON Formatter**:
73
+ - Permanently pinned at the top. Instantly prettifies unformatted JSON payloads with clean 2-space indentation.
74
+ - **Custom Regular Expression Actions**:
75
+ - Add, edit, test, and save frequently used regex replacement rules via the Settings modal.
76
+ - **Live Preview Testing**: Interactive sandbox inside the Settings modal to verify pattern replacements in real time.
77
+ - **One-Click Presets**:
78
+ - "Clean Empty Lines" (`^\s*$\n` ➔ `""`)
79
+ - "Trim Trailing Spaces" (`[ \t]+$` ➔ `""`)
80
+ - "Comma to Newlines" (`,\s*` ➔ `\n`)
81
+ - "Strip HTML Tags" (`<[^>]+>` ➔ `""`)
82
+ - "Collapse Multiple Spaces" (`[ \t]+` ➔ `" "`)
83
+
84
+ ### 3. ↩️ Full `Ctrl + Z` (Undo) & `Ctrl + Y` (Redo) History Stack
85
+ - Even after executing batch transformations (JSON formatting or regex replacements), pressing **`Ctrl + Z` (Mac: `Cmd + Z`)** instantly restores the exact previous text state.
86
+ - Redo anytime using **`Ctrl + Y`** or **`Ctrl + Shift + Z` (Mac: `Cmd + Shift + Z`)**.
87
+ - Visual Undo/Redo icon buttons located directly in the header bar.
88
+
89
+ ### 4. ⌨️ Global Shortcut & System Tray Residency
90
+ - **Background Tray Standby**: Clicking the window close button (`×`) minimizes the app directly to the system tray (Windows) or menu bar (macOS).
91
+ - **Instant Hotkey Summon**:
92
+ - Press the global hotkey from any active window (IDE, browser, terminal) to instantly toggle the scratchpad on top of your screen.
93
+ - Default: `Ctrl + Shift + M` (Mac: `Cmd + Shift + M`).
94
+ - Customizable in Settings with an interactive key recorder.
95
+
96
+ ### 5. ⚙️ Local Settings Persistence & Complete App Exit
97
+ - While memo text remains strictly in-memory, your **user preferences are safely persisted to `localStorage`**:
98
+ - Global shortcut key
99
+ - Custom regex action library
100
+ - Theme choice (Midnight Dark / OLED Pure Black)
101
+ - Editor preferences (Font size, Tab width, Word wrap)
102
+ - **Complete Application Exit**:
103
+ - Easily terminate the background tray process and completely free memory with the "Quit App" button in Settings.
104
+
105
+ ### 6. 🎨 Modern Dark Glassmorphism UI & Markdown Preview
106
+ - **Aesthetic Dark Mode**: Curated color palette with fluid micro-animations.
107
+ - **Live Markdown Preview**: Toggle between raw text editing and formatted Markdown rendering with one click.
108
+ - **Live Statistics**: Status bar displaying real-time character, word, and line counts.
109
+ - **Quick Operations**: Copy all (`Copy`), export file (`Export .md`), and clear (`Clear`).
101
110
 
102
111
  ---
103
112
 
104
- ## ⌨️ ショートカットキー一覧
113
+ ## ⌨️ Keyboard Shortcuts
105
114
 
106
- | ショートカット | 動作 |
115
+ | Shortcut | Action |
107
116
  |---|---|
108
- | `Ctrl + Shift + M` (Mac: `Cmd + Shift + M`) | **グローバル呼び出し**(アプリの表示 / 非表示トグル)※設定で変更可能 |
109
- | `Ctrl + Z` (Mac: `Cmd + Z`) | **元に戻す (Undo)**(手入力・JSON整形・正規表現置換の直前状態へ復元) |
110
- | `Ctrl + Y` / `Ctrl + Shift + Z` | **やり直す (Redo)** |
111
- | `Tab` | エディタ内でのインデント挿入(スペース 2/4) |
112
- | 「×」閉じるボタン / トレイクリック | ウィンドウをトレイに隠す(メモリ上のメモデータは維持) |
117
+ | `Ctrl + Shift + M` (Mac: `Cmd + Shift + M`) | **Global Summon** (Toggle window visibility from anywhere) |
118
+ | `Ctrl + Z` (Mac: `Cmd + Z`) | **Undo** (Revert text changes, JSON formatting, or regex replacements) |
119
+ | `Ctrl + Y` / `Ctrl + Shift + Z` | **Redo** (Re-apply reverted changes) |
120
+ | `Tab` | Insert indentation (2 or 4 spaces) |
121
+ | Close (`×`) / Tray Click | Minimize to system tray (Memo text preserved in RAM) |
113
122
 
114
123
  ---
115
124
 
116
- ## 🏗️ 技術スタック & アーキテクチャ
125
+ ## 🏗️ Architecture & Tech Stack
117
126
 
118
- - **コアバックエンド**: [Tauri v2 (2.0)](https://v2.tauri.app/) (Rust)
119
- - `tauri-plugin-global-shortcut`: システム全体のホットキーバインド
120
- - `tray-icon`: システムトレイ・メニューバー常駐
121
- - `include_image!`: ネイティブアイコン埋め込み
122
- - **フロントエンド**: [React 18](https://react.dev/) + [Vite 5](https://vitejs.dev/) + [Lucide Icons](https://lucide.dev/)
123
- - **スタイリング**: Vanilla CSS (CSS Variables, Flex/Grid, Glassmorphism, Animations)
124
- - **配信・パッケージング**:
125
- - npm: CLI 自動ランナー (`inmem-memo`)
126
- - GitHub Actions: Windows (`.exe`), macOS (`.dmg`), Linux (`.AppImage`) 自動ビルド
127
+ - **Core Backend**: [Tauri v2 (2.0)](https://v2.tauri.app/) (Rust)
128
+ - `tauri-plugin-global-shortcut`: System-wide hotkey listener
129
+ - `tray-icon`: System tray / menu bar residency
130
+ - `include_image!`: Native embedded icon binaries
131
+ - **Frontend**: [React 18](https://react.dev/) + [Vite 5](https://vitejs.dev/) + [Lucide Icons](https://lucide.dev/)
132
+ - **Styling**: Vanilla CSS (Modern CSS Variables, Glassmorphism, Responsive Grid/Flexbox)
133
+ - **Distribution**:
134
+ - npm: Automated platform-resolving CLI runner (`inmem-memo`)
135
+ - GitHub Actions: Multi-platform automated builds for Windows (`.exe`), macOS (`.dmg`), and Linux (`.AppImage`)
127
136
 
128
137
  ---
129
138
 
130
- ## 💻 ローカル開発・ソースコードからのビルド
139
+ ## 💻 Local Development & Building from Source
131
140
 
132
141
  ```powershell
133
- # 依存パッケージのインストール
142
+ # Install frontend dependencies
134
143
  npm install
135
144
 
136
- # フロントエンド開発サーバーの起動 (ブラウザ確認)
145
+ # Start Vite dev server for browser preview
137
146
  npm run dev
138
147
 
139
- # Tauri デスクトップアプリのローカル開発起動
148
+ # Launch native desktop app in local development mode
140
149
  npm run tauri dev
141
150
 
142
- # プロダクションビルド
151
+ # Build production bundle and standalone binaries
143
152
  npm run tauri build
144
153
  ```
145
154
 
146
155
  ---
147
156
 
148
- ## 📄 ライセンス
157
+ ## 📄 License
149
158
 
150
159
  [MIT License](LICENSE) © 2026 InMem Scratchpad Project
package/bin/cli.js CHANGED
@@ -10,7 +10,7 @@ import { fileURLToPath } from 'url';
10
10
  const __filename = fileURLToPath(import.meta.url);
11
11
  const __dirname = path.dirname(__filename);
12
12
 
13
- // Read package.json for version and metadata
13
+ // Read package.json for version and repository
14
14
  const packageJson = JSON.parse(
15
15
  fs.readFileSync(path.join(__dirname, '../package.json'), 'utf8')
16
16
  );
@@ -19,56 +19,43 @@ const VERSION = packageJson.version;
19
19
  const REPO = 'jakelizzI/InMem_Scratchpad';
20
20
  const CACHE_DIR = path.join(os.homedir(), '.inmem-memo', `v${VERSION}`);
21
21
 
22
- function getPlatformInfo() {
23
- const platform = process.platform;
24
- const arch = process.arch;
25
-
26
- if (platform === 'win32') {
27
- return {
28
- osName: 'windows',
29
- fileName: 'inmem-memo.exe',
30
- assetName: 'inmem-memo.exe',
31
- executable: 'inmem-memo.exe'
32
- };
33
- } else if (platform === 'darwin') {
34
- return {
35
- osName: 'macos',
36
- fileName: 'inmem-memo',
37
- assetName: arch === 'arm64' ? 'inmem-memo_aarch64' : 'inmem-memo_x64',
38
- executable: 'inmem-memo'
39
- };
40
- } else if (platform === 'linux') {
41
- return {
42
- osName: 'linux',
43
- fileName: 'inmem-memo.AppImage',
44
- assetName: 'inmem-memo.AppImage',
45
- executable: 'inmem-memo.AppImage'
46
- };
47
- } else {
48
- throw new Error(`Unsupported platform: ${platform} (${arch})`);
49
- }
22
+ function fetchJson(url) {
23
+ return new Promise((resolve, reject) => {
24
+ https.get(url, { headers: { 'User-Agent': 'inmem-memo-cli' } }, (res) => {
25
+ if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
26
+ return fetchJson(res.headers.location).then(resolve).catch(reject);
27
+ }
28
+ if (res.statusCode !== 200) {
29
+ return reject(new Error(`HTTP ${res.statusCode}`));
30
+ }
31
+ let data = '';
32
+ res.on('data', chunk => data += chunk);
33
+ res.on('end', () => {
34
+ try {
35
+ resolve(JSON.parse(data));
36
+ } catch (e) {
37
+ reject(e);
38
+ }
39
+ });
40
+ }).on('error', reject);
41
+ });
50
42
  }
51
43
 
52
44
  function downloadFile(url, destPath) {
53
45
  return new Promise((resolve, reject) => {
54
- https.get(url, (response) => {
55
- // Handle redirects (GitHub releases 302 redirect to S3/CDN)
46
+ https.get(url, { headers: { 'User-Agent': 'inmem-memo-cli' } }, (response) => {
56
47
  if (response.statusCode >= 300 && response.statusCode < 400 && response.headers.location) {
57
48
  return downloadFile(response.headers.location, destPath).then(resolve).catch(reject);
58
49
  }
59
-
60
50
  if (response.statusCode !== 200) {
61
51
  return reject(new Error(`Failed to download binary: HTTP ${response.statusCode}`));
62
52
  }
63
-
64
53
  const fileStream = fs.createWriteStream(destPath);
65
54
  response.pipe(fileStream);
66
-
67
55
  fileStream.on('finish', () => {
68
56
  fileStream.close();
69
57
  resolve();
70
58
  });
71
-
72
59
  fileStream.on('error', (err) => {
73
60
  fs.unlink(destPath, () => {});
74
61
  reject(err);
@@ -77,48 +64,96 @@ function downloadFile(url, destPath) {
77
64
  });
78
65
  }
79
66
 
80
- async function main() {
67
+ async function getDownloadUrlAndExecutable() {
68
+ const platform = process.platform;
69
+ const arch = process.arch;
70
+
71
+ // Pattern matchers for release assets
72
+ let pattern = null;
73
+ let execName = 'inmem-memo';
74
+
75
+ if (platform === 'win32') {
76
+ pattern = /\.exe$/i;
77
+ execName = 'inmem-memo-setup.exe';
78
+ } else if (platform === 'linux') {
79
+ pattern = /\.AppImage$/i;
80
+ execName = 'inmem-memo.AppImage';
81
+ } else if (platform === 'darwin') {
82
+ pattern = arch === 'arm64' ? /aarch64\.dmg$/i : /x64\.dmg$/i;
83
+ execName = 'inmem-memo.dmg';
84
+ } else {
85
+ throw new Error(`Unsupported platform: ${platform} (${arch})`);
86
+ }
87
+
88
+ // Query GitHub release assets dynamically
89
+ const releaseApiUrl = `https://api.github.com/repos/${REPO}/releases/tags/v${VERSION}`;
90
+ let assetUrl = null;
91
+
81
92
  try {
82
- const platformInfo = getPlatformInfo();
93
+ const releaseData = await fetchJson(releaseApiUrl);
94
+ if (releaseData && Array.isArray(releaseData.assets)) {
95
+ const matched = releaseData.assets.find(a => pattern.test(a.name));
96
+ if (matched && matched.browser_download_url) {
97
+ assetUrl = matched.browser_download_url;
98
+ }
99
+ }
100
+ } catch (apiErr) {
101
+ // Fallback to static expected URL
102
+ if (platform === 'win32') {
103
+ assetUrl = `https://github.com/${REPO}/releases/download/v${VERSION}/inmem-memo_${VERSION}_x64-setup.exe`;
104
+ } else if (platform === 'linux') {
105
+ assetUrl = `https://github.com/${REPO}/releases/download/v${VERSION}/inmem-memo_${VERSION}_amd64.AppImage`;
106
+ } else if (platform === 'darwin') {
107
+ assetUrl = `https://github.com/${REPO}/releases/download/v${VERSION}/inmem-memo_${VERSION}_aarch64.dmg`;
108
+ }
109
+ }
110
+
111
+ if (!assetUrl) {
112
+ throw new Error(`Could not find a compatible binary release for ${platform} (${arch}).`);
113
+ }
83
114
 
115
+ return { downloadUrl: assetUrl, executable: execName };
116
+ }
117
+
118
+ async function main() {
119
+ try {
84
120
  if (!fs.existsSync(CACHE_DIR)) {
85
121
  fs.mkdirSync(CACHE_DIR, { recursive: true });
86
122
  }
87
123
 
88
- const localBinaryPath = path.join(CACHE_DIR, platformInfo.executable);
124
+ const { downloadUrl, executable } = await getDownloadUrlAndExecutable();
125
+ const localBinaryPath = path.join(CACHE_DIR, executable);
89
126
 
90
- // If not cached locally, download from GitHub Releases
91
127
  if (!fs.existsSync(localBinaryPath)) {
92
- console.log(`⚡ InMem Scratchpad (v${VERSION}) をセットアップしています...`);
93
- console.log(`📥 ネイティブバイナリ (${platformInfo.osName}) を取得中...`);
94
-
95
- const downloadUrl = `https://github.com/${REPO}/releases/download/v${VERSION}/${platformInfo.assetName}`;
96
-
97
- try {
98
- await downloadFile(downloadUrl, localBinaryPath);
99
- if (process.platform !== 'win32') {
100
- fs.chmodSync(localBinaryPath, 0o755);
101
- }
102
- console.log('✅ セットアップが完了しました!');
103
- } catch (dlErr) {
104
- console.error(`\n⚠️ バイナリの自動ダウンロードに失敗しました (${dlErr.message})`);
105
- console.error(`GitHub Releases (https://github.com/${REPO}/releases) から手動で取得することも可能です。\n`);
106
- process.exit(1);
128
+ console.log(`⚡ Setting up InMem Scratchpad (v${VERSION})...`);
129
+ console.log(`📥 Downloading native package from GitHub Releases...`);
130
+
131
+ await downloadFile(downloadUrl, localBinaryPath);
132
+
133
+ if (process.platform !== 'win32') {
134
+ fs.chmodSync(localBinaryPath, 0o755);
107
135
  }
136
+ console.log('✅ Setup complete!');
108
137
  }
109
138
 
110
- // Launch application in detached mode
111
- console.log('🚀 InMem Scratchpad を起動しています...');
112
- const child = spawn(localBinaryPath, [], {
113
- detached: true,
114
- stdio: 'ignore'
115
- });
139
+ console.log('🚀 Launching InMem Scratchpad...');
140
+
141
+ if (process.platform === 'win32') {
142
+ const child = spawn(localBinaryPath, [], { detached: true, stdio: 'ignore' });
143
+ child.unref();
144
+ } else if (process.platform === 'darwin') {
145
+ const child = spawn('open', [localBinaryPath], { detached: true, stdio: 'ignore' });
146
+ child.unref();
147
+ } else {
148
+ const child = spawn(localBinaryPath, [], { detached: true, stdio: 'ignore' });
149
+ child.unref();
150
+ }
116
151
 
117
- child.unref();
118
152
  process.exit(0);
119
153
 
120
154
  } catch (err) {
121
- console.error(`❌ エラー: ${err.message}`);
155
+ console.error(`\n❌ Error: ${err.message}`);
156
+ console.error(`Please download directly from https://github.com/${REPO}/releases\n`);
122
157
  process.exit(1);
123
158
  }
124
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inmem-memo",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Ultra-Fast In-Memory Scratchpad Memo Application for Windows, macOS, and Linux",
5
5
  "type": "module",
6
6
  "bin": {
@@ -43,6 +43,7 @@
43
43
  "dependencies": {
44
44
  "@tauri-apps/api": "^2.0.0",
45
45
  "@tauri-apps/plugin-global-shortcut": "^2.0.0",
46
+ "dompurify": "^3.4.13",
46
47
  "lucide-react": "^0.344.0",
47
48
  "marked": "^12.0.0",
48
49
  "react": "^18.3.1",