UNPKG

@wbg-mde/repository

Version:

Managing all common method for file system CRUD operations.

44 lines (43 loc) 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const project_configuration_1 = require("../configuration/project.configuration"); const path = require('path'); const os = require('os'); class AppConstants { static get userDataPaths() { return userDataPaths; } static get masterDataPaths() { return masterDataPaths; } static get schemaTypes() { return schemaTypes; } static get templateType() { return templateType; } static get projectHeader() { return projectHeader; } } exports.AppConstants = AppConstants; const userDataPaths = { base_directory: project_configuration_1.configuaration.userDataPath, cur_user: os.userInfo().username || 'guest', schema_path: 'custom-schema', template_path: 'custom-template' }; const masterDataPaths = { base_path: project_configuration_1.configuaration.masterDataPath, schema_path: 'default-schema', template_path: 'default-template', section_mapping: 'section-mapping', }; const schemaTypes = { ddi: 'DDI', geospatial: 'GeoSpatial', timeseries: 'TimeSeries', editor_mapping: 'editor_section_mapping' }; const templateType = { ddi: 'default_template_ddi', geospatial: 'default_template_geospatial', timeseries: 'default_template_timeseries', dublincore: 'default_template_dublincore' }; const projectHeader = { version: 'http://wb.mde.schema/projects/1.0', temp_name_format: 'new study ', base_folder: 'project', db_name: 'projectlist' };