adhdev 0.9.82-rc.25 → 0.9.82-rc.27
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/cli/index.js
CHANGED
|
@@ -46658,49 +46658,7 @@ function readGitSubmodules(value) {
|
|
|
46658
46658
|
}).filter((entry) => entry !== null);
|
|
46659
46659
|
return submodules.length > 0 ? submodules : void 0;
|
|
46660
46660
|
}
|
|
46661
|
-
function
|
|
46662
|
-
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
46663
|
-
const cachedGit = readObjectRecord(cachedStatus.git);
|
|
46664
|
-
if (Object.keys(cachedGit).length) {
|
|
46665
|
-
const conflictFiles2 = Array.isArray(cachedGit.conflictFiles) ? cachedGit.conflictFiles.filter((value) => typeof value === "string") : [];
|
|
46666
|
-
const conflictCount2 = readNumberValue(cachedGit.conflicts) ?? conflictFiles2.length;
|
|
46667
|
-
const hasConflicts2 = readBooleanValue(cachedGit.hasConflicts) ?? conflictCount2 > 0;
|
|
46668
|
-
const isGitRepo2 = readBooleanValue(cachedGit.isGitRepo);
|
|
46669
|
-
if (isGitRepo2 !== void 0) {
|
|
46670
|
-
const submodules2 = readGitSubmodules(cachedGit.submodules);
|
|
46671
|
-
return {
|
|
46672
|
-
workspace: readStringValue(cachedGit.workspace, node?.workspace) || "",
|
|
46673
|
-
repoRoot: readStringValue(cachedGit.repoRoot, node?.repoRoot, node?.workspace) || null,
|
|
46674
|
-
isGitRepo: isGitRepo2,
|
|
46675
|
-
branch: readStringValue(cachedGit.branch) ?? null,
|
|
46676
|
-
headCommit: readStringValue(cachedGit.headCommit) ?? null,
|
|
46677
|
-
headMessage: readStringValue(cachedGit.headMessage) ?? null,
|
|
46678
|
-
upstream: readStringValue(cachedGit.upstream) ?? null,
|
|
46679
|
-
ahead: readNumberValue(cachedGit.ahead) ?? 0,
|
|
46680
|
-
behind: readNumberValue(cachedGit.behind) ?? 0,
|
|
46681
|
-
staged: readNumberValue(cachedGit.staged) ?? 0,
|
|
46682
|
-
modified: readNumberValue(cachedGit.modified) ?? 0,
|
|
46683
|
-
untracked: readNumberValue(cachedGit.untracked) ?? 0,
|
|
46684
|
-
deleted: readNumberValue(cachedGit.deleted) ?? 0,
|
|
46685
|
-
renamed: readNumberValue(cachedGit.renamed) ?? 0,
|
|
46686
|
-
hasConflicts: hasConflicts2,
|
|
46687
|
-
conflictFiles: conflictFiles2,
|
|
46688
|
-
stashCount: readNumberValue(cachedGit.stashCount) ?? 0,
|
|
46689
|
-
lastCheckedAt: readNumberValue(cachedGit.lastCheckedAt) ?? Date.now(),
|
|
46690
|
-
...submodules2 ? { submodules: submodules2 } : {}
|
|
46691
|
-
};
|
|
46692
|
-
}
|
|
46693
|
-
}
|
|
46694
|
-
const rawGit = readObjectRecord(node?.lastGit ?? node?.last_git);
|
|
46695
|
-
const gitResult = readObjectRecord(rawGit.result);
|
|
46696
|
-
const directStatus = readObjectRecord(rawGit.status);
|
|
46697
|
-
const nestedStatus = readObjectRecord(gitResult.status);
|
|
46698
|
-
const rawProbe = readObjectRecord(node?.lastProbe ?? node?.last_probe);
|
|
46699
|
-
const probeGit = readObjectRecord(rawProbe.git);
|
|
46700
|
-
const probeGitResult = readObjectRecord(probeGit.result);
|
|
46701
|
-
const probeDirectStatus = readObjectRecord(probeGit.status);
|
|
46702
|
-
const probeNestedStatus = readObjectRecord(probeGitResult.status);
|
|
46703
|
-
const status = Object.keys(directStatus).length ? directStatus : Object.keys(nestedStatus).length ? nestedStatus : Object.keys(probeDirectStatus).length ? probeDirectStatus : Object.keys(probeNestedStatus).length ? probeNestedStatus : {};
|
|
46661
|
+
function normalizeInlineMeshGitStatus(status, node, options) {
|
|
46704
46662
|
const isGitRepo = readBooleanValue(status.isGitRepo);
|
|
46705
46663
|
if (!Object.keys(status).length || isGitRepo === void 0) return void 0;
|
|
46706
46664
|
const conflictFiles = Array.isArray(status.conflictFiles) ? status.conflictFiles.filter((value) => typeof value === "string") : [];
|
|
@@ -46725,10 +46683,31 @@ function buildCachedInlineMeshGitStatus(node) {
|
|
|
46725
46683
|
hasConflicts,
|
|
46726
46684
|
conflictFiles,
|
|
46727
46685
|
stashCount: readNumberValue(status.stashCount) ?? 0,
|
|
46728
|
-
lastCheckedAt: Date.now(),
|
|
46686
|
+
lastCheckedAt: options?.lastCheckedAt ?? readNumberValue(status.lastCheckedAt) ?? Date.now(),
|
|
46729
46687
|
...submodules ? { submodules } : {}
|
|
46730
46688
|
};
|
|
46731
46689
|
}
|
|
46690
|
+
function buildInlineMeshTransitGitStatus(node) {
|
|
46691
|
+
const rawGit = readObjectRecord(node?.lastGit ?? node?.last_git);
|
|
46692
|
+
const gitResult = readObjectRecord(rawGit.result);
|
|
46693
|
+
const directStatus = readObjectRecord(rawGit.status);
|
|
46694
|
+
const nestedStatus = readObjectRecord(gitResult.status);
|
|
46695
|
+
const rawProbe = readObjectRecord(node?.lastProbe ?? node?.last_probe);
|
|
46696
|
+
const probeGit = readObjectRecord(rawProbe.git);
|
|
46697
|
+
const probeGitResult = readObjectRecord(probeGit.result);
|
|
46698
|
+
const probeDirectStatus = readObjectRecord(probeGit.status);
|
|
46699
|
+
const probeNestedStatus = readObjectRecord(probeGitResult.status);
|
|
46700
|
+
const status = Object.keys(directStatus).length ? directStatus : Object.keys(nestedStatus).length ? nestedStatus : Object.keys(probeDirectStatus).length ? probeDirectStatus : Object.keys(probeNestedStatus).length ? probeNestedStatus : {};
|
|
46701
|
+
return normalizeInlineMeshGitStatus(status, node, { lastCheckedAt: Date.now() });
|
|
46702
|
+
}
|
|
46703
|
+
function buildCachedInlineMeshGitStatus(node) {
|
|
46704
|
+
const liveGit = buildInlineMeshTransitGitStatus(node);
|
|
46705
|
+
if (liveGit) return liveGit;
|
|
46706
|
+
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
46707
|
+
const cachedGit = readObjectRecord(cachedStatus.git);
|
|
46708
|
+
if (!Object.keys(cachedGit).length) return void 0;
|
|
46709
|
+
return normalizeInlineMeshGitStatus(cachedGit, node);
|
|
46710
|
+
}
|
|
46732
46711
|
function shouldDiscardCachedInlineMeshStatus(node) {
|
|
46733
46712
|
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
46734
46713
|
if (!Object.keys(cachedStatus).length) return false;
|
|
@@ -46957,9 +46936,10 @@ function collectLiveMeshSessionRecords(args) {
|
|
|
46957
46936
|
}
|
|
46958
46937
|
function applyCachedInlineMeshNodeStatus(status, node) {
|
|
46959
46938
|
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
46960
|
-
const
|
|
46961
|
-
const
|
|
46962
|
-
const
|
|
46939
|
+
const liveGit = buildInlineMeshTransitGitStatus(node);
|
|
46940
|
+
const git = liveGit ?? buildCachedInlineMeshGitStatus(node);
|
|
46941
|
+
const error48 = liveGit ? void 0 : readStringValue(cachedStatus.error, node?.error);
|
|
46942
|
+
const health = liveGit ? void 0 : readStringValue(cachedStatus.health, node?.health);
|
|
46963
46943
|
const machineStatus = readStringValue(cachedStatus.machineStatus, node?.machineStatus);
|
|
46964
46944
|
const lastSeenAt = toIsoTimestamp(cachedStatus.lastSeenAt ?? cachedStatus.last_seen_at ?? node?.lastSeenAt ?? node?.last_seen_at);
|
|
46965
46945
|
const updatedAt = toIsoTimestamp(cachedStatus.updatedAt ?? cachedStatus.updated_at ?? node?.updatedAt ?? node?.updated_at);
|
|
@@ -98465,7 +98445,7 @@ var init_adhdev_daemon = __esm({
|
|
|
98465
98445
|
init_version();
|
|
98466
98446
|
init_src();
|
|
98467
98447
|
init_runtime_defaults();
|
|
98468
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.
|
|
98448
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.27" });
|
|
98469
98449
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
98470
98450
|
localHttpServer = null;
|
|
98471
98451
|
localWss = null;
|