Move schemas to constant folder (#15207)

- move schemas to constants
- increase npm package version
This commit is contained in:
martmull
2025-10-20 15:41:53 +02:00
committed by GitHub
parent 3aa448d951
commit 7723fa70a4
13 changed files with 27 additions and 23 deletions
@@ -7,6 +7,7 @@ import { CURRENT_EXECUTION_DIRECTORY } from '../constants/current-execution-dire
import { HTTPMethod } from '../types/config.types';
import { parseJsoncFile, writeJsoncFile } from '../utils/jsonc-parser';
import { getSchemaUrls } from '../utils/schema-validator';
import { BASE_SCHEMAS_PATH } from '../constants/constants-path';
export enum SyncableEntity {
AGENT = 'agent',
@@ -156,9 +157,7 @@ export class AppAddCommand {
entityToCreateData.standardId = uuid;
}
const schemasDir = path.join(__dirname, '../../schemas');
const schemaPath = path.join(schemasDir, `${entity}.schema.json`);
const schemaPath = path.join(BASE_SCHEMAS_PATH, `${entity}.schema.json`);
const schema = await fs.readJson(schemaPath);