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/cli.js
CHANGED
|
@@ -1391,22 +1391,22 @@ var init_gitlab_api = __esm({
|
|
|
1391
1391
|
* 从 Git URL 中提取项目路径
|
|
1392
1392
|
*/
|
|
1393
1393
|
static parseProjectPath(repository) {
|
|
1394
|
-
let
|
|
1395
|
-
if (
|
|
1396
|
-
|
|
1397
|
-
const colonIndex =
|
|
1394
|
+
let path20 = repository;
|
|
1395
|
+
if (path20.startsWith("git@")) {
|
|
1396
|
+
path20 = path20.replace(/^git@/, "");
|
|
1397
|
+
const colonIndex = path20.indexOf(":");
|
|
1398
1398
|
if (colonIndex !== -1) {
|
|
1399
|
-
|
|
1399
|
+
path20 = path20.substring(colonIndex + 1);
|
|
1400
1400
|
}
|
|
1401
1401
|
} else {
|
|
1402
|
-
|
|
1403
|
-
const parts =
|
|
1402
|
+
path20 = path20.replace(/^https?:\/\//, "");
|
|
1403
|
+
const parts = path20.split("/");
|
|
1404
1404
|
if (parts.length > 1) {
|
|
1405
|
-
|
|
1405
|
+
path20 = parts.slice(1).join("/");
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
|
|
1409
|
-
return
|
|
1408
|
+
path20 = path20.replace(/\.git$/, "");
|
|
1409
|
+
return path20;
|
|
1410
1410
|
}
|
|
1411
1411
|
/**
|
|
1412
1412
|
* 编码项目路径用于 API 请求
|
|
@@ -4863,15 +4863,15 @@ async function syncTemplateVersions(aiMemoryFile, projectDir) {
|
|
|
4863
4863
|
await replaceOrInsertSection(aiMemoryFile, "## \u6A21\u677F\u7248\u672C\u4FE1\u606F", newContent);
|
|
4864
4864
|
}
|
|
4865
4865
|
function extractRepoName(repository) {
|
|
4866
|
-
let
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
const parts =
|
|
4866
|
+
let path20 = repository;
|
|
4867
|
+
path20 = path20.replace(/^https?:\/\//, "");
|
|
4868
|
+
path20 = path20.replace(/^git@/, "");
|
|
4869
|
+
const parts = path20.split("/");
|
|
4870
4870
|
if (parts.length > 1) {
|
|
4871
|
-
|
|
4871
|
+
path20 = parts.slice(1).join("/");
|
|
4872
4872
|
}
|
|
4873
|
-
|
|
4874
|
-
return
|
|
4873
|
+
path20 = path20.replace(/\.git$/, "");
|
|
4874
|
+
return path20;
|
|
4875
4875
|
}
|
|
4876
4876
|
var syncMemoryCommand;
|
|
4877
4877
|
var init_sync_memory = __esm({
|
|
@@ -5163,10 +5163,10 @@ function extractApisFromRegistry(registryContent) {
|
|
|
5163
5163
|
let match;
|
|
5164
5164
|
while ((match = apiRegex.exec(registryContent)) !== null) {
|
|
5165
5165
|
const method = match[1];
|
|
5166
|
-
const
|
|
5166
|
+
const path20 = match[2].trim();
|
|
5167
5167
|
const description = match[3].trim();
|
|
5168
|
-
const key = `${method}:${
|
|
5169
|
-
apis.set(key, { method, path:
|
|
5168
|
+
const key = `${method}:${path20}`;
|
|
5169
|
+
apis.set(key, { method, path: path20, description });
|
|
5170
5170
|
}
|
|
5171
5171
|
return apis;
|
|
5172
5172
|
}
|
|
@@ -6078,6 +6078,9 @@ var init_diff = __esm({
|
|
|
6078
6078
|
var index_exports = {};
|
|
6079
6079
|
import { Command as Command16 } from "commander";
|
|
6080
6080
|
import chalk4 from "chalk";
|
|
6081
|
+
import fs6 from "fs-extra";
|
|
6082
|
+
import path19 from "path";
|
|
6083
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
6081
6084
|
function showHelp() {
|
|
6082
6085
|
console.log("");
|
|
6083
6086
|
logger.header("team-cli - AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6");
|
|
@@ -6132,7 +6135,7 @@ function showHelp() {
|
|
|
6132
6135
|
console.log(chalk4.gray("\u66F4\u591A\u4FE1\u606F: https://github.com/yungu/team-cli"));
|
|
6133
6136
|
console.log("");
|
|
6134
6137
|
}
|
|
6135
|
-
var program;
|
|
6138
|
+
var __dirname2, pkg, program;
|
|
6136
6139
|
var init_index = __esm({
|
|
6137
6140
|
"src/index.ts"() {
|
|
6138
6141
|
"use strict";
|
|
@@ -6154,8 +6157,10 @@ var init_index = __esm({
|
|
|
6154
6157
|
init_update();
|
|
6155
6158
|
init_config();
|
|
6156
6159
|
init_diff();
|
|
6160
|
+
__dirname2 = path19.dirname(fileURLToPath2(import.meta.url));
|
|
6161
|
+
pkg = fs6.readJsonSync(path19.join(__dirname2, "../package.json"));
|
|
6157
6162
|
program = new Command16();
|
|
6158
|
-
program.name("team-cli").description("AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6").version(
|
|
6163
|
+
program.name("team-cli").description("AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6").version(pkg.version);
|
|
6159
6164
|
program.option("-v, --verbose", "\u8BE6\u7EC6\u8F93\u51FA\u6A21\u5F0F").option("--debug", "\u8C03\u8BD5\u6A21\u5F0F");
|
|
6160
6165
|
program.addCommand(initCommand);
|
|
6161
6166
|
program.addCommand(splitPrdCommand);
|