yg-team-cli 2.3.1 → 2.3.2
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/dist/cli.js +27 -22
- package/dist/cli.js.map +1 -1
- package/dist/index.js +26 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -802,22 +802,22 @@ var init_gitlab_api = __esm({
|
|
|
802
802
|
* 从 Git URL 中提取项目路径
|
|
803
803
|
*/
|
|
804
804
|
static parseProjectPath(repository) {
|
|
805
|
-
let
|
|
806
|
-
if (
|
|
807
|
-
|
|
808
|
-
const colonIndex =
|
|
805
|
+
let path20 = repository;
|
|
806
|
+
if (path20.startsWith("git@")) {
|
|
807
|
+
path20 = path20.replace(/^git@/, "");
|
|
808
|
+
const colonIndex = path20.indexOf(":");
|
|
809
809
|
if (colonIndex !== -1) {
|
|
810
|
-
|
|
810
|
+
path20 = path20.substring(colonIndex + 1);
|
|
811
811
|
}
|
|
812
812
|
} else {
|
|
813
|
-
|
|
814
|
-
const parts =
|
|
813
|
+
path20 = path20.replace(/^https?:\/\//, "");
|
|
814
|
+
const parts = path20.split("/");
|
|
815
815
|
if (parts.length > 1) {
|
|
816
|
-
|
|
816
|
+
path20 = parts.slice(1).join("/");
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
|
|
820
|
-
return
|
|
819
|
+
path20 = path20.replace(/\.git$/, "");
|
|
820
|
+
return path20;
|
|
821
821
|
}
|
|
822
822
|
/**
|
|
823
823
|
* 编码项目路径用于 API 请求
|
|
@@ -873,6 +873,9 @@ init_esm_shims();
|
|
|
873
873
|
init_logger();
|
|
874
874
|
import { Command as Command16 } from "commander";
|
|
875
875
|
import chalk4 from "chalk";
|
|
876
|
+
import fs6 from "fs-extra";
|
|
877
|
+
import path19 from "path";
|
|
878
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
876
879
|
|
|
877
880
|
// src/commands/init.ts
|
|
878
881
|
init_esm_shims();
|
|
@@ -4827,15 +4830,15 @@ async function syncTemplateVersions(aiMemoryFile, projectDir) {
|
|
|
4827
4830
|
await replaceOrInsertSection(aiMemoryFile, "## \u6A21\u677F\u7248\u672C\u4FE1\u606F", newContent);
|
|
4828
4831
|
}
|
|
4829
4832
|
function extractRepoName(repository) {
|
|
4830
|
-
let
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
const parts =
|
|
4833
|
+
let path20 = repository;
|
|
4834
|
+
path20 = path20.replace(/^https?:\/\//, "");
|
|
4835
|
+
path20 = path20.replace(/^git@/, "");
|
|
4836
|
+
const parts = path20.split("/");
|
|
4834
4837
|
if (parts.length > 1) {
|
|
4835
|
-
|
|
4838
|
+
path20 = parts.slice(1).join("/");
|
|
4836
4839
|
}
|
|
4837
|
-
|
|
4838
|
-
return
|
|
4840
|
+
path20 = path20.replace(/\.git$/, "");
|
|
4841
|
+
return path20;
|
|
4839
4842
|
}
|
|
4840
4843
|
|
|
4841
4844
|
// src/commands/check-api.ts
|
|
@@ -5150,10 +5153,10 @@ function extractApisFromRegistry(registryContent) {
|
|
|
5150
5153
|
let match;
|
|
5151
5154
|
while ((match = apiRegex.exec(registryContent)) !== null) {
|
|
5152
5155
|
const method = match[1];
|
|
5153
|
-
const
|
|
5156
|
+
const path20 = match[2].trim();
|
|
5154
5157
|
const description = match[3].trim();
|
|
5155
|
-
const key = `${method}:${
|
|
5156
|
-
apis.set(key, { method, path:
|
|
5158
|
+
const key = `${method}:${path20}`;
|
|
5159
|
+
apis.set(key, { method, path: path20, description });
|
|
5157
5160
|
}
|
|
5158
5161
|
return apis;
|
|
5159
5162
|
}
|
|
@@ -5967,8 +5970,10 @@ var Table = class {
|
|
|
5967
5970
|
};
|
|
5968
5971
|
|
|
5969
5972
|
// src/index.ts
|
|
5973
|
+
var __dirname2 = path19.dirname(fileURLToPath2(import.meta.url));
|
|
5974
|
+
var pkg = fs6.readJsonSync(path19.join(__dirname2, "../package.json"));
|
|
5970
5975
|
var program = new Command16();
|
|
5971
|
-
program.name("team-cli").description("AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6").version(
|
|
5976
|
+
program.name("team-cli").description("AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6").version(pkg.version);
|
|
5972
5977
|
program.option("-v, --verbose", "\u8BE6\u7EC6\u8F93\u51FA\u6A21\u5F0F").option("--debug", "\u8C03\u8BD5\u6A21\u5F0F");
|
|
5973
5978
|
program.addCommand(initCommand);
|
|
5974
5979
|
program.addCommand(splitPrdCommand);
|