@npie/cli 0.1.0-npie.3 → 0.1.0-npie.4
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/README.md +2 -2
- package/bin/t3.mjs +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ t3 pair # 生成配对链接,供手机或其它设备连
|
|
|
30
30
|
3. 构建服务端
|
|
31
31
|
4. 启动它
|
|
32
32
|
|
|
33
|
-
源码放在 `~/.npie/source/<version>`,每个版本一个目录,构建完成后打上标记;再次运行会直接复用。
|
|
33
|
+
源码放在 `~/.npie-cli/source/<version>`,每个版本一个目录,构建完成后打上标记;再次运行会直接复用。
|
|
34
34
|
|
|
35
35
|
想换位置就设 `NPIE_HOME`。
|
|
36
36
|
|
|
@@ -59,7 +59,7 @@ Node 24 自带 corepack,执行 `corepack enable pnpm` 后重试。
|
|
|
59
59
|
源码与锁文件不匹配,通常是版本刚发布。等几分钟重试,或换 `@latest`。
|
|
60
60
|
|
|
61
61
|
**构建卡住或失败**
|
|
62
|
-
删掉对应版本的目录再试:`rm -rf ~/.npie/source/<version>`。
|
|
62
|
+
删掉对应版本的目录再试:`rm -rf ~/.npie-cli/source/<version>`。
|
|
63
63
|
|
|
64
64
|
**公司网络装不上依赖**
|
|
65
65
|
设置 `npm_config_registry` 指向你的镜像,Npie 只是沿用 pnpm 的配置。
|
package/bin/t3.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Npie CLI bootstrap.
|
|
3
3
|
//
|
|
4
4
|
// Npie ships source only. This launcher keeps a checkout in NPIE_HOME (default
|
|
5
|
-
// ~/.npie/source), fetches the requested version, installs dependencies once, builds the
|
|
5
|
+
// ~/.npie-cli/source), fetches the requested version, installs dependencies once, builds the
|
|
6
6
|
// server, and then runs it. The bin is still called `t3` because every doc, service unit
|
|
7
7
|
// and keybinding in the product uses that name.
|
|
8
8
|
//
|
|
@@ -26,7 +26,9 @@ const REQUIRED_NODE_MAJOR = 24;
|
|
|
26
26
|
|
|
27
27
|
function npiHome() {
|
|
28
28
|
const raw = (process.env.NPIE_HOME || "").trim();
|
|
29
|
-
|
|
29
|
+
// Not `~/.npie`: that directory predates this project on some machines and holds
|
|
30
|
+
// unrelated data. Keep the bootstrap in its own tree, matching T3CODE_HOME's shape.
|
|
31
|
+
if (raw === "") return path.join(os.homedir(), ".npie-cli");
|
|
30
32
|
if (raw === "~") return os.homedir();
|
|
31
33
|
if (raw.startsWith("~/") || raw.startsWith("~\\")) return path.join(os.homedir(), raw.slice(2));
|
|
32
34
|
return path.resolve(raw);
|