Path: blob/master/src/packages/next/lib/landing/software-data.ts
1450 views
/*1* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45// NOTE: this pulls in a lot of data. Make sure to never load it indirectly from a page.67import { fromPairs } from "lodash";89import {10SoftwareEnvNames,11SOFTWARE_ENV_NAMES,12} from "@cocalc/util/consts/software-envs";13import { EnvData } from "./types";1415import SOFTWARE_2004 from "software-inventory/20.04.json";16import SOFTWARE_2204 from "software-inventory/22.04.json";17import SOFTWARE_2404 from "software-inventory/24.04.json";181920export const SOFTWARE_URLS: { [key in SoftwareEnvNames]: string } = fromPairs(21SOFTWARE_ENV_NAMES.map((name) => [22name,23`https://storage.googleapis.com/cocalc-compute-environment/software-inventory-${name}.json`,24]),25);2627// Note: we need to be explicit with these rougher types, because TS can't infer them from the JSON files since they're too large.28export const SOFTWARE_FALLBACK: { [key in SoftwareEnvNames]: EnvData } = {29"20.04": SOFTWARE_2004 as EnvData,30"22.04": SOFTWARE_2204 as EnvData,31"24.04": SOFTWARE_2404 as EnvData,3233} as const;343536