API Surface Issue
Category
Unused export (internal implementation details exposed as public API)
Summary
- Files:
src/squid/access-rules.ts, src/squid/acl-generator.ts, src/squid/config-sections.ts
- Symbols:
generateProtocolRules, generateDenyRule, generateAccessRulesSection, generateDomainAcls, generateBlockedDomainAcls, generateConfigSections
- Issue: All six exported functions are only ever consumed by
src/squid/config-generator.ts (within the same squid/ directory). They are internal helpers with no usage outside the squid/ module and no barrel/index re-export.
Evidence
Imports in src/squid/config-generator.ts (the only consumer):
src/squid/config-generator.ts:import { generateDomainAcls, generateBlockedDomainAcls } from './acl-generator';
src/squid/config-generator.ts:import { generateAccessRulesSection, generateDenyRule, generateProtocolRules } from './access-rules';
src/squid/config-generator.ts:import { generateConfigSections } from './config-sections';
No references outside src/squid/:
$ grep -rw "from.*access-rules\|from.*acl-generator\|from.*config-sections" src --include="*.ts" | grep -v "^src/squid/"
(no output)
No test files reference these symbols directly:
$ grep -rw "generateDenyRule\|generateAccessRulesSection\|generateProtocolRules\|generateDomainAcls\|generateBlockedDomainAcls\|generateConfigSections" src --include="*.test.ts"
(no output)
Context
Issue #3867 addressed a similar problem for generateDlpSections, generateSslSections, generatePortAclsAndRules, generateApiProxySection, and generateDnsSection in config-sections.ts. That issue was closed as completed, but the remaining export generateConfigSections and the exports in access-rules.ts and acl-generator.ts were not addressed.
Recommended Fix
Remove the export keyword from the six functions:
// src/squid/access-rules.ts
-export function generateProtocolRules(...)
+function generateProtocolRules(...)
-export function generateDenyRule(...)
+function generateDenyRule(...)
-export function generateAccessRulesSection(...)
+function generateAccessRulesSection(...)
// src/squid/acl-generator.ts
-export function generateDomainAcls(...)
+function generateDomainAcls(...)
-export function generateBlockedDomainAcls(...)
+function generateBlockedDomainAcls(...)
// src/squid/config-sections.ts
-export function generateConfigSections(...)
+function generateConfigSections(...)
Impact
- Dead code risk: Low (functions are used internally, but the
export widens the API surface unnecessarily)
- Maintenance burden: Medium — any refactor of these internal helpers must now treat them as public API, creating friction
Detected by Export Audit workflow. Triggered by push to main on 2026-05-27
Generated by API Surface & Export Audit · sonnet46 1.2M · ◷
API Surface Issue
Category
Unused export (internal implementation details exposed as public API)
Summary
src/squid/access-rules.ts,src/squid/acl-generator.ts,src/squid/config-sections.tsgenerateProtocolRules,generateDenyRule,generateAccessRulesSection,generateDomainAcls,generateBlockedDomainAcls,generateConfigSectionssrc/squid/config-generator.ts(within the samesquid/directory). They are internal helpers with no usage outside thesquid/module and no barrel/index re-export.Evidence
Imports in
src/squid/config-generator.ts(the only consumer):No references outside
src/squid/:No test files reference these symbols directly:
Context
Issue #3867 addressed a similar problem for
generateDlpSections,generateSslSections,generatePortAclsAndRules,generateApiProxySection, andgenerateDnsSectioninconfig-sections.ts. That issue was closed as completed, but the remaining exportgenerateConfigSectionsand the exports inaccess-rules.tsandacl-generator.tswere not addressed.Recommended Fix
Remove the
exportkeyword from the six functions:Impact
exportwidens the API surface unnecessarily)Detected by Export Audit workflow. Triggered by push to main on 2026-05-27