CI / check (push) Has been cancelled
A self-hosted print studio: images at exact physical sizes, sheet layout with crop marks, tiling, 1:1 PDF. Everything else — image generation, delivery, share links, mail, Telegram — is an optional module that is off by default. This is the neutral public twin of a private tool. Compared to that original: - optional modules behind KLARBILD_MODULES; the default install is print-only - English interface with German as a full second language (1,038 strings); the English sentence is the translation key - no built-in accounts — first boot creates one admin from ADMIN_USERNAME / ADMIN_PASSWORD, or generates a password and logs it once - delivery and backup targets are generic SFTP/FTPS endpoints, off by default - English routes, English identifiers, English comments throughout - two compose files: print-only by default, everything in the full one - AGPL-3.0, CI (build, tests, type check, secret scan), CONTRIBUTING, SECURITY 124 tests green, type check clean, verified end to end against a live instance. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nh4A79bbqT9dcd2inzYUdg
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
/**
|
|
* Minimal typings for `archiver`.
|
|
*
|
|
* The published `@types/archiver` describes an API this version does not have:
|
|
* it exports classes (`ZipArchive`, …) but no callable default, while the
|
|
* runtime is exactly the other way round — `archiver('zip', opts)` works and
|
|
* the classes do not exist. Rather than pin a mismatched types package, this
|
|
* declares the two things Klarbild actually uses.
|
|
*/
|
|
declare module 'archiver' {
|
|
import { Transform } from 'node:stream';
|
|
|
|
interface ArchiverOptions {
|
|
zlib?: { level?: number };
|
|
store?: boolean;
|
|
}
|
|
|
|
interface EntryData {
|
|
name: string;
|
|
date?: Date | string;
|
|
}
|
|
|
|
interface Archiver extends Transform {
|
|
append(source: Buffer | NodeJS.ReadableStream | string, data: EntryData): this;
|
|
finalize(): Promise<void>;
|
|
abort(): this;
|
|
pointer(): number;
|
|
on(event: 'error' | 'warning', listener: (err: Error & { code?: string }) => void): this;
|
|
on(event: 'entry', listener: (entry: EntryData) => void): this;
|
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
}
|
|
|
|
function archiver(format: 'zip' | 'tar', options?: ArchiverOptions): Archiver;
|
|
export default archiver;
|
|
}
|