trim: remove dead code and move large spec docs to attic
- Remove unused exports: renderProgress, formatTripleBoundaryCounterexample, clearCapturedRoutes - Remove dead BUILTIN_PLUGIN_CONTRACTS constant (auto-registration removed earlier) - Fix app-loader error messages to mention multiple export patterns - Move to attic: protocol-extensions-spec, OUTBOUND_CONTRACT_MOCKING_SPEC, PLUGIN_CONTRACTS_SPEC, fastify-structure - Build: clean | Tests: 849 pass, 0 fail
This commit is contained in:
@@ -143,46 +143,6 @@ export class PluginContractRegistry {
|
||||
}
|
||||
}
|
||||
// ============================================================================
|
||||
// Built-in Plugin Contracts
|
||||
// ============================================================================
|
||||
export const BUILTIN_PLUGIN_CONTRACTS: Record<string, PluginContractSpec> = {
|
||||
'@fastify/auth': {
|
||||
appliesTo: '**',
|
||||
hooks: {
|
||||
onRequest: {
|
||||
requires: ['request_headers(this).authorization != null'],
|
||||
},
|
||||
},
|
||||
},
|
||||
'@fastify/compress': {
|
||||
appliesTo: '**',
|
||||
hooks: {
|
||||
onSend: {
|
||||
ensures: ['response_headers(this).content-encoding != null'],
|
||||
},
|
||||
},
|
||||
},
|
||||
'@fastify/cors': {
|
||||
appliesTo: '**',
|
||||
hooks: {
|
||||
onRequest: {
|
||||
ensures: ['response_headers(this).access-control-allow-origin != null'],
|
||||
},
|
||||
},
|
||||
},
|
||||
'@fastify/rate-limit': {
|
||||
appliesTo: '**',
|
||||
hooks: {
|
||||
onRequest: {
|
||||
ensures: [
|
||||
'response_headers(this).x-ratelimit-limit != null',
|
||||
'response_headers(this).x-ratelimit-remaining != null',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
// ============================================================================
|
||||
// Factory
|
||||
// ============================================================================
|
||||
export function createPluginContractRegistry(): PluginContractRegistry {
|
||||
|
||||
Reference in New Issue
Block a user