CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/lib/landing/software-data.ts
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
// NOTE: this pulls in a lot of data. Make sure to never load it indirectly from a page.
7
8
import { fromPairs } from "lodash";
9
10
import {
11
SoftwareEnvNames,
12
SOFTWARE_ENV_NAMES,
13
} from "@cocalc/util/consts/software-envs";
14
import { EnvData } from "./types";
15
16
import SOFTWARE_1804 from "software-inventory/18.04.json";
17
import SOFTWARE_2004 from "software-inventory/20.04.json";
18
import SOFTWARE_2204 from "software-inventory/22.04.json";
19
20
export const SOFTWARE_URLS: { [key in SoftwareEnvNames]: string } = fromPairs(
21
SOFTWARE_ENV_NAMES.map((name) => [
22
name,
23
`https://storage.googleapis.com/cocalc-compute-environment/software-inventory-${name}.json`,
24
]),
25
);
26
27
// 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.
28
export const SOFTWARE_FALLBACK: { [key in SoftwareEnvNames]: EnvData } = {
29
"18.04": SOFTWARE_1804 as EnvData,
30
"20.04": SOFTWARE_2004 as EnvData,
31
"22.04": SOFTWARE_2204 as EnvData,
32
} as const;
33
34