pi-yun 0.1.2 → 0.1.3
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +16 -16
- package/.next/build-manifest.json +2 -2
- package/.next/required-server-files.js +2 -1
- package/.next/required-server-files.json +2 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js.nft.json +2 -2
- package/.next/server/app/api/cwd/validate/route.js.nft.json +2 -2
- package/.next/server/app/api/models/default/route.js.nft.json +2 -2
- package/.next/server/app/api/models/enabled/route.js.nft.json +2 -2
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +16 -16
- package/.next/server/chunks/2243.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/app/{layout-3dc3a778fc61244e.js → layout-d70e28604e00ce86.js} +1 -1
- package/.next/trace +83 -8
- package/.next/trace-build +1 -1
- package/bin/pi-web-update.js +16 -10
- package/next.config.ts +2 -1
- package/package.json +1 -1
- /package/.next/static/{4JhGgJa7UiD-aIZf7gQtM → d_E8wEOyK1dgGzRMzQc-x}/_buildManifest.js +0 -0
- /package/.next/static/{4JhGgJa7UiD-aIZf7gQtM → d_E8wEOyK1dgGzRMzQc-x}/_ssgManifest.js +0 -0
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":217641942,"timestamp":278570105596,"id":14,"parentId":1,"tags":{},"startTime":1792650566104,"traceId":"792662b245451723"},{"name":"run-typescript","duration":26834668,"timestamp":278788321047,"id":8384,"parentId":1,"tags":{},"startTime":1792650784320,"traceId":"792662b245451723"},{"name":"static-check","duration":18297144,"timestamp":278815335562,"id":8387,"parentId":1,"tags":{},"startTime":1792650811333,"traceId":"792662b245451723"},{"name":"static-generation","duration":6687416,"timestamp":278833787856,"id":8539,"parentId":1,"tags":{},"startTime":1792650829786,"traceId":"792662b245451723"},{"name":"collect-build-traces","duration":38978292,"timestamp":278833637432,"id":8536,"parentId":1,"tags":{},"startTime":1792650829635,"traceId":"792662b245451723"},{"name":"telemetry-flush","duration":53,"timestamp":278872640375,"id":8548,"parentId":1,"tags":{},"startTime":1792650868638,"traceId":"792662b245451723"},{"name":"next-build","duration":303531106,"timestamp":278569109329,"id":1,"tags":{"buildMode":"default","version":"16.3.8","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1792650565107,"traceId":"792662b245451723"}]
|
package/bin/pi-web-update.js
CHANGED
|
@@ -7,9 +7,15 @@ const fs = require("fs");
|
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
8
8
|
const path = require("path");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// This fork publishes under its own package name, so the update check and the
|
|
11
|
+
// install command both follow package.json: a rename stays a one-line change.
|
|
12
|
+
const PACKAGE_NAME =
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
14
|
+
require("../package.json").name;
|
|
15
|
+
const PACKAGE_BASENAME = PACKAGE_NAME.split("/").pop();
|
|
16
|
+
const NPM_LATEST_URL = `https://registry.npmjs.org/${PACKAGE_NAME.replace("/", "%2F")}/latest`;
|
|
11
17
|
const FETCH_TIMEOUT_MS = 10_000;
|
|
12
|
-
const MANUAL_COMMAND =
|
|
18
|
+
const MANUAL_COMMAND = `npm install -g ${PACKAGE_NAME}@latest`;
|
|
13
19
|
|
|
14
20
|
// Port of lib/app-update.ts (bin cannot import TypeScript).
|
|
15
21
|
function parseStableVersion(version) {
|
|
@@ -64,13 +70,13 @@ function realpathOrSelf(target, realpath = fs.realpathSync) {
|
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
|
|
67
|
-
// "global": pkgDir is <npm root -g
|
|
73
|
+
// "global": pkgDir is <npm root -g>/<package name>; "npx": an npx cache; else "other".
|
|
68
74
|
function getInstallKind({ pkgDir, npmRoot, realpath = fs.realpathSync }) {
|
|
69
75
|
const realPkgDir = realpathOrSelf(pkgDir, realpath);
|
|
70
76
|
if (realPkgDir.split(/[\\/]/).includes("_npx")) return "npx";
|
|
71
77
|
if (!npmRoot) return "other";
|
|
72
78
|
const inGlobalRoot =
|
|
73
|
-
path.basename(realPkgDir) ===
|
|
79
|
+
path.basename(realPkgDir) === PACKAGE_BASENAME &&
|
|
74
80
|
realpathOrSelf(path.dirname(realPkgDir), realpath) === realpathOrSelf(npmRoot, realpath);
|
|
75
81
|
return inGlobalRoot ? "global" : "other";
|
|
76
82
|
}
|
|
@@ -86,7 +92,7 @@ function getGlobalNpmRoot() {
|
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
function runNpmInstall(version) {
|
|
89
|
-
const invocation = findNpmInvocation(["install", "-g",
|
|
95
|
+
const invocation = findNpmInvocation(["install", "-g", `${PACKAGE_NAME}@${version}`]);
|
|
90
96
|
if (!invocation) return null;
|
|
91
97
|
const result = spawnSync(invocation.command, invocation.args, { stdio: "inherit" });
|
|
92
98
|
return result.status ?? 1;
|
|
@@ -113,26 +119,26 @@ async function runUpdate({
|
|
|
113
119
|
return 1;
|
|
114
120
|
}
|
|
115
121
|
if (!isNewerStableVersion(latest, currentVersion)) {
|
|
116
|
-
log(
|
|
122
|
+
log(`${PACKAGE_NAME} ${currentVersion} is up to date.`);
|
|
117
123
|
return 0;
|
|
118
124
|
}
|
|
119
|
-
log(
|
|
125
|
+
log(`${PACKAGE_NAME} ${latest} is available (installed: ${currentVersion}).`);
|
|
120
126
|
if (check) return 0;
|
|
121
127
|
|
|
122
128
|
// A running `next start` has .next/ open; never replace it underneath.
|
|
123
129
|
const running = await listRecords();
|
|
124
130
|
if (running.length > 0) {
|
|
125
|
-
error(
|
|
131
|
+
error(`${PACKAGE_NAME} is running:\n${running.map(formatRecord).join("\n")}\nRun \`${PACKAGE_BASENAME} stop\` first, then update.`);
|
|
126
132
|
return 1;
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
const kind = getInstallKind({ pkgDir, npmRoot: getNpmRoot(), realpath });
|
|
130
136
|
if (kind === "npx") {
|
|
131
|
-
error(
|
|
137
|
+
error(`This ${PACKAGE_BASENAME} runs from the npx cache. Run \`npx ${PACKAGE_NAME}@latest\` instead.`);
|
|
132
138
|
return 1;
|
|
133
139
|
}
|
|
134
140
|
if (kind !== "global") {
|
|
135
|
-
error(`This
|
|
141
|
+
error(`This ${PACKAGE_BASENAME} is not a global npm install. Update it yourself, for example: ${MANUAL_COMMAND}`);
|
|
136
142
|
return 1;
|
|
137
143
|
}
|
|
138
144
|
|
package/next.config.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { dirname, join } from "path";
|
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
|
|
6
6
|
const configDir = dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const { version } = JSON.parse(readFileSync(join(configDir, "package.json"), "utf8")) as { version: string };
|
|
7
|
+
const { version, name } = JSON.parse(readFileSync(join(configDir, "package.json"), "utf8")) as { version: string; name: string };
|
|
8
8
|
let piVersion = "unknown";
|
|
9
9
|
try {
|
|
10
10
|
const piPkgPath = join(configDir, "node_modules/@earendil-works/pi-coding-agent/package.json");
|
|
@@ -104,6 +104,7 @@ const nextConfig: NextConfig = {
|
|
|
104
104
|
},
|
|
105
105
|
env: {
|
|
106
106
|
NEXT_PUBLIC_APP_VERSION: version,
|
|
107
|
+
NEXT_PUBLIC_APP_NAME: name,
|
|
107
108
|
NEXT_PUBLIC_PI_VERSION: piVersion,
|
|
108
109
|
},
|
|
109
110
|
};
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|