mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 09:23:08 +02:00
15 lines
426 B
TypeScript
15 lines
426 B
TypeScript
import { fileURLToPath } from 'url';
|
|
import { dirname } from 'path';
|
|
import Chart from './core';
|
|
|
|
//const _filename = fileURLToPath(import.meta.url);
|
|
const _filename = __filename;
|
|
const _dirname = dirname(_filename);
|
|
|
|
export const entities = Object.values(require('require-all')({
|
|
dirname: _dirname + '/charts/schemas',
|
|
filter: /^.+\.[jt]s$/,
|
|
resolve: (x: any) => {
|
|
return Chart.schemaToEntity(x.name, x.schema);
|
|
}
|
|
}));
|