@firestartr/cli 3.1.0 → 3.1.1-snapshot-pagination-fix

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.
@@ -0,0 +1,3 @@
1
+ export declare const FIRESTARTR_IGNORE_FILE = ".firestartrignore";
2
+ /** Only the file's own directory matters; markers are not inherited. */
3
+ export declare function isIgnoredFile(file: string): boolean;
@@ -1,2 +1,3 @@
1
1
  export declare function validateTfStateKeyUniqueness(crs: any): void;
2
+ export declare function validateClaimRefOwnership(previousCrs: any, renderedCrs: any): void;
2
3
  export declare function isCatalogEntity(cr: any): boolean;
@@ -1,5 +1,11 @@
1
1
  import { WorkItem } from './informer';
2
2
  import { DeferredSchedulingBookkeeper } from './processItem.blocks';
3
+ import type { DiagnosticQueueSnapshot } from './processItem.diagnostic';
4
+ /**
5
+ * Number of concurrent processing slots, used by startup wiring that needs the
6
+ * same capacity the processor loop uses.
7
+ */
8
+ export declare function getMaxSlots(): number;
3
9
  export declare function getQueueMetrics(): {
4
10
  nItems: number;
5
11
  nItemsFinished: number;
@@ -19,6 +25,14 @@ export declare function getQueueMetrics(): {
19
25
  unknown: number;
20
26
  };
21
27
  };
28
+ /**
29
+ * Queue state for the diagnostic file. Counts come from the existing metrics
30
+ * seam (`getQueueMetrics`) so scheduling state is never counted twice, and only
31
+ * the fields the diagnostic file documents differently are derived here: `blocked`
32
+ * keeps the historical `isBlocked` meaning instead of the parent-aware gauge,
33
+ * and `slots` needs the per-slot assignment the gauge does not expose.
34
+ */
35
+ export declare function getOperatorQueueSnapshot(): DiagnosticQueueSnapshot;
22
36
  /**
23
37
  * Pushes a WorkItem to the queue
24
38
  * @param {WorkItem} workItem - WorkItem to process
@@ -1,5 +1,34 @@
1
1
  /// <reference types="node" />
2
- import { WorkItem } from './definitions';
3
- export declare function loopDiagnosticFile(queue: WorkItem[], maxSlots: number): void;
2
+ /// <reference types="node" />
3
+ /**
4
+ * Queue state the diagnostic file needs. Producers own the queue and expose it
5
+ * through this seam, so this module never reaches into queue internals.
6
+ */
7
+ export interface DiagnosticQueueSnapshot {
8
+ total: number;
9
+ pending: number;
10
+ processing: number;
11
+ finished: number;
12
+ blocked: number;
13
+ deadLetter: number;
14
+ /** `slot-<id>` -> `"<kind>/<name>"` for the work item that slot is running. */
15
+ slots: Record<string, string>;
16
+ }
17
+ /**
18
+ * Reads `OPERATOR_DIAGNOSTIC_INTERVAL_SECONDS`, falling back to the default for
19
+ * absent or unusable values so a typo cannot disable diagnostics.
20
+ */
21
+ export declare function getDiagnosticIntervalSeconds(env?: NodeJS.ProcessEnv): number;
22
+ /**
23
+ * Starts the periodic diagnostic writer and writes the first snapshot right
24
+ * away, so the file exists before any work item arrives.
25
+ *
26
+ * Idempotent: a second call while a writer is running is a no-op, so the
27
+ * startup path and the in-loop call never race on the same file.
28
+ *
29
+ * @returns whether this call started the writer.
30
+ */
31
+ export declare function startDiagnosticFile(source: () => DiagnosticQueueSnapshot, maxSlots: number, env?: NodeJS.ProcessEnv): boolean;
32
+ export declare function stopDiagnosticFile(): void;
4
33
  /** @internal for testing */
5
34
  export declare function getDiagnosticTimer(): NodeJS.Timeout | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "3.1.0",
3
+ "version": "3.1.1-snapshot-pagination-fix",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",