@pentect/pi 0.0.26 → 0.0.27

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/bin/pentect-pi.js CHANGED
@@ -4,7 +4,11 @@ import { spawnSync } from "node:child_process";
4
4
  import { readFileSync } from "node:fs";
5
5
  import { dirname, resolve } from "node:path";
6
6
  import { createRequire } from "node:module";
7
- import { invocation, piBinaryFromEntry } from "../lib/command.js";
7
+ import {
8
+ invocation,
9
+ packageEntryPath,
10
+ piBinaryFromEntry,
11
+ } from "../lib/command.js";
8
12
 
9
13
  const require = createRequire(import.meta.url);
10
14
 
@@ -24,7 +28,7 @@ try {
24
28
  // Pi exports dist/index.js but intentionally does not export package.json.
25
29
  // Its pinned package exposes the adjacent dist/cli.js as the `pi` binary.
26
30
  const piCli = piBinaryFromEntry(
27
- require.resolve("@mariozechner/pi-coding-agent"),
31
+ packageEntryPath("@mariozechner/pi-coding-agent"),
28
32
  );
29
33
  const next = invocation(pentectCli, piCli, process.argv.slice(2));
30
34
  const result = spawnSync(next.command, next.args, { stdio: "inherit" });
package/lib/command.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { dirname, resolve } from "node:path";
2
+ import { fileURLToPath } from "node:url";
2
3
 
3
4
  export function invocation(pentectCli, piCli, userArgs, node = process.execPath) {
4
5
  return {
@@ -18,3 +19,7 @@ export function invocation(pentectCli, piCli, userArgs, node = process.execPath)
18
19
  export function piBinaryFromEntry(entry) {
19
20
  return resolve(dirname(entry), "cli.js");
20
21
  }
22
+
23
+ export function packageEntryPath(specifier, resolver = import.meta.resolve) {
24
+ return fileURLToPath(resolver(specifier));
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pentect/pi",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "Run Pi through Pentect's local HTTP protection",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@mariozechner/pi-coding-agent": "0.73.1",
36
- "pentect": "0.0.26"
36
+ "pentect": "0.0.27"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=20.6.0"