Home / Function/ generateIdempotencyKey() — dead-code-hunter Function Reference

generateIdempotencyKey() — dead-code-hunter Function Reference

Architecture documentation for the generateIdempotencyKey() function in index.ts from the dead-code-hunter codebase.

Entity Profile

Dependency Diagram

graph TD
  d58f9df4_f889_6148_ffb9_17e807228538["generateIdempotencyKey()"]
  2707a308_9fa9_efa8_2fbd_febf984897e5["run()"]
  2707a308_9fa9_efa8_2fbd_febf984897e5 -->|calls| d58f9df4_f889_6148_ffb9_17e807228538
  style d58f9df4_f889_6148_ffb9_17e807228538 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/index.ts lines 99–115

async function generateIdempotencyKey(workspacePath: string): Promise<string> {
  let output = '';
  await exec.exec('git', ['rev-parse', '--short', 'HEAD'], {
    cwd: workspacePath,
    listeners: {
      stdout: (data: Buffer) => {
        output += data.toString();
      },
    },
    silent: true,
  });

  const commitHash = output.trim();
  const repoName = path.basename(workspacePath);

  return `${repoName}:analysis:deadcode:${commitHash}:${randomUUID()}`;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does generateIdempotencyKey() do?
generateIdempotencyKey() is a function in the dead-code-hunter codebase.
What calls generateIdempotencyKey()?
generateIdempotencyKey() is called by 1 function(s): run.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free