SPB Git

Repository Public

list.ts 3.4 KB 74 lines typescript

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : ORIX App Universe8 * File             : src/lib/downloads/list.ts9 * Module           : lib10 * Repository       : https://git.spboucher.ai/orix-spboucher-ai11 * Project Website  : https://www.orixlab.dev12 * Created          : 2026-11-2113 * Last Modified    : 2026-11-2114 *15 * Author           : Simon-Pierre Boucher16 * Position         : Professor of Finance17 * Institution      : Université du Québec en Outaouais (UQO)18 * Organization     : SP Boucher19 * Website          : https://spboucher.ai20 * Git              : https://git.spboucher.ai21 *22 * Preferred Contact: support@spboucher.ai23 * Development      : dev@spboucher.ai24 * Support          : support@spboucher.ai25 * Security/Admin   : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License          : None specified (no license file in this repository)34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import { listApps } from "../catalog";44import { href, tr, type Locale } from "../i18n";45import { imageSize } from "../images";46import { latestArtifact, signatureOf, versionLabel } from "../releases/store";47import { downloadUrl, iconUrl, shotUrl } from "../view";4849/** One row per macOS application that has a published, verified image: everything shown comes from the release record. */50export type MacDownload = {51  slug: string; name: string; tagline: string; summary: string; icon: string | null; accent: string | null; page: string;52  version: string; size: number | null; date: string | null; sha256: string | null; notarized: boolean; fileName: string; href: string;53  minOS: string | null; architectures: string[];54  shot: { src: string; width: number; height: number; alt: string } | null;55};5657export async function macDownloads(locale: Locale): Promise<MacDownload[]> {58  const out: MacDownload[] = [];59  for (const { slug, app } of listApps()) {60    if (app.status === "unavailable" || !app.platforms.includes("macos")) continue;61    const r = latestArtifact(slug);62    if (!r) continue;63    const hero = app.screenshots.find((s) => s.hero) ?? app.screenshots[0];64    const size = hero ? await imageSize(slug, hero.file) : null;65    out.push({66      slug, name: app.name, tagline: tr(app.tagline, locale), summary: tr(app.summary, locale), icon: iconUrl(app), accent: app.accent, page: href(locale, `/apps/${slug}`),67      version: versionLabel(r), size: r.asset_size, date: r.tag_date ?? r.published_at, sha256: r.sha256_computed, notarized: signatureOf(r)?.notarized === true,68      fileName: r.asset_name, href: downloadUrl(r), minOS: app.minOS.macos ?? null, architectures: app.architectures,69      shot: hero && size ? { src: shotUrl(slug, hero.file), ...size, alt: tr(hero.caption, locale) } : null,70    });71  }72  return out;73}74
Files main
Menu

Theme