u1s1-cli 1.1.0 → 1.2.0

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/dist/deploy.js +7 -4
  2. package/package.json +1 -1
package/dist/deploy.js CHANGED
@@ -4,8 +4,8 @@ import { createInterface } from "node:readline/promises";
4
4
  import { VERSION, u1s1Dir } from "./config.js";
5
5
  import { authorizedFetch } from "./device-auth.js";
6
6
  /**
7
- * u1s1 deploy:把静态网页一键发布到 <name>.u1s1.app
8
- * 检测项目里的静态站点根目录 首次询问子域名(记在 ~/.u1s1/deploys.json)
7
+ * u1s1 deploy publishes a static site to <project>.<account-code>.u1s1.app.
8
+ * Detect the site root, ask for a project slug, and remember it in ~/.u1s1/deploys.json.
9
9
  * → 并发上传 → 网关原子切换生效,输出可分享的网址。
10
10
  */
11
11
  const deploysFile = join(u1s1Dir, "deploys.json");
@@ -168,7 +168,7 @@ async function promptSiteName(def) {
168
168
  return def;
169
169
  const rl = createInterface({ input: process.stdin, output: process.stdout });
170
170
  try {
171
- const answer = (await rl.question(` 站点子域名(回车用 ${def}):`)).trim().toLowerCase();
171
+ const answer = (await rl.question(` 项目名(回车用 ${def},只需在你的账号内唯一):`)).trim().toLowerCase();
172
172
  return answer || def;
173
173
  }
174
174
  finally {
@@ -269,11 +269,14 @@ export async function deployCommand(cfg, args) {
269
269
  deploy_id: start.deploy_id,
270
270
  visibility,
271
271
  });
272
- rememberSite(dir, start.site);
272
+ rememberSite(dir, start.slug || name || start.site);
273
273
  console.log(` ✅ 部署完成,${fin.file_count} 个文件已上线`);
274
274
  console.log("");
275
275
  console.log(` ${fin.visibility === "private" ? "🔒" : "🌐"} ${fin.url}`);
276
276
  console.log("");
277
+ if ((fin.hostname || start.hostname || "").split(".").length > 3) {
278
+ console.log(" 新 hostname 的 HTTPS 证书会由 Total TLS 自动签发,首次访问可能需要等待几分钟。");
279
+ }
277
280
  if (fin.visibility === "private") {
278
281
  console.log(" 私密站点仅你可见,请从 https://u1s1.io/dashboard#sec-sites 打开。");
279
282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "u1s1-cli",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "u1s1 — 有一说一,最省心的 AI 编程搭子。终端里用中文说需求,AI 帮你读文件、改代码、跑命令。",
5
5
  "type": "module",
6
6
  "bin": {