parent
037837b551
commit
0e4a111f81
1714 changed files with 20803 additions and 11751 deletions
15
packages/backend/src/services/chart/entities.ts
Normal file
15
packages/backend/src/services/chart/entities.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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);
|
||||
}
|
||||
}));
|
||||
Loading…
Add table
Add a link
Reference in a new issue