Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Gnome/testsuite/reftests/   (Gnome Linux Desktop Version 4.23.2©)  Datei vom 30.5.2026 mit Größe 304 B image not shown  

Quellcode-Bibliothek backup.ts   Sprache: unbekannt

 
import {
  createBackupArchive,
  formatBackupCreateSummary,
  type BackupCreateOptions,
  type BackupCreateResult,
} from "../infra/backup-create.js";
import { type RuntimeEnv, writeRuntimeJson } from "../runtime.js";
export type { BackupCreateOptions, BackupCreateResult } from "../infra/backup-create.js";

type BackupVerifyRuntime = typeof import("./backup-verify.js");

let backupVerifyRuntimePromise: Promise<BackupVerifyRuntime> | undefined;

function loadBackupVerifyRuntime(): Promise<BackupVerifyRuntime> {
  backupVerifyRuntimePromise ??= import("./backup-verify.js");
  return backupVerifyRuntimePromise;
}

export async function backupCreateCommand(
  runtime: RuntimeEnv,
  opts: BackupCreateOptions = {},
): Promise<BackupCreateResult> {
  const result = await createBackupArchive(opts);
  if (opts.verify && !opts.dryRun) {
    const { backupVerifyCommand } = await loadBackupVerifyRuntime();
    await backupVerifyCommand(
      {
        ...runtime,
        log: () => {},
      },
      { archive: result.archivePath, json: false },
    );
    result.verified = true;
  }
  if (opts.json) {
    writeRuntimeJson(runtime, result);
  } else {
    runtime.log(formatBackupCreateSummary(result).join("\n"));
  }
  return result;
}

Messung V0.5 in Prozent
C=100 H=100 G=100

[0.9QuellennavigatorsProjekt 2026-06-10]