siluzan-tso-cli 1.1.29-beta.18 → 1.1.29-beta.19
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 +1 -1
- package/dist/index.js +28 -2
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/scripts/install.ps1 +1 -1
- package/dist/skill/scripts/install.sh +1 -1
- package/package.json +1 -1
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.29-beta.
|
|
54
|
+
> **注意**:当前为测试版(1.1.29-beta.19),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
|
|
55
55
|
|
|
56
56
|
| 助手 | 建议 `--ai` |
|
|
57
57
|
| ----------------------- | ------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -114956,6 +114956,29 @@ function hasImageSource(cfg, kind) {
|
|
|
114956
114956
|
const p = paths?.[pathKey];
|
|
114957
114957
|
return typeof p === "string" && p.trim().length > 0;
|
|
114958
114958
|
}
|
|
114959
|
+
var PMAX_IMAGE_SLOT_LABELS = {
|
|
114960
|
+
marketing: "\u6A2A\u56FE MARKETING_IMAGE\uFF08imagePaths.marketing / marketingImageAssetId\uFF09",
|
|
114961
|
+
square: "\u65B9\u56FE SQUARE_MARKETING_IMAGE\uFF08imagePaths.square / squareMarketingImageAssetId\uFF09",
|
|
114962
|
+
logo: "Logo LOGO_IMAGE\uFF08imagePaths.logo / logoImageAssetId\uFF09"
|
|
114963
|
+
};
|
|
114964
|
+
function collectMissingPmaxMediaWarnings(cfg) {
|
|
114965
|
+
const warnings = [];
|
|
114966
|
+
const missingImages = [];
|
|
114967
|
+
for (const kind of ["marketing", "square", "logo"]) {
|
|
114968
|
+
if (!hasImageSource(cfg, kind)) {
|
|
114969
|
+
missingImages.push(PMAX_IMAGE_SLOT_LABELS[kind]);
|
|
114970
|
+
}
|
|
114971
|
+
}
|
|
114972
|
+
if (missingImages.length > 0) {
|
|
114973
|
+
warnings.push(`\u672A\u914D\u7F6E\u56FE\u7247\u7D20\u6750\uFF1A${missingImages.join("\uFF1B")}\u3002\u4E09\u5F20\u56FE\u5747\u4E3A Google \u5FC5\u586B`);
|
|
114974
|
+
}
|
|
114975
|
+
if (!cfg.videoPath?.trim() && !cfg.youtubeUrlOrId?.trim()) {
|
|
114976
|
+
warnings.push(
|
|
114977
|
+
"\u672A\u914D\u7F6E videoPath \u6216 youtubeUrlOrId\uFF1AGoogle \u5EFA\u8BAE PMax \u8D44\u4EA7\u7EC4\u81F3\u5C11 1 \u6761\u89C6\u9891\uFF1B\u672A\u63D0\u4F9B\u65F6\u53EF\u80FD\u7528\u56FE\u7247\u81EA\u52A8\u751F\u6210\u4F4E\u8D28\u91CF\u89C6\u9891\u3002\u672C\u5730\u6587\u4EF6\u586B videoPath\uFF0C\u5DF2\u6709 YouTube \u586B youtubeUrlOrId"
|
|
114978
|
+
);
|
|
114979
|
+
}
|
|
114980
|
+
return warnings;
|
|
114981
|
+
}
|
|
114959
114982
|
function normalizeBidding(raw) {
|
|
114960
114983
|
if (raw == null || raw === "") return "MAXIMIZE_CONVERSIONS";
|
|
114961
114984
|
const s = String(raw).trim().toUpperCase();
|
|
@@ -115193,6 +115216,7 @@ function runPmaxCreateValidation(cfg) {
|
|
|
115193
115216
|
"\u672A\u4F20 brandGuidelinesEnabled\uFF1A\u7F51\u5173\u9ED8\u8BA4 true\uFF1B\u521B\u5EFA\u540E\u9996\u4E2A AG \u7684 assets[] \u4E0D\u542B Logo/\u5546\u5BB6\u540D\uFF08\u89C1 brandAssets[]\uFF09"
|
|
115194
115217
|
);
|
|
115195
115218
|
}
|
|
115219
|
+
warnings.push(...collectMissingPmaxMediaWarnings(cfg));
|
|
115196
115220
|
return { errors, warnings, lengthViolations };
|
|
115197
115221
|
}
|
|
115198
115222
|
|
|
@@ -116559,7 +116583,9 @@ async function linkPmaxVideoAfterCreate(opts) {
|
|
|
116559
116583
|
let youtubeTarget = opts.cfg.youtubeUrlOrId?.trim();
|
|
116560
116584
|
const videoPath = opts.cfg.videoPath?.trim();
|
|
116561
116585
|
if (!youtubeTarget && !videoPath) {
|
|
116562
|
-
return {
|
|
116586
|
+
return {
|
|
116587
|
+
skippedReason: "\u672A\u914D\u7F6E videoPath / youtubeUrlOrId\uFF0C\u672A\u94FE\u63A5\u89C6\u9891\uFF1BGoogle \u5EFA\u8BAE PMax \u81F3\u5C11 1 \u6761 YouTube \u89C6\u9891"
|
|
116588
|
+
};
|
|
116563
116589
|
}
|
|
116564
116590
|
if (videoPath) {
|
|
116565
116591
|
const absVideo = resolveVideoPath(opts.configFile, videoPath);
|
|
@@ -116768,7 +116794,7 @@ async function runAdPmaxCreate(opts) {
|
|
|
116768
116794
|
videoResult.youtubeTarget
|
|
116769
116795
|
);
|
|
116770
116796
|
}
|
|
116771
|
-
} else if (videoResult.skippedReason
|
|
116797
|
+
} else if (videoResult.skippedReason) {
|
|
116772
116798
|
console.error(`
|
|
116773
116799
|
\u26A0\uFE0F \u6D3B\u52A8\u5DF2\u521B\u5EFA\uFF0C\u4F46\u89C6\u9891\u672A\u94FE\u63A5\uFF1A${videoResult.skippedReason}
|
|
116774
116800
|
`);
|
package/dist/skill/_meta.json
CHANGED
|
@@ -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.29-beta.
|
|
12
|
+
$PKG_VERSION = '1.1.29-beta.19'
|
|
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.29-beta.
|
|
12
|
+
readonly PKG_VERSION="1.1.29-beta.19"
|
|
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"
|