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. Commercial Alternative to JupyterHub.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/lib/landing/software-data.ts
Views: 923
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
import SOFTWARE_2404 from "software-inventory/24.04.json";
20
21
22
export const SOFTWARE_URLS: { [key in SoftwareEnvNames]: string } = fromPairs(
23
SOFTWARE_ENV_NAMES.map((name) => [
24
name,
25
`https://storage.googleapis.com/cocalc-compute-environment/software-inventory-${name}.json`,
26
]),
27
);
28
29
// 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.
30
export const SOFTWARE_FALLBACK: { [key in SoftwareEnvNames]: EnvData } = {
31
"18.04": SOFTWARE_1804 as EnvData,
32
"20.04": SOFTWARE_2004 as EnvData,
33
"22.04": SOFTWARE_2204 as EnvData,
34
"24.04": SOFTWARE_2404 as EnvData,
35
36
} as const;
37
38