autokap 1.0.1 → 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.
- package/dist/cli.js +4 -3
- package/package.json +3 -2
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
|
-
|
|
349
|
-
|
|
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.
|
|
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,9 +96,10 @@
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"bin": {
|
|
99
|
-
"autokap": "dist/cli.js"
|
|
99
|
+
"autokap": "./dist/cli.js"
|
|
100
100
|
},
|
|
101
101
|
"scripts": {
|
|
102
|
+
"postinstall": "npx playwright install chromium 2>/dev/null || true",
|
|
102
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",
|