app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

security-headers.d.mts (1105B)


      1 import type { RelayPolicy } from '../src/lib/config/relays.ts';
      2 
      3 export interface SecurityHeadersPreparation {
      4   schema: 'harvestcircle.static_security_headers.v1';
      5   readiness: 'SOURCE_PREPARATION_ONLY_HOST_QUALIFICATION_PENDING';
      6   relay_policy_sha256: string;
      7   build_info_sha256: string;
      8   compiler_manifest_sha256: string;
      9   framework_style_attributes: {
     10     owner: string;
     11     file: string;
     12     source_sha256: string;
     13     style_sha256: string;
     14     csp_hash: string;
     15   }[];
     16   connect_sources: string[];
     17   inline_scripts: Record<string, string[]>;
     18   artifacts: Record<string, { sha256: string; bytes: number }>;
     19   headers: Record<string, string>;
     20 }
     21 export function relayConnectSources(policy: RelayPolicy): string[];
     22 export function extractFrameworkStyleAttributes(
     23   file: string,
     24   source: Uint8Array,
     25   expectedSourceSha256: string
     26 ): SecurityHeadersPreparation['framework_style_attributes'];
     27 export function prepareSecurityHeaders(
     28   webDirectory: string
     29 ): Promise<SecurityHeadersPreparation>;
     30 export function verifySecurityHeaders(
     31   webDirectory: string,
     32   candidate: unknown
     33 ): Promise<void>;