cwm-assistant 0.2.0 → 0.2.1
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.
|
@@ -2619,7 +2619,7 @@ var Type = type_exports2;
|
|
|
2619
2619
|
|
|
2620
2620
|
// ../../packages/contracts/src/assistant.ts
|
|
2621
2621
|
var ASSISTANT_PROTOCOL = 1;
|
|
2622
|
-
var ASSISTANT_VERSION = "0.2.
|
|
2622
|
+
var ASSISTANT_VERSION = "0.2.1";
|
|
2623
2623
|
var ASSISTANT_PORT = 46322;
|
|
2624
2624
|
|
|
2625
2625
|
// ../../packages/contracts/src/index.ts
|
|
@@ -2676,11 +2676,14 @@ var GitCommandError = class extends Error {
|
|
|
2676
2676
|
this.exitCode = exitCode;
|
|
2677
2677
|
}
|
|
2678
2678
|
};
|
|
2679
|
+
function longPathArgs(platform = process.platform) {
|
|
2680
|
+
return platform === "win32" ? ["-c", "core.longpaths=true"] : [];
|
|
2681
|
+
}
|
|
2679
2682
|
function runGit(cwd, args, options = {}) {
|
|
2680
2683
|
return new Promise((resolve, reject) => {
|
|
2681
2684
|
const execution = gitExecution.getStore();
|
|
2682
2685
|
execution?.signal?.throwIfAborted();
|
|
2683
|
-
const child = spawn(execution?.executable || "git", ["-C", cwd, ...args], {
|
|
2686
|
+
const child = spawn(execution?.executable || "git", [...longPathArgs(), "-C", cwd, ...args], {
|
|
2684
2687
|
signal: execution?.signal,
|
|
2685
2688
|
shell: false,
|
|
2686
2689
|
windowsHide: true,
|
|
@@ -4645,10 +4648,15 @@ var LocalJobs = class {
|
|
|
4645
4648
|
if (!fs14.existsSync(source)) {
|
|
4646
4649
|
const temporary = source + ".clone-" + randomUUID6();
|
|
4647
4650
|
log("\u514B\u9686\u4ED3\u5E93\uFF1A" + repo.alias);
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4651
|
+
try {
|
|
4652
|
+
await runGit(namespace, ["clone", "--", repo.remoteUrl, temporary], {
|
|
4653
|
+
onLog: log,
|
|
4654
|
+
timeoutMs: 6e5
|
|
4655
|
+
});
|
|
4656
|
+
} catch (error) {
|
|
4657
|
+
fs14.rmSync(temporary, { recursive: true, force: true });
|
|
4658
|
+
throw error;
|
|
4659
|
+
}
|
|
4652
4660
|
fs14.renameSync(temporary, source);
|
|
4653
4661
|
}
|
|
4654
4662
|
if (await runGit(source, ["config", "--get", "remote.origin.url"]) !== repo.remoteUrl)
|
|
@@ -6458,4 +6466,4 @@ async function cli(args, entry) {
|
|
|
6458
6466
|
export {
|
|
6459
6467
|
cli
|
|
6460
6468
|
};
|
|
6461
|
-
//# sourceMappingURL=cli-
|
|
6469
|
+
//# sourceMappingURL=cli-Q3EWGNQT.js.map
|