@tpsdev-ai/cli 0.4.1 → 0.4.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/bin/tps.cjs +13 -6
  2. package/package.json +5 -6
package/bin/tps.cjs CHANGED
@@ -1,24 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { execFileSync } = require('child_process');
4
+ const path = require('path');
4
5
 
5
6
  const platform = process.platform;
6
7
  const arch = process.arch;
7
8
  const pkg = `@tpsdev-ai/cli-${platform}-${arch}`;
8
9
 
10
+ // Search for the platform binary relative to this package, not the cwd.
11
+ // npm nests optionalDependencies inside the parent's node_modules.
12
+ const searchPaths = [path.join(__dirname, '..'), path.join(__dirname, '..', '..')];
13
+
9
14
  function runBinary() {
10
15
  try {
11
- const path = require('path');
12
- const pkgJson = require.resolve(`${pkg}/package.json`);
16
+ const pkgJson = require.resolve(`${pkg}/package.json`, { paths: searchPaths });
13
17
  const binPath = path.join(path.dirname(pkgJson), 'tps');
14
18
  execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
15
19
  return;
16
20
  } catch (err) {
17
- console.error(`TPS: no binary package available for ${platform}-${arch}.`);
18
- console.error(`Run npm install -g ${pkg} to install the platform binary package.`);
19
- console.error('Or run from source inside the repository via `bun run tps` in packages/cli.');
20
- process.exitCode = 1;
21
+ // Fall through to error message
21
22
  }
23
+
24
+ console.error(`Failed to load native binding`);
25
+ console.error(`TPS: no binary package available for ${platform}-${arch}.`);
26
+ console.error(`Run npm install -g ${pkg} to install the platform binary package.`);
27
+ console.error('Or run from source inside the repository via `bun run tps` in packages/cli.');
28
+ process.exitCode = 1;
22
29
  }
23
30
 
24
31
  runBinary();
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "TPS Report CLI \u2014 because every agent needs the proper paperwork.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "tps": "./bin/tps.cjs"
8
8
  },
9
9
  "optionalDependencies": {
10
- "@tpsdev-ai/cli-darwin-arm64": "0.4.1",
11
- "@tpsdev-ai/cli-darwin-x64": "0.4.1",
12
- "@tpsdev-ai/cli-linux-arm64": "0.4.1",
13
- "@tpsdev-ai/cli-linux-x64": "0.4.1"
10
+ "@tpsdev-ai/cli-darwin-arm64": "0.4.2",
11
+ "@tpsdev-ai/cli-darwin-x64": "0.4.2",
12
+ "@tpsdev-ai/cli-linux-arm64": "0.4.2",
13
+ "@tpsdev-ai/cli-linux-x64": "0.4.2"
14
14
  },
15
15
  "scripts": {
16
16
  "build": "tsc",
@@ -38,7 +38,6 @@
38
38
  "@noble/curves": "^2.0.1",
39
39
  "@noble/ed25519": "^3.0.0",
40
40
  "@noble/hashes": "^2.0.1",
41
- "@node-rs/argon2": "^2.0.2",
42
41
  "@types/ws": "^8.18.1",
43
42
  "handlebars": "^4.7.8",
44
43
  "ink": "^5.2.0",