Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/comm/project-configuration.ts
Views: 687
/*1Shared types and constants between frontend app and project for computing project2configuration information.3*/45import type { ConfigurationAspect } from "@cocalc/comm/websocket/types";67export type { ConfigurationAspect };8export const LIBRARY_INDEX_FILE = "/ext/library/cocalc-examples/index.json";910export interface MainConfiguration {11capabilities: MainCapabilities;12timestamp: string;13// disabled extensions, for opening/creating files14disabled_ext: string[];15}1617export type Capabilities = { [key: string]: boolean };1819export interface X11Configuration {20timestamp: string;21capabilities: Capabilities;22}2324export type Configuration = MainConfiguration | X11Configuration;2526export interface MainCapabilities {27jupyter: boolean | Capabilities;28formatting: Capabilities; // yapf & co.29hashsums: Capabilities;30rserver: boolean;31latex: boolean;32sage: boolean;33sage_version?: number[];34x11: boolean;35rmd: boolean;36qmd: boolean;37jq: boolean;38spellcheck: boolean;39library: boolean;40sshd: boolean;41html2pdf: boolean; // via chrome/chromium42pandoc: boolean; // e.g. for docx2md conversion43vscode: boolean; // "code-server"44julia: boolean; // julia programming language + Pluto package is installed (we assume it)45homeDirectory: string | null; // the home directory of the project46}4748export interface Available {49jupyter_lab: boolean;50jupyter_notebook: boolean;51jupyter: boolean;52rserver: boolean;53x11: boolean;54latex: boolean;55sage: boolean;56rmd: boolean; // TODO besides R, what's necessary? pandoc!57qmd: boolean; // also depends on pandoc58jq: boolean;59spellcheck: boolean;60library: boolean;61html2pdf: boolean;62pandoc: boolean;63vscode: boolean;64julia: boolean;65formatting: Capabilities | boolean;66homeDirectory: string | null;67}6869export const NO_AVAIL: Readonly<Available> = {70jupyter_lab: false,71jupyter_notebook: false,72jupyter: false,73rserver: false,74sage: false,75latex: false,76rmd: false,77qmd: false,78jq: false,79x11: false,80spellcheck: false,81library: false,82formatting: false,83html2pdf: false,84pandoc: false,85vscode: false,86julia: false,87homeDirectory: null,88} as const;8990export const ALL_AVAIL: Readonly<Available> = {91jupyter_lab: true,92jupyter_notebook: true,93jupyter: true,94rserver: true,95sage: true,96latex: true,97rmd: true,98qmd: true,99jq: true,100x11: true,101spellcheck: true,102library: true,103formatting: true,104html2pdf: true,105pandoc: true,106vscode: true,107julia: true,108homeDirectory: "/home/user", // sane default109} as const;110111112