@costrict/csc 4.2.4-beta1 → 4.2.5-beta
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 +179818 -169708
- package/dist/services/rawDump/batchWorker.js +11 -11
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ function getRawDumpDir() {
|
|
|
27
27
|
return path.join(getCscDir(), "raw-dump");
|
|
28
28
|
}
|
|
29
29
|
function normalizeProjectPath(dir) {
|
|
30
|
-
return dir.replace(/:/
|
|
30
|
+
return dir.replace(/:/gu, "-").replace(/[/\\]/gu, "-");
|
|
31
31
|
}
|
|
32
32
|
function getSessionDirectory(directory) {
|
|
33
33
|
const claudeHome = getCscDir();
|
|
@@ -508,8 +508,8 @@ async function saveCoStrictCredentials(credentials) {
|
|
|
508
508
|
import { createRequire } from "module";
|
|
509
509
|
function getVersion() {
|
|
510
510
|
try {
|
|
511
|
-
if (typeof MACRO !== "undefined" && "4.2.
|
|
512
|
-
return "4.2.
|
|
511
|
+
if (typeof MACRO !== "undefined" && "4.2.5-beta")
|
|
512
|
+
return "4.2.5-beta";
|
|
513
513
|
} catch {}
|
|
514
514
|
try {
|
|
515
515
|
const require2 = createRequire(import.meta.url);
|
|
@@ -644,7 +644,7 @@ function extractFilesFromDiff(diff) {
|
|
|
644
644
|
else if (line.startsWith("--- a/"))
|
|
645
645
|
files.add(line.slice(6).trim());
|
|
646
646
|
else if (line.startsWith("diff --git ")) {
|
|
647
|
-
const match = line.match(/^diff --git "?a\/(.+?)"? "?b\/(.+?)"?$/);
|
|
647
|
+
const match = line.match(/^diff --git "?a\/(.+?)"? "?b\/(.+?)"?$/u);
|
|
648
648
|
if (match?.[2])
|
|
649
649
|
files.add(match[2]);
|
|
650
650
|
}
|
|
@@ -717,7 +717,7 @@ var RAW_DUMP_MODE = {
|
|
|
717
717
|
BOTH: 3
|
|
718
718
|
};
|
|
719
719
|
function getLocalDumpDir() {
|
|
720
|
-
return (process.env.CSC_RAW_DUMP_DIR || DEFAULT_LOCAL_DIR).replace(
|
|
720
|
+
return (process.env.CSC_RAW_DUMP_DIR || DEFAULT_LOCAL_DIR).replace(/\/$/u, "");
|
|
721
721
|
}
|
|
722
722
|
function getRawDumpMode() {
|
|
723
723
|
const v = process.env.CSC_RAW_DUMP_MODE;
|
|
@@ -730,7 +730,7 @@ function getRawDumpMode() {
|
|
|
730
730
|
return 1;
|
|
731
731
|
}
|
|
732
732
|
function normalizeProjectPath2(dir) {
|
|
733
|
-
return dir.replace(/:/
|
|
733
|
+
return dir.replace(/:/gu, "-").replace(/[/\\]/gu, "-");
|
|
734
734
|
}
|
|
735
735
|
function getDateFromTimestamp(ts) {
|
|
736
736
|
const d = new Date(ts);
|
|
@@ -1539,13 +1539,13 @@ async function processTask(task, authData) {
|
|
|
1539
1539
|
function formatIso(ms) {
|
|
1540
1540
|
if (!ms)
|
|
1541
1541
|
return "";
|
|
1542
|
-
return ms.toISOString().replace(/\.\d{3}Z
|
|
1542
|
+
return ms.toISOString().replace(/\.\d{3}Z$/u, "Z");
|
|
1543
1543
|
}
|
|
1544
1544
|
function resolveRawDumpBaseUrl(baseUrl) {
|
|
1545
1545
|
const explicit = process.env.COSTRICT_RAW_DUMP_BASE_URL || process.env.CSC_RAW_DUMP_BASE_URL;
|
|
1546
1546
|
if (explicit)
|
|
1547
|
-
return explicit.replace(
|
|
1548
|
-
const raw = (baseUrl || process.env.COSTRICT_BASE_URL || "https://zgsm.sangfor.com").replace(
|
|
1547
|
+
return explicit.replace(/\/$/u, "");
|
|
1548
|
+
const raw = (baseUrl || process.env.COSTRICT_BASE_URL || "https://zgsm.sangfor.com").replace(/\/$/u, "");
|
|
1549
1549
|
if (raw.includes("/chat-rag/api/forward")) {
|
|
1550
1550
|
try {
|
|
1551
1551
|
const url = new URL(raw);
|
|
@@ -1557,7 +1557,7 @@ function resolveRawDumpBaseUrl(baseUrl) {
|
|
|
1557
1557
|
return raw;
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
|
-
return raw.replace(/\/cloud-api
|
|
1560
|
+
return raw.replace(/\/cloud-api$/u, "");
|
|
1561
1561
|
}
|
|
1562
1562
|
function getRawDumpUrl(baseUrl, endpoint, isAnonymous = false) {
|
|
1563
1563
|
const suffix = endpoint.startsWith("/") ? endpoint : `/${endpoint}`;
|
|
@@ -2422,5 +2422,5 @@ export {
|
|
|
2422
2422
|
startBatchWorker
|
|
2423
2423
|
};
|
|
2424
2424
|
|
|
2425
|
-
//# debugId=
|
|
2425
|
+
//# debugId=C48806CC68A5175F64756E2164756E21
|
|
2426
2426
|
//# sourceMappingURL=batchWorker.js.map
|