siluzan-tso-cli 1.1.49-beta.5 → 1.1.50-beta.1

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
@@ -51,7 +51,7 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
51
51
  siluzan-tso init --force # 强制覆盖已存在文件
52
52
  ```
53
53
 
54
- > **注意**:当前为测试版(1.1.49-beta.5),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
54
+ > **注意**:当前为测试版(1.1.50-beta.1),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
55
55
 
56
56
  | 助手 | 建议 `--ai` |
57
57
  | ----------------------- | ------------------------------------ |
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.49-beta.5",
4
- "publishedAt": 1788318813710
3
+ "version": "1.1.50-beta.1",
4
+ "publishedAt": 1788338032425
5
5
  }
@@ -213,6 +213,11 @@ window.__META_PERIOD_REPORT__ = window.__META_PERIOD_REPORT__ || null;
213
213
  if (!isNum(v)) return "—";
214
214
  return moneyPrefix + fmtNum(v, 2);
215
215
  }
216
+ /** 无成效时 CPA 无意义;0 再去尾零会变成单独的 $ */
217
+ function fmtCostPerResult(cpl, results) {
218
+ if (!isNum(results) || results <= 0 || !isNum(cpl) || cpl <= 0) return "--";
219
+ return moneyPrefix + fmtNum(cpl, 8).replace(/\.?0+$/, "");
220
+ }
216
221
  function cell(v, kind) {
217
222
  if (kind === "int") return esc(fmtInt(v));
218
223
  if (kind === "money") return esc(isNum(v) ? moneyPrefix + fmtNum(v, 8).replace(/\.?0+$/, "") : "—");
@@ -228,7 +233,7 @@ window.__META_PERIOD_REPORT__ = window.__META_PERIOD_REPORT__ || null;
228
233
  cell(row.resultType),
229
234
  cell(row.results, "int"),
230
235
  cell(row.spend, "money"),
231
- cell(row.costPerResult, "money"),
236
+ esc(fmtCostPerResult(row.costPerResult, row.results)),
232
237
  ].map(function (td) { return "<td>" + td + "</td>"; }).join("");
233
238
  }
234
239
  function tableHtml(headers, rows, firstCell) {
@@ -274,7 +279,7 @@ window.__META_PERIOD_REPORT__ = window.__META_PERIOD_REPORT__ || null;
274
279
 
275
280
  document.getElementById("ovKpis").innerHTML =
276
281
  '<div class="ov-kpi feature"><div class="label">已花费金额 (' + esc(currency) + ')</div><div class="value">' + esc(fmtMoney(kpis.spend)) + "</div></div>" +
277
- '<div class="ov-kpi feature accent"><div class="label">单次成效费用</div><div class="value">' + esc(fmtMoney(kpis.costPerResult)) + "</div></div>" +
282
+ '<div class="ov-kpi feature accent"><div class="label">单次成效费用</div><div class="value">' + esc(fmtCostPerResult(kpis.costPerResult, kpis.results)) + "</div></div>" +
278
283
  '<div class="ov-kpi c-green"><div class="label">覆盖人数</div><div class="value">' + esc(fmtInt(kpis.reach)) + "</div></div>" +
279
284
  '<div class="ov-kpi c-amber"><div class="label">展示次数</div><div class="value">' + esc(fmtInt(kpis.impressions)) + "</div></div>";
280
285
  document.getElementById("ovMeta").innerHTML =
@@ -9,7 +9,7 @@ $ErrorActionPreference = 'Stop'
9
9
  # -- Package info (injected at build time) ------------------------------------
10
10
  $PKG_NAME = 'siluzan-tso-cli'
11
11
  # PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
12
- $PKG_VERSION = '1.1.49-beta.5'
12
+ $PKG_VERSION = '1.1.50-beta.1'
13
13
  $CLI_BIN = 'siluzan-tso'
14
14
  $SKILL_LABEL = 'Siluzan TSO'
15
15
  $INSTALL_CMD = 'npm install -g siluzan-tso-cli@beta'
@@ -9,7 +9,7 @@ set -euo pipefail
9
9
  # -- Package info (injected at build time) ------------------------------------
10
10
  readonly PKG_NAME="siluzan-tso-cli"
11
11
  # PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
12
- readonly PKG_VERSION="1.1.49-beta.5"
12
+ readonly PKG_VERSION="1.1.50-beta.1"
13
13
  readonly CLI_BIN="siluzan-tso"
14
14
  readonly SKILL_LABEL="Siluzan TSO"
15
15
  readonly INSTALL_CMD="npm install -g siluzan-tso-cli@beta"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siluzan-tso-cli",
3
- "version": "1.1.49-beta.5",
3
+ "version": "1.1.50-beta.1",
4
4
  "description": "Siluzan 广告账户管理 CLI — 查询账户、余额、消耗数据,管理绑定关系与充值。",
5
5
  "keywords": [
6
6
  "ad-account",