git-escrows 1.0.0 → 1.0.1

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.
@@ -30819,7 +30819,7 @@ async function importKeyToServer(keyType, publicKey, address) {
30819
30819
  }
30820
30820
  }
30821
30821
 
30822
- // src/cli/commands/server.ts
30822
+ // src/cli/commands/oracle.ts
30823
30823
  import chalk9 from "chalk";
30824
30824
  import { parseAbiParameters as parseAbiParameters4 } from "viem";
30825
30825
 
@@ -31451,10 +31451,10 @@ async function verifyRepoSignature(repoDir, repo, label) {
31451
31451
  console.log(chalk8.green(`\u2705 ${label} repo signature verified`));
31452
31452
  }
31453
31453
 
31454
- // src/cli/commands/server.ts
31455
- async function serverCommand(options) {
31454
+ // src/cli/commands/oracle.ts
31455
+ async function oracleCommand(options) {
31456
31456
  try {
31457
- console.log(chalk9.blue("Starting Git Escrows Arbiter Server..."));
31457
+ console.log(chalk9.blue("Starting Git Escrows Arbiter Oracle..."));
31458
31458
  const mode = options.mode || "allUnarbitrated";
31459
31459
  if (![
31460
31460
  "past",
@@ -31478,7 +31478,7 @@ async function serverCommand(options) {
31478
31478
  all: "Arbitrate All Past + Listen for New",
31479
31479
  future: "Listen for New Only"
31480
31480
  };
31481
- console.log(chalk9.gray("Server configuration:"));
31481
+ console.log(chalk9.gray("Oracle configuration:"));
31482
31482
  console.log(chalk9.gray(` Mode: ${modeLabels[mode]}`));
31483
31483
  console.log(chalk9.gray(` Transport: ${transport.toUpperCase()}`));
31484
31484
  console.log(chalk9.gray(` Polling Interval: ${pollingInterval}ms`));
@@ -31496,7 +31496,7 @@ async function serverCommand(options) {
31496
31496
  } = await createClientFromEnv(".env", transport);
31497
31497
  if (!hasCommitObligation) {
31498
31498
  throw new Error(
31499
- "COMMIT_OBLIGATION_ADDRESS is required in .env file for the server command"
31499
+ "COMMIT_OBLIGATION_ADDRESS is required in .env file for the oracle command"
31500
31500
  );
31501
31501
  }
31502
31502
  console.log(chalk9.green("Blockchain environment ready"));
@@ -31623,16 +31623,16 @@ async function serverCommand(options) {
31623
31623
  mode === "future" ? "Listening for new obligations..." : "Arbitrating past obligations and listening for new..."
31624
31624
  )
31625
31625
  );
31626
- console.log(chalk9.gray("Press Ctrl+C to stop the server\n"));
31626
+ console.log(chalk9.gray("Press Ctrl+C to stop the oracle\n"));
31627
31627
  } else {
31628
31628
  console.log(chalk9.yellow("Arbitrating past obligations..."));
31629
31629
  }
31630
31630
  let unwatchFn = null;
31631
31631
  if (isListeningMode) {
31632
31632
  process.on("SIGINT", async () => {
31633
- console.log(chalk9.yellow("\nShutting down server..."));
31633
+ console.log(chalk9.yellow("\nShutting down oracle..."));
31634
31634
  if (unwatchFn) unwatchFn();
31635
- console.log(chalk9.green("\u2713 Server shutdown complete"));
31635
+ console.log(chalk9.green("\u2713 Oracle shutdown complete"));
31636
31636
  process.exit(0);
31637
31637
  });
31638
31638
  process.on("uncaughtException", (error) => {
@@ -31640,7 +31640,7 @@ async function serverCommand(options) {
31640
31640
  if (error.message?.includes("WebSocket") || error.message?.includes("connection")) {
31641
31641
  console.log(
31642
31642
  chalk9.yellow(
31643
- "\u26A0\uFE0F Connection error. Server will attempt to reconnect..."
31643
+ "\u26A0\uFE0F Connection error. Oracle will attempt to reconnect..."
31644
31644
  )
31645
31645
  );
31646
31646
  } else {
@@ -31698,11 +31698,11 @@ async function serverCommand(options) {
31698
31698
  chalk9.gray("No past requests found. Waiting for new requests...")
31699
31699
  );
31700
31700
  }
31701
- console.log(chalk9.green("\u2713 Server is now listening..."));
31701
+ console.log(chalk9.green("\u2713 Oracle is now listening..."));
31702
31702
  await new Promise(() => {
31703
31703
  });
31704
31704
  } catch (error) {
31705
- console.error(chalk9.red("Failed to start server:"));
31705
+ console.error(chalk9.red("Failed to start oracle:"));
31706
31706
  console.error(
31707
31707
  chalk9.red(error instanceof Error ? error.message : String(error))
31708
31708
  );
@@ -31979,7 +31979,7 @@ program.command("collect").description("Collect the reward from a fulfilled escr
31979
31979
  "--fulfillment-uid <uid>",
31980
31980
  "Fulfillment UID that was approved"
31981
31981
  ).action(collectCommand);
31982
- program.command("server").description("Run the arbiter server to listen and arbitrate escrows").option(
31982
+ program.command("oracle").description("Run the arbiter oracle to listen and arbitrate escrows").option(
31983
31983
  "--mode <mode>",
31984
31984
  "Arbitration mode: past, pastUnarbitrated, allUnarbitrated (default), all, future",
31985
31985
  "allUnarbitrated"
@@ -31991,7 +31991,7 @@ program.command("server").description("Run the arbiter server to listen and arbi
31991
31991
  "--polling-interval <ms>",
31992
31992
  "Polling interval for new escrows (ms)",
31993
31993
  "1000"
31994
- ).option("--timeout <ms>", "Test execution timeout (ms)", "300000").option("--cleanup", "Cleanup temporary directories after execution", true).option("--verify-key", "Verify Git key registration (default: true)", true).option("--no-verify-key", "Skip Git key verification (not recommended)").action(serverCommand);
31994
+ ).option("--timeout <ms>", "Test execution timeout (ms)", "300000").option("--cleanup", "Cleanup temporary directories after execution", true).option("--verify-key", "Verify Git key registration (default: true)", true).option("--no-verify-key", "Skip Git key verification (not recommended)").action(oracleCommand);
31995
31995
  program.on("command:*", () => {
31996
31996
  console.error(chalk11.red(`Invalid command: ${program.args.join(" ")}`));
31997
31997
  console.log("See --help for a list of available commands.");