feat: download page wip

This commit is contained in:
afn
2022-10-31 21:53:51 -04:00
parent e43a0eb819
commit abb2cbc223
7 changed files with 65 additions and 11 deletions

View File

@@ -120,13 +120,15 @@ export class API<T> implements Readable<T> {
}
// API Endpoints
import type { Patch, Repository } from '../types';
import type { Patch, Repository, Tool } from '../types';
import { dev_log } from "$lib/utils";
export type ContribData = { repositories: Repository[] };
export type PatchesData = { patches: Patch[]; packages: string[] };
export type ToolsData = { tools: Tool[] };
export const contributors = new API<ContribData>("contributors", undefined, { repositories: [] });
export const tools = new API<ToolsData>("tools", undefined, { tools: [] } )
export const patches = new API<PatchesData>("patches", patches => {
let packages: string[] = [];

View File

@@ -32,3 +32,13 @@ export interface PatchOption {
required: boolean;
choices: string[];
}
export interface Tool {
repository: string
version: string
timestamp: string
name: string
size?: string
browser_download_url: string
content_type: string
}