@spaceflow/core 0.24.0 → 0.25.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spaceflow/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Spaceflow 核心能力库",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Lydanne",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"zod-to-json-schema": "^3.25.1",
|
|
100
100
|
"commander": "^12.1.0",
|
|
101
101
|
"i18next": "^25.8.4",
|
|
102
|
-
"@spaceflow/shared": "0.
|
|
102
|
+
"@spaceflow/shared": "0.7.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@swc/core": "1.15.3",
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
getPackageManager,
|
|
17
17
|
detectPackageManager,
|
|
18
18
|
getSpaceflowDir,
|
|
19
|
+
getSpaceflowCoreVersion,
|
|
19
20
|
ensureSpaceflowPackageJson,
|
|
20
21
|
ensureEditorGitignore,
|
|
21
22
|
SchemaGeneratorService,
|
|
@@ -664,10 +665,32 @@ export class InstallService {
|
|
|
664
665
|
if (shouldLog(verbose, 1))
|
|
665
666
|
console.log(t("install:foundDeps", { count: Object.keys(dependencies).length }));
|
|
666
667
|
|
|
667
|
-
// 1.
|
|
668
|
+
// 1. 记录更新前的 @spaceflow/core 版本
|
|
669
|
+
const spaceflowPkgPath = join(spaceflowDir, "package.json");
|
|
670
|
+
let prevCoreVersion: string | undefined;
|
|
671
|
+
if (existsSync(spaceflowPkgPath)) {
|
|
672
|
+
try {
|
|
673
|
+
const prevPkg = JSON.parse(await readFile(spaceflowPkgPath, "utf-8"));
|
|
674
|
+
prevCoreVersion = prevPkg.dependencies?.["@spaceflow/core"];
|
|
675
|
+
} catch {
|
|
676
|
+
// ignore
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// 2. 更新 .spaceflow/package.json 中的所有依赖
|
|
668
681
|
await this.updateSpaceflowPackageJson(dependencies, spaceflowDir, verbose);
|
|
669
682
|
|
|
670
|
-
//
|
|
683
|
+
// 3. 版本变更提示
|
|
684
|
+
const currentCoreVersion = getSpaceflowCoreVersion();
|
|
685
|
+
if (prevCoreVersion && prevCoreVersion !== currentCoreVersion) {
|
|
686
|
+
if (shouldLog(verbose, 1)) {
|
|
687
|
+
console.log(
|
|
688
|
+
t("install:coreVersionChanged", { prev: prevCoreVersion, current: currentCoreVersion }),
|
|
689
|
+
);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
// 4. 安装所有依赖
|
|
671
694
|
if (shouldLog(verbose, 1)) console.log(t("install:installingDeps"));
|
|
672
695
|
const pm = detectPackageManager(spaceflowDir);
|
|
673
696
|
try {
|
|
@@ -676,7 +699,7 @@ export class InstallService {
|
|
|
676
699
|
console.warn(t("install:pmInstallFailed", { pm }));
|
|
677
700
|
}
|
|
678
701
|
|
|
679
|
-
//
|
|
702
|
+
// 5. 处理每个依赖的 skills/commands 关联
|
|
680
703
|
for (const [name, config] of Object.entries(dependencies)) {
|
|
681
704
|
const { source } = this.parseExtensionConfig(config);
|
|
682
705
|
const sourceType = getSourceType(source);
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"updatingAll": "🔄 Updating all dependencies...",
|
|
37
37
|
"noDeps": " No dependencies in config file",
|
|
38
38
|
"foundDeps": " Found {{count}} dependencies",
|
|
39
|
+
"coreVersionChanged": "📦 @spaceflow/core version changed: {{prev}} → {{current}}",
|
|
39
40
|
"installingDeps": "\n📦 Installing dependencies...",
|
|
40
41
|
"pmInstallFailed": " Warning: {{pm}} install failed",
|
|
41
42
|
"depNotInstalled": " ⚠️ {{name}} not installed successfully, skipping",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"updatingAll": "🔄 更新所有依赖...",
|
|
37
37
|
"noDeps": " 配置文件中没有 dependencies",
|
|
38
38
|
"foundDeps": " 找到 {{count}} 个依赖",
|
|
39
|
+
"coreVersionChanged": "📦 @spaceflow/core 版本变更: {{prev}} → {{current}}",
|
|
39
40
|
"installingDeps": "\n📦 安装依赖...",
|
|
40
41
|
"pmInstallFailed": " 警告: {{pm}} install 失败",
|
|
41
42
|
"depNotInstalled": " ⚠️ {{name}} 未安装成功,跳过",
|