@yixinkj/priority-buyer-alert-cli 0.1.2 → 0.1.3
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/index.js +7 -1
- package/package.json +1 -1
- package/skill/SKILL.md +1 -1
- package/skills.json +1 -1
package/index.js
CHANGED
|
@@ -18,6 +18,8 @@ const VERSION = packageJson.version;
|
|
|
18
18
|
const SKILL_VERSION = registry.skill.version || VERSION;
|
|
19
19
|
const SKILL_ID = registry.skill.id;
|
|
20
20
|
const SKILL_DISPLAY_NAME = registry.skill.name;
|
|
21
|
+
// 展示名改名后,旧安装副本仍可能携带历史名称;允许它们先完成 OTA 同步,避免心跳被名称校验永久挡住。
|
|
22
|
+
const LEGACY_SKILL_DISPLAY_NAMES = new Set(['重点买家预警', '重点买家预警 20260812']);
|
|
21
23
|
const RUNTIME_VERSION = registry.runtimeVersion || VERSION;
|
|
22
24
|
const OSS_RELEASE_BASE_URL =
|
|
23
25
|
`https://broswer-plugs1.oss-cn-beijing.aliyuncs.com/releases/${SKILL_ID}/v${RUNTIME_VERSION}`;
|
|
@@ -294,7 +296,11 @@ function syncSkillInstallation(skillPath, { bundledSkillPath = BUNDLED_SKILL_PAT
|
|
|
294
296
|
const currentSkill = fs.readFileSync(resolvedSkillPath, 'utf8');
|
|
295
297
|
const currentSkillName = parseSkillMetadata(currentSkill).name;
|
|
296
298
|
// 旧版 frontmatter 使用内部 ID 作为 name;允许它被新展示名平滑升级,避免 OTA 被自身名称校验挡住。
|
|
297
|
-
if (
|
|
299
|
+
if (
|
|
300
|
+
currentSkillName !== SKILL_ID &&
|
|
301
|
+
currentSkillName !== SKILL_DISPLAY_NAME &&
|
|
302
|
+
!LEGACY_SKILL_DISPLAY_NAMES.has(currentSkillName)
|
|
303
|
+
) {
|
|
298
304
|
throw new Error(`--skill-path 指向的不是${SKILL_DISPLAY_NAME} Skill,已拒绝覆盖`);
|
|
299
305
|
}
|
|
300
306
|
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED