@pizzapi/pizza 0.1.31 → 0.1.33

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/pizza.mjs +15 -6
  2. package/package.json +6 -6
package/bin/pizza.mjs CHANGED
@@ -33,7 +33,7 @@ if (!pkgName) {
33
33
  console.error(
34
34
  `Error: PizzaPi does not have a prebuilt binary for your platform (${platformKey}).\n` +
35
35
  `Supported platforms: ${Object.keys(PLATFORM_PACKAGES).join(", ")}\n\n` +
36
- `You can build from source: https://github.com/badlogic/PizzaPi`,
36
+ `You can build from source: https://github.com/Pizzaface/PizzaPi`,
37
37
  );
38
38
  process.exit(1);
39
39
  }
@@ -53,7 +53,18 @@ function findBinary() {
53
53
  // not found via require
54
54
  }
55
55
 
56
- // Strategy 2: Check common node_modules layouts (hoisted, nested)
56
+ const parts = pkgName.split("/");
57
+
58
+ // Strategy 2: Sibling scoped package — both packages live under
59
+ // node_modules/@pizzapi/, so the platform package is a sibling of ours.
60
+ // __dirname = .../node_modules/@pizzapi/pizza/bin
61
+ // sibling = .../node_modules/@pizzapi/cli-win32-x64/bin/pizza.exe
62
+ {
63
+ const siblingPath = join(__dirname, "..", "..", parts[1], "bin", binName);
64
+ if (existsSync(siblingPath)) return siblingPath;
65
+ }
66
+
67
+ // Strategy 3: Check common node_modules layouts (hoisted, nested)
57
68
  const searchRoots = [
58
69
  join(__dirname, "..", "node_modules"),
59
70
  join(__dirname, "..", "..", "node_modules"),
@@ -61,8 +72,6 @@ function findBinary() {
61
72
  ];
62
73
 
63
74
  for (const root of searchRoots) {
64
- // Scoped package: node_modules/@pizzapi/cli-<platform>/bin/pizzapi
65
- const parts = pkgName.split("/");
66
75
  const binPath = join(root, parts[0], parts[1], "bin", binName);
67
76
  if (existsSync(binPath)) return binPath;
68
77
  }
@@ -78,10 +87,10 @@ if (!binaryPath) {
78
87
  `The platform-specific package "${pkgName}" should have been installed\n` +
79
88
  `automatically as an optional dependency.\n\n` +
80
89
  `Try reinstalling:\n` +
81
- ` npm install pizzapi\n\n` +
90
+ ` npm install @pizzapi/pizza\n\n` +
82
91
  `If the problem persists, install the platform package directly:\n` +
83
92
  ` npm install ${pkgName}\n\n` +
84
- `Or build from source: https://github.com/badlogic/PizzaPi`,
93
+ `Or build from source: https://github.com/Pizzaface/PizzaPi`,
85
94
  );
86
95
  process.exit(1);
87
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pizzapi/pizza",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "description": "PizzaPi — a self-hosted web interface and relay server for the pi coding agent. Stream live AI coding sessions to any browser.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -13,11 +13,11 @@
13
13
  "LICENSE"
14
14
  ],
15
15
  "optionalDependencies": {
16
- "@pizzapi/cli-linux-x64": "0.1.31",
17
- "@pizzapi/cli-linux-arm64": "0.1.31",
18
- "@pizzapi/cli-darwin-x64": "0.1.31",
19
- "@pizzapi/cli-darwin-arm64": "0.1.31",
20
- "@pizzapi/cli-win32-x64": "0.1.31"
16
+ "@pizzapi/cli-linux-x64": "0.1.33",
17
+ "@pizzapi/cli-linux-arm64": "0.1.33",
18
+ "@pizzapi/cli-darwin-x64": "0.1.33",
19
+ "@pizzapi/cli-darwin-arm64": "0.1.33",
20
+ "@pizzapi/cli-win32-x64": "0.1.33"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=18"