@agimon-ai/po-git 0.0.0-alpha.65 → 0.0.0-alpha.67
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/apiContracts.cjs +4 -1
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.mjs +4 -1
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/extensions/native.mjs +4 -1
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/server.cjs +8 -4
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.mjs +8 -4
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +38 -8
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{worktreeOperations-CP2lYxrI.mjs → worktreeOperations-B3E4JY4H.mjs} +143 -23
- package/dist/worktreeOperations-B3E4JY4H.mjs.map +1 -0
- package/dist/{worktreeOperations-C1ygq-Na.cjs → worktreeOperations-CD7s0YnO.cjs} +142 -22
- package/dist/worktreeOperations-CD7s0YnO.cjs.map +1 -0
- package/package.json +8 -8
- package/dist/worktreeOperations-C1ygq-Na.cjs.map +0 -1
- package/dist/worktreeOperations-CP2lYxrI.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as READ_TIMEOUT_MS, E as runGit, S as NETWORK_TIMEOUT_MS, T as createWorktreeGit, a as GIT_WORKTREE_LIFECYCLE_EVENT, c as isWorktreeLifecycleEvent, d as registryFile, f as readJson, g as invalidRequest, h as PoGitExpectedError, i as GIT_SESSION_CHANGED_EVENT, l as credentialsFile, m as HubUnavailableError, n as createWorktreeRegistry, o as createWorktreeMessageInbox, p as writeJsonAtomic, r as validRefName, s as isSessionChangedEvent, t as createWorktreeOperations, u as poGitRoot, w as REBASE_TIMEOUT_MS } from "../worktreeOperations-
|
|
1
|
+
import { C as READ_TIMEOUT_MS, E as runGit, S as NETWORK_TIMEOUT_MS, T as createWorktreeGit, a as GIT_WORKTREE_LIFECYCLE_EVENT, c as isWorktreeLifecycleEvent, d as registryFile, f as readJson, g as invalidRequest, h as PoGitExpectedError, i as GIT_SESSION_CHANGED_EVENT, l as credentialsFile, m as HubUnavailableError, n as createWorktreeRegistry, o as createWorktreeMessageInbox, p as writeJsonAtomic, r as validRefName, s as isSessionChangedEvent, t as createWorktreeOperations, u as poGitRoot, w as REBASE_TIMEOUT_MS } from "../worktreeOperations-B3E4JY4H.mjs";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import os from "node:os";
|
|
@@ -1999,11 +1999,15 @@ function sameList(left, right) {
|
|
|
1999
1999
|
return other !== void 0 && entry.id === other.id && entry.branch === other.branch && entry.sessionId === other.sessionId && entry.orphaned === other.orphaned && entry.unowned === other.unowned;
|
|
2000
2000
|
});
|
|
2001
2001
|
}
|
|
2002
|
-
function errorTargetFor(command) {
|
|
2003
|
-
|
|
2002
|
+
function errorTargetFor(command, error) {
|
|
2003
|
+
if (command.action === "close") return {
|
|
2004
2004
|
action: "close",
|
|
2005
2005
|
id: command.id
|
|
2006
2006
|
};
|
|
2007
|
+
return error instanceof PoGitExpectedError && error.code === "rift_missing" ? {
|
|
2008
|
+
action: "create",
|
|
2009
|
+
riftMissing: true
|
|
2010
|
+
} : { action: "create" };
|
|
2007
2011
|
}
|
|
2008
2012
|
/** A command the page sent, or undefined when the frame was not one. */
|
|
2009
2013
|
function parseCommand(payload) {
|
|
@@ -2191,7 +2195,7 @@ function createWorktreesChannel(options = {}) {
|
|
|
2191
2195
|
}).catch((error) => {
|
|
2192
2196
|
if (generations.get(scope.sessionId) !== generation) return;
|
|
2193
2197
|
host.onNotice(`worktree command failed for ${scope.sessionId} (${failureText(error)})`);
|
|
2194
|
-
mark(scope, void 0, failureText(error), errorTargetFor(command));
|
|
2198
|
+
mark(scope, void 0, failureText(error), errorTargetFor(command, error));
|
|
2195
2199
|
}).finally(() => {
|
|
2196
2200
|
if (generations.get(scope.sessionId) === generation) busy.delete(scope.sessionId);
|
|
2197
2201
|
});
|