autokap 1.0.0 → 1.0.2

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 (2) hide show
  1. package/dist/cli.js +4 -3
  2. package/package.json +4 -3
package/dist/cli.js CHANGED
@@ -344,9 +344,10 @@ export async function main() {
344
344
  }
345
345
  await shutdownPostHog();
346
346
  }
347
- // Only run when executed directly (not imported by tests)
348
- const isDirectExecution = process.argv[1] && (process.argv[1].endsWith('/cli.js') ||
349
- process.argv[1].endsWith('/cli.ts'));
347
+ // Only run when executed directly (not imported by tests).
348
+ // Resolve symlinks so this also works when invoked via the `autokap` bin symlink.
349
+ const resolvedArgv = process.argv[1] && fs.realpath(process.argv[1]).catch(() => process.argv[1]);
350
+ const isDirectExecution = resolvedArgv && await resolvedArgv.then(p => p.endsWith('/cli.js') || p.endsWith('/cli.ts'));
350
351
  if (isDirectExecution) {
351
352
  // Use parseAsync so that subcommand action handlers (e.g. `skill`) complete
352
353
  // before any fallback code runs. Without this, the sync `parse()` would
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autokap",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "AI-powered CLI tool for capturing clean screenshots of websites",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -96,10 +96,11 @@
96
96
  }
97
97
  },
98
98
  "bin": {
99
- "autokap": "dist/cli.js"
99
+ "autokap": "./dist/cli.js"
100
100
  },
101
101
  "scripts": {
102
- "postinstall": "node scripts/patch-playwright-video-recorder.mjs",
102
+ "postinstall": "npx playwright install chromium 2>/dev/null || true",
103
+ "prepare": "node scripts/patch-playwright-video-recorder.mjs",
103
104
  "build": "tsc && cd web && npm run build",
104
105
  "dev": "cd web && npm run dev",
105
106
  "dev:lib:watch": "tsc -w --preserveWatchOutput",