@builder.io/dev-tools 1.72.4-dev.202607032001.716fda764 → 1.72.4-dev.202607061933.10fc31545

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.
@@ -116,8 +116,21 @@ export declare function parseAheadBehind(line: string): {
116
116
  ahead: number;
117
117
  behind: number;
118
118
  };
119
- /** Outcome of #computeAheadOfBase, carrying the "why" alongside the count. */
120
- export interface AheadOfBaseResult {
119
+ export interface TtlCacheEntry<T> {
120
+ promise: Promise<T>;
121
+ timestamp: number;
122
+ }
123
+ /**
124
+ * Memoize an in-flight promise in `cache` under `key` for `ttlMs`. A fresh entry
125
+ * is returned as-is; concurrent callers share the same promise (dedup). If the
126
+ * factory rejects, the entry self-evicts so the next call can retry — but only
127
+ * when it's still the current entry, so a concurrent refresh that already
128
+ * replaced it isn't clobbered. Centralizes the subtle "evict only if still
129
+ * current" concurrency detail shared by the git caches.
130
+ */
131
+ export declare function cachedWithTtl<T>(cache: Map<string, TtlCacheEntry<T>>, key: string, ttlMs: number, factory: () => Promise<T>): Promise<T>;
132
+ /** Outcome of #computeBaseComparison, carrying the "why" alongside the count. */
133
+ export interface BaseComparisonResult {
121
134
  /** Commits on HEAD not yet in the base branch; undefined when undetermined. */
122
135
  aheadOfBase?: number;
123
136
  /** Base/parent branch the count was measured against (e.g. "origin/main"). */
@@ -138,10 +151,10 @@ export interface AheadOfBaseResult {
138
151
  export interface GitStatusDiagnosticsInput {
139
152
  ahead: number;
140
153
  behind: number;
141
- aheadOfBaseResult?: AheadOfBaseResult;
154
+ baseComparisonResult?: BaseComparisonResult;
142
155
  /**
143
156
  * Content-diff-from-base result (squash-safe). Gates the merge summary;
144
- * falls back to `aheadOfBaseResult.hasChangesAgainstBase` when omitted.
157
+ * falls back to `baseComparisonResult.hasChangesAgainstBase` when omitted.
145
158
  */
146
159
  hasChangesAgainstBase?: boolean;
147
160
  remoteBranchExists: boolean;