fauxnix-cli 1.0.0 → 2.1.0

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/version.js CHANGED
@@ -1,8 +1,15 @@
1
1
  import { readFileSync } from 'node:fs';
2
- // src/ and dist/ are both one level below the package root, so package.json is
3
- // the runtime source of truth in development and in the published tarball.
4
- const metadata = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
5
- if (typeof metadata.version !== 'string' || metadata.version.length === 0) {
2
+ // The SEA launcher bundle has no package.json next to its executable; the
3
+ // launcher build injects the version as a banner global instead.
4
+ const bundled = globalThis.__FAUXNIX_VERSION__;
5
+ let version = bundled;
6
+ if (typeof version !== 'string') {
7
+ // src/ and dist/ are both one level below the package root, so package.json is
8
+ // the runtime source of truth in development and in the published tarball.
9
+ const metadata = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
10
+ version = metadata.version;
11
+ }
12
+ if (typeof version !== 'string' || version.length === 0) {
6
13
  throw new Error('fauxnix: package.json does not contain a valid version');
7
14
  }
8
- export const packageVersion = metadata.version;
15
+ export const packageVersion = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fauxnix-cli",
3
- "version": "1.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Fauxnix — run Linux-style commands on Windows via deterministic PowerShell translation. No VM, no WSL. MCP server + CLI for AI agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,16 +12,19 @@
12
12
  "LICENSE"
13
13
  ],
14
14
  "scripts": {
15
+ "prebuild": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
15
16
  "build": "tsc",
17
+ "postbuild": "node -e \"const fs=require('node:fs');if(fs.existsSync('scripts/build-facade-sea.mjs'))require('node:child_process').execFileSync(process.execPath,['scripts/build-facade-sea.mjs'],{stdio:'inherit'})\"",
16
18
  "prepare": "npm run build",
17
- "prepublishOnly": "npm run release:check -- --require-tag && npm run typecheck && npm test && npm run test:package",
19
+ "prepublishOnly": "npm run release:check -- --require-tag && npm run typecheck && npm run typecheck:test && npm test && npm run test:package",
18
20
  "release:check": "node scripts/release-check.mjs",
19
21
  "test": "vitest run",
20
22
  "test:package": "node scripts/package-smoke.mjs",
21
23
  "benchmark:mcp-batch": "npm run build && node scripts/benchmark-mcp-batch.mjs",
22
24
  "test:watch": "vitest",
23
25
  "typecheck": "tsc --noEmit",
24
- "dev": "tsx src/index.ts"
26
+ "dev": "tsx src/index.ts",
27
+ "typecheck:test": "tsc --project tsconfig.test.json"
25
28
  },
26
29
  "keywords": [
27
30
  "bash",
@@ -42,7 +45,7 @@
42
45
  "utf8"
43
46
  ],
44
47
  "engines": {
45
- "node": ">=18"
48
+ "node": ">=22.20.0"
46
49
  },
47
50
  "license": "MIT",
48
51
  "repository": {
@@ -52,6 +55,7 @@
52
55
  "dependencies": {
53
56
  "@modelcontextprotocol/sdk": "^1.12.0",
54
57
  "iconv-lite": "^0.6.3",
58
+ "postject": "^1.0.0-alpha.6",
55
59
  "zod": "^3.24.0"
56
60
  },
57
61
  "devDependencies": {