Path: blob/master/src/packages/project/project-info/project-info.ts
1447 views
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45/*6Project information7*/89import { ProjectInfoServer } from "./server";10import { createService } from "@cocalc/conat/project/project-info";11import { project_id, compute_server_id } from "@cocalc/project/data";1213// singleton, we instantiate it when we need it14let info: ProjectInfoServer | null = null;15let service: any = null;1617export function get_ProjectInfoServer(): ProjectInfoServer {18if (info != null) {19return info;20}21info = new ProjectInfoServer();22service = createService({ infoServer: info, project_id, compute_server_id });2324return info;25}2627export function close() {28service?.close();29info?.close();30info = service = null;31}323334