visor-ai 0.2.1 → 0.2.4

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 +0 -21
  2. package/dist/main.js +17 -1
  3. package/package.json +10 -2
package/README.md CHANGED
@@ -35,32 +35,11 @@ Supported today:
35
35
 
36
36
  Visor ships as the npm package `visor-ai` and requires Node `20` or later.
37
37
 
38
- For a published install:
39
-
40
38
  ```bash
41
39
  npm install -g visor-ai
42
40
  visor --help
43
41
  ```
44
42
 
45
- For a source checkout:
46
-
47
- ```bash
48
- npm install
49
- npm run build
50
- node dist/main.js --help
51
- ```
52
-
53
- ## Release automation
54
-
55
- GitHub Actions publishes tagged releases of `visor-ai` to the npm registry.
56
-
57
- Maintainer requirements:
58
-
59
- - repository secret `NPM_TOKEN`
60
- - release tags in the form `v<package.json version>`
61
-
62
- The release workflow verifies the package with `npm ci`, `npm run build`, `npm test`, and `npm pack --dry-run` before publishing.
63
-
64
43
  ## Documentation
65
44
 
66
45
  Comprehensive product documentation lives in [the docs site](https://na-ca6c7a2b.mintlify.app).
package/dist/main.js CHANGED
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
2
5
  import { executeCommand } from './cli.js';
3
6
  import { makeError } from './errors.js';
4
7
  import { makeId, utcNowIso } from './utils.js';
@@ -35,7 +38,20 @@ async function main(argv = process.argv.slice(2)) {
35
38
  return 1;
36
39
  }
37
40
  }
38
- if (import.meta.url === `file://${process.argv[1]}`) {
41
+ function isDirectExecution() {
42
+ if (!process.argv[1]) {
43
+ return false;
44
+ }
45
+ try {
46
+ const currentModulePath = fs.realpathSync(fileURLToPath(import.meta.url));
47
+ const invokedPath = fs.realpathSync(path.resolve(process.argv[1]));
48
+ return currentModulePath === invokedPath;
49
+ }
50
+ catch {
51
+ return false;
52
+ }
53
+ }
54
+ if (isDirectExecution()) {
39
55
  void main().then((code) => {
40
56
  process.exitCode = code;
41
57
  });
package/package.json CHANGED
@@ -1,9 +1,17 @@
1
1
  {
2
2
  "name": "visor-ai",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "description": "Visor CLI for LLM-driven mobile app interaction and artifact capture",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/AleksKapera/visor"
10
+ },
11
+ "homepage": "https://github.com/AleksKapera/visor",
12
+ "bugs": {
13
+ "url": "https://github.com/AleksKapera/visor/issues"
14
+ },
7
15
  "engines": {
8
16
  "node": ">=20"
9
17
  },
@@ -43,4 +51,4 @@
43
51
  "typescript": "^5.8.2",
44
52
  "vitest": "^3.0.8"
45
53
  }
46
- }
54
+ }