@voltro/data-transfer 0.33.0 → 0.34.0

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/index.d.ts CHANGED
@@ -20,15 +20,25 @@ import { YieldableError } from 'effect/Cause';
20
20
  export declare const applyAction: (action: MaskAction, input: MaskInput) => unknown;
21
21
 
22
22
  /**
23
- * Refuse a direct/native import when a live instance is detected, unless the
24
- * operator passed `--allow-live`. `liveInstance` is a human label (url/name) of
25
- * the detected instance, or `null` when none was found (or detection was
26
- * inconclusive the CLI treats "can't tell" as "not detected" so the common
27
- * import-into-a-stopped-target case isn't blocked).
23
+ * Refuse a direct/native import when a live instance is writing to the SAME
24
+ * database, unless the operator passed `--allow-live`.
25
+ *
26
+ * @param liveInstance human label (url/name) of a detected instance, or `null`
27
+ * when none answered — detection is best-effort, and "can't tell" is treated
28
+ * as "not detected" so importing into a stopped target is not blocked.
29
+ * @param sameTarget whether that instance is connected to the database being
30
+ * written. `'unknown'` when either side could not be identified (an older
31
+ * instance, an unparseable connection) — and it must behave like `'same'`,
32
+ * because the alternative is a guard that steps aside whenever it is unsure.
33
+ * @param targetLabel what the CLI resolved as the target, for the message. A
34
+ * refusal that names only one of the two things it is comparing is why
35
+ * `--allow-live` became a reflex.
28
36
  */
29
37
  export declare const assessLiveImport: (opts: {
30
38
  readonly liveInstance: string | null;
31
39
  readonly allowLive: boolean;
40
+ readonly sameTarget?: "same" | "different" | "unknown";
41
+ readonly targetLabel?: string;
32
42
  }) => LiveGuardResult;
33
43
 
34
44
  export declare const ASSET_INDEX_FILE = "assets/index.ndjson";