markupr 2.6.0 → 2.6.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.
@@ -3558,7 +3558,7 @@ async function runInit(options) {
3558
3558
  }
3559
3559
 
3560
3560
  // src/cli/index.ts
3561
- var VERSION = true ? "2.6.0" : "0.0.0-dev";
3561
+ var VERSION = true ? "2.6.1" : "0.0.0-dev";
3562
3562
  var SYMBOLS = {
3563
3563
  check: "\u2714",
3564
3564
  // checkmark
@@ -4222,7 +4222,7 @@ function registerResources(server) {
4222
4222
  }
4223
4223
 
4224
4224
  // src/mcp/server.ts
4225
- var VERSION = true ? "2.6.0" : "0.0.0-dev";
4225
+ var VERSION = true ? "2.6.1" : "0.0.0-dev";
4226
4226
  function createServer() {
4227
4227
  const server = new McpServer2({
4228
4228
  name: "markupr",
@@ -4242,7 +4242,7 @@ function createServer() {
4242
4242
  }
4243
4243
 
4244
4244
  // src/mcp/index.ts
4245
- var VERSION2 = true ? "2.6.0" : "0.0.0-dev";
4245
+ var VERSION2 = true ? "2.6.1" : "0.0.0-dev";
4246
4246
  log(`markupr MCP server v${VERSION2} starting...`);
4247
4247
  process.on("uncaughtException", (error) => {
4248
4248
  log(`Uncaught exception: ${error instanceof Error ? error.message : String(error)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markupr",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "Record your screen, narrate feedback, get structured Markdown with screenshots. Desktop app, CLI, and MCP server for AI coding agents like Claude Code, Cursor, and Windsurf.",
5
5
  "type": "module",
6
6
  "main": "dist/main/index.mjs",
@@ -10,7 +10,8 @@
10
10
  },
11
11
  "files": [
12
12
  "dist/cli",
13
- "dist/mcp"
13
+ "dist/mcp",
14
+ "scripts/postinstall.mjs"
14
15
  ],
15
16
  "author": "Eddie San Juan",
16
17
  "license": "MIT",
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawnSync } from 'node:child_process';
4
+ import { existsSync } from 'node:fs';
5
+ import { dirname, join } from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+
10
+ function isRailwayEnvironment() {
11
+ return Object.keys(process.env).some((key) => key.startsWith('RAILWAY_'));
12
+ }
13
+
14
+ function isInstalledAsDependency() {
15
+ // When installed from npm as a dependency, the package lives inside
16
+ // another project's node_modules. The source repo has a src/ directory
17
+ // at the root -- installed packages do not.
18
+ const repoRoot = join(__dirname, '..');
19
+ return !existsSync(join(repoRoot, 'src'));
20
+ }
21
+
22
+ function run(command, args) {
23
+ const commandLabel = [command, ...args].join(' ');
24
+ console.log(`[postinstall] Running: ${commandLabel}`);
25
+
26
+ const result = spawnSync(command, args, {
27
+ stdio: 'inherit',
28
+ env: process.env,
29
+ shell: process.platform === 'win32',
30
+ });
31
+
32
+ if (result.error) {
33
+ console.error(`[postinstall] Failed to execute "${commandLabel}":`, result.error);
34
+ process.exit(1);
35
+ }
36
+
37
+ if (result.status !== 0) {
38
+ console.error(`[postinstall] Command failed: ${commandLabel} (exit ${result.status ?? 1})`);
39
+ process.exit(result.status ?? 1);
40
+ }
41
+ }
42
+
43
+ if (process.env.MARKUPR_SKIP_ELECTRON_POSTINSTALL === '1' || isRailwayEnvironment() || isInstalledAsDependency()) {
44
+ // Skip Electron native rebuild when: env var is set, Railway environment,
45
+ // or installed as an npm dependency (CLI/MCP usage -- no Electron needed).
46
+ process.exit(0);
47
+ }
48
+
49
+ run('npx', ['electron-builder', 'install-app-deps']);
50
+ run('npx', ['electron-rebuild']);