@demogo-cn/cli 0.2.7 → 0.2.9

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 CHANGED
@@ -6,7 +6,7 @@ DemoGo CLI lets AI coding tools publish a local project to DemoGo and return a s
6
6
 
7
7
  Current MVP delivery uses a local install package.
8
8
 
9
- 1. Unzip `demogo-cli-v0.2.7.zip`.
9
+ 1. Unzip `demogo-cli-v0.2.9.zip`.
10
10
  2. Open a terminal in the extracted folder.
11
11
  3. Run:
12
12
 
@@ -37,7 +37,7 @@ Run the command from a clean project folder. Do not run it directly from Desktop
37
37
  Use without installing:
38
38
 
39
39
  ```bash
40
- npx --yes @demogo-cn/cli deploy
40
+ npx --yes @demogo-cn/cli deploy --api https://demogo.cn --token <DemoGo AI publish token>
41
41
  ```
42
42
 
43
43
  Or use the installed command:
@@ -54,6 +54,8 @@ demogo deploy --dir <project-folder> --name <project-name>
54
54
 
55
55
  If you only have one HTML file, put that file in a clean folder and publish that folder. You do not need to rename the file to `index.html`.
56
56
 
57
+ Project names are used for display in the DemoGo workbench. Every first publish receives an automatically assigned trial link path. Lite and Pro users can later customize the `/d/...` path in the workbench. Pro users can apply for a `xxx.demogo.cn` subdomain.
58
+
57
59
  ## Current Boundary
58
60
 
59
61
  DemoGo supports static pages, single HTML pages, built frontend output, and frontend source projects that can build static output. It does not host long-running backend services, databases, payment systems, login systems, WebSocket services, or SSR runtimes.
@@ -63,7 +65,7 @@ DemoGo supports static pages, single HTML pages, built frontend output, and fron
63
65
  AI coding tools can run:
64
66
 
65
67
  ```bash
66
- npx --yes @demogo-cn/cli deploy
68
+ npx --yes @demogo-cn/cli deploy --api https://demogo.cn --token <DemoGo AI publish token>
67
69
  ```
68
70
 
69
71
  Or install it globally:
package/bin/demogo.js CHANGED
@@ -108,16 +108,16 @@ async function handleDeploy(args) {
108
108
  if (!apiBase) {
109
109
  fail([
110
110
  "缺少 DemoGo 平台地址。",
111
- "请先在 DemoGo 工作台复制平台地址,然后运行:",
112
- "demogo config set --api <DemoGo平台地址> --token <你的AI发布口令>"
111
+ "可以直接运行:",
112
+ "demogo deploy --api <DemoGo平台地址> --token <你的AI发布口令>"
113
113
  ].join("\n"));
114
114
  }
115
115
 
116
116
  if (!token) {
117
117
  fail([
118
118
  "缺少 DemoGo AI 发布口令。",
119
- "请先在 DemoGo 工作台生成口令,然后运行:",
120
- `demogo config set --api ${apiBase || "<DemoGo平台地址>"} --token <你的AI发布口令>`
119
+ "可以直接运行:",
120
+ `demogo deploy --api ${apiBase || "<DemoGo平台地址>"} --token <你的AI发布口令>`
121
121
  ].join("\n"));
122
122
  }
123
123
 
@@ -128,7 +128,7 @@ async function handleDeploy(args) {
128
128
 
129
129
  const archivePath = path.join(await mkdtemp(path.join(os.tmpdir(), "demogo-cli-")), `${safeArchiveName(projectName)}.tar.gz`);
130
130
  try {
131
- console.log("DemoGo 正在检查当前项目...");
131
+ console.log("DemoGo 正在准备当前项目...");
132
132
  printProjectSummary(summarizeProject(projectDir, fileList));
133
133
  console.log("DemoGo 正在打包项目...");
134
134
  await createProjectArchive(projectDir, fileList, archivePath);
@@ -218,8 +218,7 @@ function printDeployResult(result) {
218
218
  function printProjectSummary(summary) {
219
219
  console.log(`项目目录:${summary.projectDir}`);
220
220
  console.log(`准备上传:${summary.fileCount} 个文件,约 ${formatBytes(summary.totalBytes)}`);
221
- console.log(`页面入口:${summary.hasReadyPage ? "已发现" : (summary.singleHtmlEntry ? `已发现单页 ${summary.singleHtmlEntry}` : "未直接发现,DemoGo 会继续检测")}`);
222
- if (summary.hasPackageJson) console.log("源码项目:已发现 package.json");
221
+ if (summary.hasPackageJson) console.log("DemoGo 会自动判断是否需要生成网页版本。");
223
222
  }
224
223
 
225
224
  function maskToken(token) {
@@ -238,6 +237,7 @@ DemoGo CLI ${VERSION}
238
237
  demogo config clear
239
238
  demogo doctor
240
239
  demogo deploy
240
+ demogo deploy --api <DemoGo地址> --token <AI发布口令>
241
241
  demogo deploy --name <项目名称> --dir <项目目录>
242
242
 
243
243
  本地安装:
@@ -250,6 +250,7 @@ DemoGo CLI ${VERSION}
250
250
 
251
251
  示例:
252
252
  demogo config set --api https://your-demogo.example.com --token dmg_xxx_xxx
253
+ demogo deploy --api https://your-demogo.example.com --token dmg_xxx_xxx
253
254
  demogo deploy --name 我的报名页
254
255
  `.trim());
255
256
  }
package/lib/core.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { mkdir, readdir, readFile, stat, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
 
5
- export const VERSION = "0.2.7";
5
+ export const VERSION = "0.2.9";
6
6
  export const MAX_FILES = 800;
7
7
  export const MAX_BYTES = 50 * 1024 * 1024;
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demogo-cn/cli",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "DemoGo CLI for generating shareable trial links from AI-built pages.",
5
5
  "type": "module",
6
6
  "bin": {