claude-remote-cli 2.3.0 → 2.3.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.
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
2
+ <rect width="512" height="512" rx="64" fill="#1a1a1a"/>
3
+ <text x="256" y="200" text-anchor="middle" font-family="monospace" font-size="72" font-weight="bold" fill="#d97757">&gt;_</text>
4
+ <text x="256" y="320" text-anchor="middle" font-family="-apple-system,sans-serif" font-size="56" font-weight="600" fill="#ececec">Claude</text>
5
+ <text x="256" y="390" text-anchor="middle" font-family="-apple-system,sans-serif" font-size="40" fill="#9b9b9b">Remote CLI</text>
6
+ </svg>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
6
+ <title>Claude Remote CLI</title>
7
+ <link rel="manifest" href="/manifest.json" />
8
+ <link rel="icon" href="/icon.svg" type="image/svg+xml" />
9
+ <link rel="apple-touch-icon" href="/icon-192.png" />
10
+ <meta name="mobile-web-app-capable" content="yes" />
11
+ <meta name="apple-mobile-web-app-capable" content="yes" />
12
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
13
+ <meta name="theme-color" content="#1a1a1a" />
14
+ <script type="module" crossorigin src="/assets/index-BGqcIpDR.js"></script>
15
+ <link rel="stylesheet" crossorigin href="/assets/index-8m372dVq.css">
16
+ </head>
17
+ <body>
18
+ <div id="app"></div>
19
+ <script>if ('serviceWorker' in navigator) navigator.serviceWorker.register('/sw.js');</script>
20
+ </body>
21
+ </html>
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "Claude Remote CLI",
3
+ "short_name": "Claude CLI",
4
+ "display": "standalone",
5
+ "start_url": "/",
6
+ "background_color": "#1a1a1a",
7
+ "theme_color": "#1a1a1a",
8
+ "icons": [
9
+ {
10
+ "src": "/icon-192.png",
11
+ "sizes": "192x192",
12
+ "type": "image/png"
13
+ },
14
+ {
15
+ "src": "/icon-512.png",
16
+ "sizes": "512x512",
17
+ "type": "image/png"
18
+ },
19
+ {
20
+ "src": "/icon.svg",
21
+ "sizes": "any",
22
+ "type": "image/svg+xml"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,5 @@
1
+ // Minimal service worker for PWA install prompt support.
2
+ // Does not cache — all requests pass through to the network.
3
+ self.addEventListener('fetch', function (event) {
4
+ event.respondWith(fetch(event.request));
5
+ });
@@ -152,10 +152,29 @@ async function main() {
152
152
  console.log('PIN set successfully.');
153
153
  }
154
154
  const authenticatedTokens = new Set();
155
+ // Build frontend if missing (e.g. fresh clone in development)
156
+ const frontendDir = path.join(__dirname, '..', 'frontend');
157
+ if (!fs.existsSync(path.join(frontendDir, 'index.html'))) {
158
+ const packageRoot = path.join(__dirname, '..', '..');
159
+ const viteConfig = path.join(packageRoot, 'frontend', 'vite.config.ts');
160
+ if (fs.existsSync(viteConfig)) {
161
+ console.log('Frontend not built — building now...');
162
+ try {
163
+ await execFileAsync('npx', ['vite', 'build', '--config', 'frontend/vite.config.ts'], { cwd: packageRoot });
164
+ console.log('Frontend build complete.');
165
+ }
166
+ catch (err) {
167
+ console.error('Frontend build failed:', err instanceof Error ? err.message : err);
168
+ }
169
+ }
170
+ else {
171
+ console.warn('Frontend assets missing and source not available — UI will not be served.');
172
+ }
173
+ }
155
174
  const app = express();
156
175
  app.use(express.json({ limit: '15mb' }));
157
176
  app.use(cookieParser());
158
- app.use(express.static(path.join(__dirname, '..', 'frontend')));
177
+ app.use(express.static(frontendDir));
159
178
  const requireAuth = (req, res, next) => {
160
179
  const token = req.cookies && req.cookies.token;
161
180
  if (!token || !authenticatedTokens.has(token)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-remote-cli",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Remote web interface for Claude Code CLI sessions",
5
5
  "type": "module",
6
6
  "main": "dist/server/index.js",
@@ -17,6 +17,7 @@
17
17
  "dev": "vite --config frontend/vite.config.ts",
18
18
  "start": "tsc && vite build --config frontend/vite.config.ts && node dist/server/index.js",
19
19
  "test": "tsc -p tsconfig.test.json && node --test dist/test/*.test.js",
20
+ "prepublishOnly": "npm run build",
20
21
  "postinstall": "chmod +x node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper 2>/dev/null || true"
21
22
  },
22
23
  "engines": {