siluzan-tso-cli 1.0.0-beta.23 → 1.0.0-beta.25
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 +11 -8
- package/dist/skill/_meta.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
|
|
|
20
20
|
siluzan-tso init --force # 强制覆盖已存在文件
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
> **注意**:当前为测试版(1.0.0-beta.
|
|
23
|
+
> **注意**:当前为测试版(1.0.0-beta.25),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
|
|
24
24
|
|
|
25
25
|
| 助手 | 建议 `--ai` |
|
|
26
26
|
|------|-------------|
|
package/dist/index.js
CHANGED
|
@@ -601,9 +601,11 @@ function getCurrentVersion(importMetaUrl) {
|
|
|
601
601
|
return "0.0.0";
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
|
|
606
|
-
|
|
604
|
+
function npmDistTagForBuildEnv(buildEnv) {
|
|
605
|
+
return buildEnv === "test" ? "beta" : "latest";
|
|
606
|
+
}
|
|
607
|
+
function npmMinRequiredTagForBuildEnv(buildEnv) {
|
|
608
|
+
return buildEnv === "test" ? "min-required-beta" : "min-required";
|
|
607
609
|
}
|
|
608
610
|
function isNewer(a, b) {
|
|
609
611
|
const parse = (v) => {
|
|
@@ -675,11 +677,11 @@ async function fetchVersionByTag(tag, cacheKey, cfg) {
|
|
|
675
677
|
async function notifyIfOutdated() {
|
|
676
678
|
try {
|
|
677
679
|
const current = getCurrentVersion2();
|
|
678
|
-
const tag =
|
|
680
|
+
const tag = npmDistTagForBuildEnv(BUILD_ENV);
|
|
679
681
|
const isBeta = tag === "beta";
|
|
680
682
|
const latestCacheKey = isBeta ? "_tsoLatestBeta" : "_tsoLatestStable";
|
|
681
683
|
const minCacheKey = isBeta ? "_tsoMinRequiredBeta" : "_tsoMinRequiredStable";
|
|
682
|
-
const minTag =
|
|
684
|
+
const minTag = npmMinRequiredTagForBuildEnv(BUILD_ENV);
|
|
683
685
|
const cfg = readConfigRaw();
|
|
684
686
|
const [latest, minRequired] = await Promise.all([
|
|
685
687
|
fetchVersionByTag(tag, latestCacheKey, cfg),
|
|
@@ -719,7 +721,7 @@ async function notifyIfOutdated() {
|
|
|
719
721
|
}
|
|
720
722
|
}
|
|
721
723
|
async function fetchLatestVersion() {
|
|
722
|
-
const tag =
|
|
724
|
+
const tag = npmDistTagForBuildEnv(BUILD_ENV);
|
|
723
725
|
return fetchNpmVersion(PKG_NAME, tag);
|
|
724
726
|
}
|
|
725
727
|
|
|
@@ -972,7 +974,7 @@ function parseTargets(raw) {
|
|
|
972
974
|
return [...new Set(result)];
|
|
973
975
|
}
|
|
974
976
|
function skillRoot() {
|
|
975
|
-
return path5.join(__dirname, "
|
|
977
|
+
return path5.join(__dirname, "skill");
|
|
976
978
|
}
|
|
977
979
|
async function writeSkillFilesToDir(destDir, skillFiles, force) {
|
|
978
980
|
await fs5.mkdir(destDir, { recursive: true });
|
|
@@ -1080,7 +1082,8 @@ async function runUpdate(options) {
|
|
|
1080
1082
|
const current = getCurrentVersion2();
|
|
1081
1083
|
console.log(`
|
|
1082
1084
|
\u5F53\u524D\u7248\u672C\uFF1A${current}`);
|
|
1083
|
-
|
|
1085
|
+
const npmTag = npmDistTagForBuildEnv(BUILD_ENV);
|
|
1086
|
+
console.log(`\u6B63\u5728\u67E5\u8BE2 npm registry\uFF08\u6784\u5EFA\uFF1A${BUILD_ENV}\uFF0Cdist-tag\uFF1A${npmTag}\uFF09\u2026`);
|
|
1084
1087
|
const latest = await fetchLatestVersion();
|
|
1085
1088
|
if (!latest) {
|
|
1086
1089
|
console.warn("\u26A0\uFE0F \u65E0\u6CD5\u8BBF\u95EE npm registry\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002");
|
package/dist/skill/_meta.json
CHANGED