index.ts — dead-code-hunter Source File
Architecture documentation for index.ts, a typescript file in the dead-code-hunter codebase. 11 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1916269f_4df6_c8ce_0c1a_a8a66a4fb245["index.ts"] a3eb2ced_926a_5c50_f1b5_fa2919e7f56f["dead-code.ts"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> a3eb2ced_926a_5c50_f1b5_fa2919e7f56f 8fb39060_bdfd_d045_ece4_18fee517d989["filterByIgnorePatterns"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> 8fb39060_bdfd_d045_ece4_18fee517d989 9e5350ec_72a9_b03d_0141_b564a058f5a8["filterByChangedFiles"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> 9e5350ec_72a9_b03d_0141_b564a058f5a8 96354862_3d3e_920a_e420_3c1b0ee82eec["formatPrComment"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> 96354862_3d3e_920a_e420_3c1b0ee82eec 133fc30c_f735_a105_adeb_9ccd40ae637b["core"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> 133fc30c_f735_a105_adeb_9ccd40ae637b 7e0bf387_f11e_a428_14eb_b0cfe75f267d["exec"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> 7e0bf387_f11e_a428_14eb_b0cfe75f267d 5480c0a6_925d_ba6b_50e9_aacdf3a763c0["github"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> 5480c0a6_925d_ba6b_50e9_aacdf3a763c0 da7c4e79_9b8f_97ab_76e7_1e8697905bff["promises"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> da7c4e79_9b8f_97ab_76e7_1e8697905bff df4e45ee_2d39_ee0d_c278_4a72a71d8cd0["path"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> df4e45ee_2d39_ee0d_c278_4a72a71d8cd0 a8583774_9b07_e80b_74cd_e850c9452610["crypto"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> a8583774_9b07_e80b_74cd_e850c9452610 6ae50d5c_b484_7217_ed63_710361d1134f["sdk"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 --> 6ae50d5c_b484_7217_ed63_710361d1134f style 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as github from '@actions/github';
import * as fs from 'fs/promises';
import * as path from 'path';
import { randomUUID } from 'crypto';
import { Configuration, DefaultApi } from '@supermodeltools/sdk';
import type { DeadCodeAnalysisResponseAsync, DeadCodeAnalysisResponse } from '@supermodeltools/sdk';
import { filterByIgnorePatterns, filterByChangedFiles, formatPrComment } from './dead-code';
/** Fields that should be redacted from logs */
const SENSITIVE_KEYS = new Set([
'authorization',
'cookie',
'set-cookie',
'access_token',
'refresh_token',
'api_key',
'apikey',
'password',
'secret',
'token',
'x-api-key',
]);
const MAX_VALUE_LENGTH = 1000;
const MAX_POLL_ATTEMPTS = 90;
const DEFAULT_RETRY_INTERVAL_MS = 10_000;
const POLL_TIMEOUT_MS = 15 * 60 * 1000;
/**
* Safely serialize a value for logging, handling circular refs, BigInt, and large values.
* Redacts sensitive fields.
*/
function safeSerialize(value: unknown, maxLength = MAX_VALUE_LENGTH): string {
try {
const seen = new WeakSet();
const serialized = JSON.stringify(value, (key, val) => {
if (key && SENSITIVE_KEYS.has(key.toLowerCase())) {
return '[REDACTED]';
}
if (typeof val === 'bigint') {
return val.toString();
}
if (typeof val === 'object' && val !== null) {
if (seen.has(val)) {
return '[Circular]';
}
seen.add(val);
}
return val;
}, 2);
if (serialized && serialized.length > maxLength) {
return serialized.slice(0, maxLength) + '... [truncated]';
}
return serialized ?? '[undefined]';
} catch {
// ... (310 more lines)
Domain
Subdomains
Functions
Dependencies
- core
- crypto
- dead-code.ts
- exec
- filterByChangedFiles
- filterByIgnorePatterns
- formatPrComment
- github
- path
- promises
- sdk
Source
Frequently Asked Questions
What does index.ts do?
index.ts is a source file in the dead-code-hunter codebase, written in typescript. It belongs to the GitHubAction domain, InputMapping subdomain.
What functions are defined in index.ts?
index.ts defines 8 function(s): createZipArchive, generateIdempotencyKey, getChangedFiles, pollForResult, redactSensitive, run, safeSerialize, sleep.
What does index.ts depend on?
index.ts imports 11 module(s): core, crypto, dead-code.ts, exec, filterByChangedFiles, filterByIgnorePatterns, formatPrComment, github, and 3 more.
Where is index.ts in the architecture?
index.ts is located at src/index.ts (domain: GitHubAction, subdomain: InputMapping, directory: src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free