adhdev 0.9.82-rc.25 → 0.9.82-rc.26
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/index.js +28 -48
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +28 -48
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -45670,49 +45670,7 @@ function readGitSubmodules(value) {
|
|
|
45670
45670
|
}).filter((entry) => entry !== null);
|
|
45671
45671
|
return submodules.length > 0 ? submodules : void 0;
|
|
45672
45672
|
}
|
|
45673
|
-
function
|
|
45674
|
-
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
45675
|
-
const cachedGit = readObjectRecord(cachedStatus.git);
|
|
45676
|
-
if (Object.keys(cachedGit).length) {
|
|
45677
|
-
const conflictFiles2 = Array.isArray(cachedGit.conflictFiles) ? cachedGit.conflictFiles.filter((value) => typeof value === "string") : [];
|
|
45678
|
-
const conflictCount2 = readNumberValue(cachedGit.conflicts) ?? conflictFiles2.length;
|
|
45679
|
-
const hasConflicts2 = readBooleanValue(cachedGit.hasConflicts) ?? conflictCount2 > 0;
|
|
45680
|
-
const isGitRepo2 = readBooleanValue(cachedGit.isGitRepo);
|
|
45681
|
-
if (isGitRepo2 !== void 0) {
|
|
45682
|
-
const submodules2 = readGitSubmodules(cachedGit.submodules);
|
|
45683
|
-
return {
|
|
45684
|
-
workspace: readStringValue(cachedGit.workspace, node?.workspace) || "",
|
|
45685
|
-
repoRoot: readStringValue(cachedGit.repoRoot, node?.repoRoot, node?.workspace) || null,
|
|
45686
|
-
isGitRepo: isGitRepo2,
|
|
45687
|
-
branch: readStringValue(cachedGit.branch) ?? null,
|
|
45688
|
-
headCommit: readStringValue(cachedGit.headCommit) ?? null,
|
|
45689
|
-
headMessage: readStringValue(cachedGit.headMessage) ?? null,
|
|
45690
|
-
upstream: readStringValue(cachedGit.upstream) ?? null,
|
|
45691
|
-
ahead: readNumberValue(cachedGit.ahead) ?? 0,
|
|
45692
|
-
behind: readNumberValue(cachedGit.behind) ?? 0,
|
|
45693
|
-
staged: readNumberValue(cachedGit.staged) ?? 0,
|
|
45694
|
-
modified: readNumberValue(cachedGit.modified) ?? 0,
|
|
45695
|
-
untracked: readNumberValue(cachedGit.untracked) ?? 0,
|
|
45696
|
-
deleted: readNumberValue(cachedGit.deleted) ?? 0,
|
|
45697
|
-
renamed: readNumberValue(cachedGit.renamed) ?? 0,
|
|
45698
|
-
hasConflicts: hasConflicts2,
|
|
45699
|
-
conflictFiles: conflictFiles2,
|
|
45700
|
-
stashCount: readNumberValue(cachedGit.stashCount) ?? 0,
|
|
45701
|
-
lastCheckedAt: readNumberValue(cachedGit.lastCheckedAt) ?? Date.now(),
|
|
45702
|
-
...submodules2 ? { submodules: submodules2 } : {}
|
|
45703
|
-
};
|
|
45704
|
-
}
|
|
45705
|
-
}
|
|
45706
|
-
const rawGit = readObjectRecord(node?.lastGit ?? node?.last_git);
|
|
45707
|
-
const gitResult = readObjectRecord(rawGit.result);
|
|
45708
|
-
const directStatus = readObjectRecord(rawGit.status);
|
|
45709
|
-
const nestedStatus = readObjectRecord(gitResult.status);
|
|
45710
|
-
const rawProbe = readObjectRecord(node?.lastProbe ?? node?.last_probe);
|
|
45711
|
-
const probeGit = readObjectRecord(rawProbe.git);
|
|
45712
|
-
const probeGitResult = readObjectRecord(probeGit.result);
|
|
45713
|
-
const probeDirectStatus = readObjectRecord(probeGit.status);
|
|
45714
|
-
const probeNestedStatus = readObjectRecord(probeGitResult.status);
|
|
45715
|
-
const status = Object.keys(directStatus).length ? directStatus : Object.keys(nestedStatus).length ? nestedStatus : Object.keys(probeDirectStatus).length ? probeDirectStatus : Object.keys(probeNestedStatus).length ? probeNestedStatus : {};
|
|
45673
|
+
function normalizeInlineMeshGitStatus(status, node, options) {
|
|
45716
45674
|
const isGitRepo = readBooleanValue(status.isGitRepo);
|
|
45717
45675
|
if (!Object.keys(status).length || isGitRepo === void 0) return void 0;
|
|
45718
45676
|
const conflictFiles = Array.isArray(status.conflictFiles) ? status.conflictFiles.filter((value) => typeof value === "string") : [];
|
|
@@ -45737,10 +45695,31 @@ function buildCachedInlineMeshGitStatus(node) {
|
|
|
45737
45695
|
hasConflicts,
|
|
45738
45696
|
conflictFiles,
|
|
45739
45697
|
stashCount: readNumberValue(status.stashCount) ?? 0,
|
|
45740
|
-
lastCheckedAt: Date.now(),
|
|
45698
|
+
lastCheckedAt: options?.lastCheckedAt ?? readNumberValue(status.lastCheckedAt) ?? Date.now(),
|
|
45741
45699
|
...submodules ? { submodules } : {}
|
|
45742
45700
|
};
|
|
45743
45701
|
}
|
|
45702
|
+
function buildInlineMeshTransitGitStatus(node) {
|
|
45703
|
+
const rawGit = readObjectRecord(node?.lastGit ?? node?.last_git);
|
|
45704
|
+
const gitResult = readObjectRecord(rawGit.result);
|
|
45705
|
+
const directStatus = readObjectRecord(rawGit.status);
|
|
45706
|
+
const nestedStatus = readObjectRecord(gitResult.status);
|
|
45707
|
+
const rawProbe = readObjectRecord(node?.lastProbe ?? node?.last_probe);
|
|
45708
|
+
const probeGit = readObjectRecord(rawProbe.git);
|
|
45709
|
+
const probeGitResult = readObjectRecord(probeGit.result);
|
|
45710
|
+
const probeDirectStatus = readObjectRecord(probeGit.status);
|
|
45711
|
+
const probeNestedStatus = readObjectRecord(probeGitResult.status);
|
|
45712
|
+
const status = Object.keys(directStatus).length ? directStatus : Object.keys(nestedStatus).length ? nestedStatus : Object.keys(probeDirectStatus).length ? probeDirectStatus : Object.keys(probeNestedStatus).length ? probeNestedStatus : {};
|
|
45713
|
+
return normalizeInlineMeshGitStatus(status, node, { lastCheckedAt: Date.now() });
|
|
45714
|
+
}
|
|
45715
|
+
function buildCachedInlineMeshGitStatus(node) {
|
|
45716
|
+
const liveGit = buildInlineMeshTransitGitStatus(node);
|
|
45717
|
+
if (liveGit) return liveGit;
|
|
45718
|
+
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
45719
|
+
const cachedGit = readObjectRecord(cachedStatus.git);
|
|
45720
|
+
if (!Object.keys(cachedGit).length) return void 0;
|
|
45721
|
+
return normalizeInlineMeshGitStatus(cachedGit, node);
|
|
45722
|
+
}
|
|
45744
45723
|
function shouldDiscardCachedInlineMeshStatus(node) {
|
|
45745
45724
|
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
45746
45725
|
if (!Object.keys(cachedStatus).length) return false;
|
|
@@ -45969,9 +45948,10 @@ function collectLiveMeshSessionRecords(args) {
|
|
|
45969
45948
|
}
|
|
45970
45949
|
function applyCachedInlineMeshNodeStatus(status, node) {
|
|
45971
45950
|
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
45972
|
-
const
|
|
45973
|
-
const
|
|
45974
|
-
const
|
|
45951
|
+
const liveGit = buildInlineMeshTransitGitStatus(node);
|
|
45952
|
+
const git = liveGit ?? buildCachedInlineMeshGitStatus(node);
|
|
45953
|
+
const error48 = liveGit ? void 0 : readStringValue(cachedStatus.error, node?.error);
|
|
45954
|
+
const health = liveGit ? void 0 : readStringValue(cachedStatus.health, node?.health);
|
|
45975
45955
|
const machineStatus = readStringValue(cachedStatus.machineStatus, node?.machineStatus);
|
|
45976
45956
|
const lastSeenAt = toIsoTimestamp(cachedStatus.lastSeenAt ?? cachedStatus.last_seen_at ?? node?.lastSeenAt ?? node?.last_seen_at);
|
|
45977
45957
|
const updatedAt = toIsoTimestamp(cachedStatus.updatedAt ?? cachedStatus.updated_at ?? node?.updatedAt ?? node?.updated_at);
|
|
@@ -67292,7 +67272,7 @@ var init_adhdev_daemon = __esm({
|
|
|
67292
67272
|
init_version();
|
|
67293
67273
|
init_src();
|
|
67294
67274
|
init_runtime_defaults();
|
|
67295
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.
|
|
67275
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.26" });
|
|
67296
67276
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
67297
67277
|
localHttpServer = null;
|
|
67298
67278
|
localWss = null;
|