@agegr/pi-web 0.5.1 → 0.5.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 (42) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/required-server-files.js +1 -1
  4. package/.next/required-server-files.json +1 -1
  5. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/_not-found.html +1 -1
  16. package/.next/server/app/_not-found.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  23. package/.next/server/app/index.html +1 -1
  24. package/.next/server/app/index.rsc +2 -2
  25. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  26. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  27. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  28. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  29. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  30. package/.next/server/app/page.js +1 -1
  31. package/.next/server/app/page_client-reference-manifest.js +1 -1
  32. package/.next/server/middleware-build-manifest.js +1 -1
  33. package/.next/server/pages/404.html +1 -1
  34. package/.next/server/pages/500.html +1 -1
  35. package/.next/static/chunks/app/{page-ef950bb6db52b1cb.js → page-735797ba6fcaefd1.js} +1 -1
  36. package/.next/trace +3 -3
  37. package/.next/trace-build +1 -1
  38. package/README.md +7 -3
  39. package/bin/pi-web.js +17 -2
  40. package/package.json +3 -3
  41. /package/.next/static/{MdC-QpgP6Rn-rmM5phXoA → Z4yJpBzUqA9RvpGL2H0p3}/_buildManifest.js +0 -0
  42. /package/.next/static/{MdC-QpgP6Rn-rmM5phXoA → Z4yJpBzUqA9RvpGL2H0p3}/_ssgManifest.js +0 -0
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-webpack","duration":3766185,"timestamp":3729102414312,"id":14,"parentId":1,"tags":{},"startTime":1775381384219,"traceId":"708e9d46889a01a5"},{"name":"run-typescript","duration":2059094,"timestamp":3729106184100,"id":359,"parentId":1,"tags":{},"startTime":1775381387989,"traceId":"708e9d46889a01a5"},{"name":"static-check","duration":1112157,"timestamp":3729108252131,"id":362,"parentId":1,"tags":{},"startTime":1775381390057,"traceId":"708e9d46889a01a5"},{"name":"static-generation","duration":849725,"timestamp":3729109622632,"id":412,"parentId":1,"tags":{},"startTime":1775381391428,"traceId":"708e9d46889a01a5"},{"name":"collect-build-traces","duration":6954074,"timestamp":3729109365023,"id":409,"parentId":1,"tags":{},"startTime":1775381391170,"traceId":"708e9d46889a01a5"},{"name":"telemetry-flush","duration":26,"timestamp":3729116320705,"id":421,"parentId":1,"tags":{},"startTime":1775381398126,"traceId":"708e9d46889a01a5"},{"name":"next-build","duration":13975304,"timestamp":3729102345431,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1775381384151,"traceId":"708e9d46889a01a5"}]
1
+ [{"name":"run-webpack","duration":3622610,"timestamp":3737806886257,"id":14,"parentId":1,"tags":{},"startTime":1775390088714,"traceId":"b0c3270f749a7c46"},{"name":"run-typescript","duration":2048048,"timestamp":3737810512414,"id":349,"parentId":1,"tags":{},"startTime":1775390092340,"traceId":"b0c3270f749a7c46"},{"name":"static-check","duration":1062513,"timestamp":3737812570147,"id":352,"parentId":1,"tags":{},"startTime":1775390094397,"traceId":"b0c3270f749a7c46"},{"name":"static-generation","duration":873514,"timestamp":3737813894767,"id":402,"parentId":1,"tags":{},"startTime":1775390095722,"traceId":"b0c3270f749a7c46"},{"name":"collect-build-traces","duration":6887925,"timestamp":3737813633330,"id":399,"parentId":1,"tags":{},"startTime":1775390095461,"traceId":"b0c3270f749a7c46"},{"name":"telemetry-flush","duration":22,"timestamp":3737820522769,"id":411,"parentId":1,"tags":{},"startTime":1775390102350,"traceId":"b0c3270f749a7c46"},{"name":"next-build","duration":13706170,"timestamp":3737806816625,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1775390088644,"traceId":"b0c3270f749a7c46"}]
package/README.md CHANGED
@@ -9,12 +9,16 @@ npm install -g @agegr/pi-web
9
9
  pi-web
10
10
  ```
11
11
 
12
- Open [http://localhost:3355](http://localhost:3355).
12
+ Open [http://localhost:30141](http://localhost:30141).
13
13
 
14
- Set a custom port with the `PORT` environment variable:
14
+ Options:
15
15
 
16
16
  ```bash
17
- PORT=8080 pi-web
17
+ pi-web --port 8080 # custom port
18
+ pi-web --hostname 127.0.0.1 # local-only access
19
+ pi-web -p 8080 -H 127.0.0.1 # combined
20
+
21
+ PORT=8080 pi-web # env var also works
18
22
  ```
19
23
 
20
24
  ## Development Setup
package/bin/pi-web.js CHANGED
@@ -7,19 +7,34 @@ const { spawn } = require("child_process");
7
7
  const path = require("path");
8
8
  // eslint-disable-next-line @typescript-eslint/no-require-imports
9
9
  const fs = require("fs");
10
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
11
+ const { parseArgs } = require("util");
10
12
 
11
13
  const pkgDir = path.join(__dirname, "..");
12
14
  const isWindows = process.platform === "win32";
13
15
  const nextBin = path.join(pkgDir, "node_modules", ".bin", isWindows ? "next.cmd" : "next");
14
16
  const nextDir = path.join(pkgDir, ".next");
15
- const port = process.env.PORT || "3030";
17
+
18
+ const { values: cliArgs } = parseArgs({
19
+ options: {
20
+ port: { type: "string", short: "p" },
21
+ hostname: { type: "string", short: "H" },
22
+ },
23
+ strict: false,
24
+ });
25
+
26
+ const port = cliArgs.port ?? process.env.PORT ?? "30141";
27
+ const hostname = cliArgs.hostname ?? process.env.HOSTNAME ?? null;
16
28
 
17
29
  if (!fs.existsSync(nextDir)) {
18
30
  console.error("Build artifacts not found. Please report this issue.");
19
31
  process.exit(1);
20
32
  }
21
33
 
22
- const child = spawn(nextBin, ["start", "-p", port], {
34
+ const nextArgs = ["start", "-p", port];
35
+ if (hostname) nextArgs.push("-H", hostname);
36
+
37
+ const child = spawn(nextBin, nextArgs, {
23
38
  cwd: pkgDir,
24
39
  stdio: "inherit",
25
40
  env: { ...process.env },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agegr/pi-web",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Web UI for the pi coding agent",
5
5
  "bin": {
6
6
  "pi-web": "bin/pi-web.js"
@@ -16,9 +16,9 @@
16
16
  "package.json"
17
17
  ],
18
18
  "scripts": {
19
- "dev": "next dev -p 3355",
19
+ "dev": "next dev -p 30141",
20
20
  "build": "next build --webpack",
21
- "start": "next start -p 3355",
21
+ "start": "next start -p 30141",
22
22
  "lint": "eslint .",
23
23
  "release": "npm version patch --no-git-tag-version && npm run build && npm publish --access public"
24
24
  },