import { JSONSchemaType } from 'ajv'; export interface Config { /** * Your project name. */ name: string; /** * Debug mode: show app backend logs. * Default: false. */ debug: boolean; /** * Port where app served. * Default: 7600. */ port: number; /** * Open ngxe in browser on the start. * Default: true. */ open: boolean; /** * Insert final new line into generated files. * Default: true. */ eofLine: boolean; /** * Path to json file generated by extract-i18n command. */ input: string; /** * Files generated by the tool. */ output: { /** * Path to json file with source messages sorted by keys. */ source: string; translations: { /** * Locale name. */ locale: string; /** * Path to json file with target messages sorted by keys. */ path: string; }[]; }; } export const configSchema: JSONSchemaType = { type: 'object', properties: { name: {type: 'string'}, debug: {type: 'boolean', default: false}, port: {type: 'number', default: 7600}, open: {type: 'boolean', default: true}, eofLine: {type: 'boolean', default: true}, input: {type: 'string'}, output: { type: 'object', properties: { source: {type: 'string'}, translations: { type: 'array', items: { type: 'object', properties: { locale: {type: 'string'}, path: {type: 'string'}, }, required: ['locale', 'path'], }, }, }, required: ['source', 'translations'], }, }, required: ['name', 'input', 'output'], additionalProperties: false, };