import { constants as CONSTANTS } from '../common';
import { fsPath } from '@tdb/util.server';

export { fsPath };
export { log, fs, glob, express } from '@tdb/util.server';

const ROOT_PATH = fsPath.join(__dirname, '../..');
const STATIC = 'static/@tdb/editor.code';

export const constants = {
  ...CONSTANTS,
  ROOT_PATH,

  EDITOR_RESOURCES: {
    SOURCE: fsPath.resolve('./node_modules/@timkendrick/monaco-editor/dist'),
    LOCAL: fsPath.join(ROOT_PATH, STATIC),
    HOST: fsPath.resolve(`./${STATIC}`),
  },

  ECMASCRIPT_DEFS: {
    SOURCE: fsPath.resolve('./node_modules/typescript/lib'),
    LOCAL: fsPath.resolve(`./${STATIC}.d`),
  },

  VS: {
    SOURCE: fsPath.resolve('./node_modules/monaco-editor/min/vs'),
  },
};
