rads-db 3.2.35 → 3.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.cjs +79 -12
- package/dist/config.d.ts +21 -7
- package/dist/config.mjs +78 -12
- package/dist/index.d.ts +2 -2
- package/dist/{types-1fc744a4.d.ts → types-f64a81e8.d.ts} +3 -2
- package/package.json +2 -1
package/dist/config.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('node:fs');
|
|
4
4
|
const path = require('node:path');
|
|
5
|
+
const fg = require('fast-glob');
|
|
5
6
|
const typescript = require('typescript');
|
|
6
7
|
const _ = require('lodash');
|
|
7
8
|
|
|
@@ -9,6 +10,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
10
|
|
|
10
11
|
const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
11
12
|
const path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
|
13
|
+
const fg__default = /*#__PURE__*/_interopDefaultCompat(fg);
|
|
12
14
|
const ___default = /*#__PURE__*/_interopDefaultCompat(_);
|
|
13
15
|
|
|
14
16
|
const supportedPrimitiveTypes = ["string", "number", "boolean", "Record<string, string>", "Record<string, any>"];
|
|
@@ -598,21 +600,86 @@ function verifyRelationFields(result) {
|
|
|
598
600
|
function defineRadsConfig(config) {
|
|
599
601
|
return config;
|
|
600
602
|
}
|
|
601
|
-
function
|
|
603
|
+
async function expandToDirectories(patterns) {
|
|
604
|
+
const dirs = [];
|
|
605
|
+
for (const p of patterns) {
|
|
606
|
+
if (fg__default.isDynamicPattern(p)) {
|
|
607
|
+
const matches = await fg__default(p, { onlyDirectories: true, absolute: true });
|
|
608
|
+
dirs.push(...matches);
|
|
609
|
+
} else {
|
|
610
|
+
dirs.push(path__default.resolve(p));
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return dirs;
|
|
614
|
+
}
|
|
615
|
+
function schemaFromFiles(paths, options) {
|
|
602
616
|
return async () => {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
const
|
|
617
|
+
const pathsArray = Array.isArray(paths) ? paths : [paths];
|
|
618
|
+
const resolvedDirs = [];
|
|
619
|
+
for (const p of pathsArray) {
|
|
620
|
+
if (fg__default.isDynamicPattern(p)) {
|
|
621
|
+
const matches = await fg__default(p, { onlyDirectories: true, absolute: true });
|
|
622
|
+
resolvedDirs.push(...matches);
|
|
623
|
+
} else {
|
|
624
|
+
const resolved = path__default.resolve(p);
|
|
625
|
+
if (!fs__default.existsSync(resolved))
|
|
626
|
+
await fs__default.promises.mkdir(resolved, { recursive: true });
|
|
627
|
+
resolvedDirs.push(resolved);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
606
630
|
const entities = {};
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
631
|
+
const entityFilePaths = {};
|
|
632
|
+
const entityDirs = {};
|
|
633
|
+
for (const dir of resolvedDirs) {
|
|
634
|
+
const entries = await fs__default.promises.readdir(dir, { withFileTypes: true });
|
|
635
|
+
for (const entry of entries) {
|
|
636
|
+
if (!entry.isFile() || !entry.name.endsWith(".ts"))
|
|
637
|
+
continue;
|
|
638
|
+
const filePath = path__default.join(dir, entry.name);
|
|
639
|
+
const content = await fs__default.promises.readFile(filePath, "utf-8");
|
|
640
|
+
if (!content.includes("@entity"))
|
|
641
|
+
continue;
|
|
642
|
+
const stem = entry.name.slice(0, -3);
|
|
643
|
+
if (entities[stem]) {
|
|
644
|
+
throw new Error(
|
|
645
|
+
`Entity name collision: "${stem}" is defined in multiple locations:
|
|
646
|
+
${entityFilePaths[stem]}
|
|
647
|
+
${filePath}`
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
entities[stem] = content;
|
|
651
|
+
entityFilePaths[stem] = filePath;
|
|
652
|
+
entityDirs[stem] = dir;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
if (options?.entityRules?.length) {
|
|
656
|
+
const resolvedRules = await Promise.all(
|
|
657
|
+
options.entityRules.map(async (rule) => {
|
|
658
|
+
const rulePaths = Array.isArray(rule.path) ? rule.path : [rule.path];
|
|
659
|
+
const dirs = await expandToDirectories(rulePaths);
|
|
660
|
+
return { rule, dirs };
|
|
661
|
+
})
|
|
662
|
+
);
|
|
663
|
+
for (const [stem, filePath] of Object.entries(entityFilePaths)) {
|
|
664
|
+
const entityDir = entityDirs[stem];
|
|
665
|
+
for (const { rule, dirs } of resolvedRules) {
|
|
666
|
+
const applies = dirs.some((d) => entityDir === d || entityDir.startsWith(d + path__default.sep));
|
|
667
|
+
if (!applies)
|
|
668
|
+
continue;
|
|
669
|
+
if (rule.namePrefix && !stem.startsWith(rule.namePrefix)) {
|
|
670
|
+
throw new Error(`Entity "${stem}" at "${filePath}" must have name prefix "${rule.namePrefix}"`);
|
|
671
|
+
}
|
|
672
|
+
if (rule.validate) {
|
|
673
|
+
const error = rule.validate(stem, filePath);
|
|
674
|
+
if (error)
|
|
675
|
+
throw new Error(error);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}
|
|
614
679
|
}
|
|
615
|
-
|
|
680
|
+
const isSingleLiteralPath = pathsArray.length === 1 && !fg__default.isDynamicPattern(pathsArray[0]);
|
|
681
|
+
const entitiesDir = isSingleLiteralPath ? pathsArray[0] : void 0;
|
|
682
|
+
return { schema: parseSchema(entities), entitiesDir, entitiesDirs: resolvedDirs };
|
|
616
683
|
};
|
|
617
684
|
}
|
|
618
685
|
function schemaFromRadsApi(radsApiUrl) {
|
package/dist/config.d.ts
CHANGED
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
import { g as RadsConfig, T as TypeDefinition } from './types-
|
|
1
|
+
import { g as RadsConfig, T as TypeDefinition } from './types-f64a81e8.js';
|
|
2
2
|
import 'mssql';
|
|
3
3
|
import '_rads-db';
|
|
4
4
|
|
|
5
5
|
declare function defineRadsConfig(config: RadsConfig): RadsConfig;
|
|
6
|
+
interface SchemaFromFilesEntityRule {
|
|
7
|
+
/** Directory path(s) or glob pattern(s) this rule applies to */
|
|
8
|
+
path: string | string[];
|
|
9
|
+
/** Entity class name must start with this prefix */
|
|
10
|
+
namePrefix?: string;
|
|
11
|
+
/** Custom validator — return an error message to reject the entity, or throw */
|
|
12
|
+
validate?: (entityName: string, filePath: string) => string | void;
|
|
13
|
+
}
|
|
14
|
+
interface SchemaFromFilesOptions {
|
|
15
|
+
entityRules?: SchemaFromFilesEntityRule[];
|
|
16
|
+
}
|
|
6
17
|
/**
|
|
7
|
-
* Loads all typescript files
|
|
8
|
-
*
|
|
9
|
-
* @
|
|
18
|
+
* Loads all typescript files with @entity() decorated classes from the given path(s),
|
|
19
|
+
* parses them and outputs a merged schema.
|
|
20
|
+
* @param paths - path(s) from project root to folder(s) with entity files; may include glob patterns
|
|
21
|
+
* @param options - optional validation rules per path
|
|
22
|
+
* @returns schema loader function
|
|
10
23
|
*/
|
|
11
|
-
declare function schemaFromFiles(
|
|
24
|
+
declare function schemaFromFiles(paths: string | string[], options?: SchemaFromFilesOptions): () => Promise<{
|
|
12
25
|
schema: Record<string, TypeDefinition>;
|
|
13
|
-
entitiesDir: string;
|
|
26
|
+
entitiesDir: string | undefined;
|
|
27
|
+
entitiesDirs: string[];
|
|
14
28
|
}>;
|
|
15
29
|
/**
|
|
16
30
|
* Loads schema from the rads api.
|
|
@@ -21,4 +35,4 @@ declare function schemaFromRadsApi(radsApiUrl: string): () => Promise<{
|
|
|
21
35
|
schema: any;
|
|
22
36
|
}>;
|
|
23
37
|
|
|
24
|
-
export { defineRadsConfig, schemaFromFiles, schemaFromRadsApi };
|
|
38
|
+
export { SchemaFromFilesEntityRule, SchemaFromFilesOptions, defineRadsConfig, schemaFromFiles, schemaFromRadsApi };
|
package/dist/config.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import fg from 'fast-glob';
|
|
3
4
|
import { SyntaxKind, createSourceFile, ScriptTarget } from 'typescript';
|
|
4
5
|
import _ from 'lodash';
|
|
5
6
|
|
|
@@ -590,21 +591,86 @@ function verifyRelationFields(result) {
|
|
|
590
591
|
function defineRadsConfig(config) {
|
|
591
592
|
return config;
|
|
592
593
|
}
|
|
593
|
-
function
|
|
594
|
+
async function expandToDirectories(patterns) {
|
|
595
|
+
const dirs = [];
|
|
596
|
+
for (const p of patterns) {
|
|
597
|
+
if (fg.isDynamicPattern(p)) {
|
|
598
|
+
const matches = await fg(p, { onlyDirectories: true, absolute: true });
|
|
599
|
+
dirs.push(...matches);
|
|
600
|
+
} else {
|
|
601
|
+
dirs.push(path.resolve(p));
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
return dirs;
|
|
605
|
+
}
|
|
606
|
+
function schemaFromFiles(paths, options) {
|
|
594
607
|
return async () => {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
const
|
|
608
|
+
const pathsArray = Array.isArray(paths) ? paths : [paths];
|
|
609
|
+
const resolvedDirs = [];
|
|
610
|
+
for (const p of pathsArray) {
|
|
611
|
+
if (fg.isDynamicPattern(p)) {
|
|
612
|
+
const matches = await fg(p, { onlyDirectories: true, absolute: true });
|
|
613
|
+
resolvedDirs.push(...matches);
|
|
614
|
+
} else {
|
|
615
|
+
const resolved = path.resolve(p);
|
|
616
|
+
if (!fs.existsSync(resolved))
|
|
617
|
+
await fs.promises.mkdir(resolved, { recursive: true });
|
|
618
|
+
resolvedDirs.push(resolved);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
598
621
|
const entities = {};
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
622
|
+
const entityFilePaths = {};
|
|
623
|
+
const entityDirs = {};
|
|
624
|
+
for (const dir of resolvedDirs) {
|
|
625
|
+
const entries = await fs.promises.readdir(dir, { withFileTypes: true });
|
|
626
|
+
for (const entry of entries) {
|
|
627
|
+
if (!entry.isFile() || !entry.name.endsWith(".ts"))
|
|
628
|
+
continue;
|
|
629
|
+
const filePath = path.join(dir, entry.name);
|
|
630
|
+
const content = await fs.promises.readFile(filePath, "utf-8");
|
|
631
|
+
if (!content.includes("@entity"))
|
|
632
|
+
continue;
|
|
633
|
+
const stem = entry.name.slice(0, -3);
|
|
634
|
+
if (entities[stem]) {
|
|
635
|
+
throw new Error(
|
|
636
|
+
`Entity name collision: "${stem}" is defined in multiple locations:
|
|
637
|
+
${entityFilePaths[stem]}
|
|
638
|
+
${filePath}`
|
|
639
|
+
);
|
|
640
|
+
}
|
|
641
|
+
entities[stem] = content;
|
|
642
|
+
entityFilePaths[stem] = filePath;
|
|
643
|
+
entityDirs[stem] = dir;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
if (options?.entityRules?.length) {
|
|
647
|
+
const resolvedRules = await Promise.all(
|
|
648
|
+
options.entityRules.map(async (rule) => {
|
|
649
|
+
const rulePaths = Array.isArray(rule.path) ? rule.path : [rule.path];
|
|
650
|
+
const dirs = await expandToDirectories(rulePaths);
|
|
651
|
+
return { rule, dirs };
|
|
652
|
+
})
|
|
653
|
+
);
|
|
654
|
+
for (const [stem, filePath] of Object.entries(entityFilePaths)) {
|
|
655
|
+
const entityDir = entityDirs[stem];
|
|
656
|
+
for (const { rule, dirs } of resolvedRules) {
|
|
657
|
+
const applies = dirs.some((d) => entityDir === d || entityDir.startsWith(d + path.sep));
|
|
658
|
+
if (!applies)
|
|
659
|
+
continue;
|
|
660
|
+
if (rule.namePrefix && !stem.startsWith(rule.namePrefix)) {
|
|
661
|
+
throw new Error(`Entity "${stem}" at "${filePath}" must have name prefix "${rule.namePrefix}"`);
|
|
662
|
+
}
|
|
663
|
+
if (rule.validate) {
|
|
664
|
+
const error = rule.validate(stem, filePath);
|
|
665
|
+
if (error)
|
|
666
|
+
throw new Error(error);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
606
670
|
}
|
|
607
|
-
|
|
671
|
+
const isSingleLiteralPath = pathsArray.length === 1 && !fg.isDynamicPattern(pathsArray[0]);
|
|
672
|
+
const entitiesDir = isSingleLiteralPath ? pathsArray[0] : void 0;
|
|
673
|
+
return { schema: parseSchema(entities), entitiesDir, entitiesDirs: resolvedDirs };
|
|
608
674
|
};
|
|
609
675
|
}
|
|
610
676
|
function schemaFromRadsApi(radsApiUrl) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EntityDecoratorArgs, U as UiDecoratorArgs, a as UiFieldDecoratorArgs, V as ValidateEntityDecoratorArgs, b as ValidateFieldDecoratorArgs, F as FieldDecoratorArgs, C as ComputedDecoratorArgs, S as Schema, D as DriverConstructor, c as Driver, d as ComputedContext, R as RadsRequestContext, e as CreateRadsDbArgs, f as CreateRadsDbClientArgs } from './types-
|
|
2
|
-
export { O as Change, x as ComputedContextGlobal, k as CreateRadsArgsDrivers, m as CreateRadsDbArgsNormalized, an as DeepKeys, ai as DeepPartial, af as DeepPartialArrayItem, ad as DeepPartialWithNulls, ae as DeepPartialWithNullsItem, ag as DeepPartialWithoutNulls, ah as DeepPartialWithoutNullsItem, ao as EntityMethods, w as EnumDefinition, v as FieldDefinition, J as FileSystemNode, u as FileUploadArgs, q as FileUploadDriver, p as FileUploadResult, H as GenerateClientNormalizedOptions, B as GenerateClientOptions, a9 as Get, $ as GetAggArgs, a0 as GetAggArgsAgg, a3 as GetAggArgsAny, a6 as GetAggResponse, _ as GetArgs, a2 as GetArgsAny, a5 as GetArgsInclude, Q as GetManyArgs, a1 as GetManyArgsAny, a7 as GetManyResponse, a8 as GetResponse, aa as GetResponseInclude, ab as GetResponseIncludeSelect, ac as GetResponseNoInclude, s as GetRestRoutesArgs, G as GetRestRoutesOptions, t as GetRestRoutesResponse, ak as InverseRelation, am as JsonPutOperations, M as MinimalDriver, al as Put, P as PutEffect, g as RadsConfig, h as RadsConfigDataSource, r as RadsDbInstance, N as RadsFeature, y as RadsHookDoc, L as RadsUiSlotDefinition, K as RadsUiSlotName, I as RadsVitePluginOptions, aj as Relation, i as RequiredFields, l as RestDriverOptions, A as RestFileUploadDriverOptions, n as SchemaLoadResult, o as SchemaValidators, z as SqlDriverOptions, T as TypeDefinition, j as ValidateStringDecoratorArgs, X as VerifyManyArgs, a4 as VerifyManyArgsAny, Y as VerifyManyResponse, Z as Where, W as WhereJsonContains } from './types-
|
|
1
|
+
import { E as EntityDecoratorArgs, U as UiDecoratorArgs, a as UiFieldDecoratorArgs, V as ValidateEntityDecoratorArgs, b as ValidateFieldDecoratorArgs, F as FieldDecoratorArgs, C as ComputedDecoratorArgs, S as Schema, D as DriverConstructor, c as Driver, d as ComputedContext, R as RadsRequestContext, e as CreateRadsDbArgs, f as CreateRadsDbClientArgs } from './types-f64a81e8.js';
|
|
2
|
+
export { O as Change, x as ComputedContextGlobal, k as CreateRadsArgsDrivers, m as CreateRadsDbArgsNormalized, an as DeepKeys, ai as DeepPartial, af as DeepPartialArrayItem, ad as DeepPartialWithNulls, ae as DeepPartialWithNullsItem, ag as DeepPartialWithoutNulls, ah as DeepPartialWithoutNullsItem, ao as EntityMethods, w as EnumDefinition, v as FieldDefinition, J as FileSystemNode, u as FileUploadArgs, q as FileUploadDriver, p as FileUploadResult, H as GenerateClientNormalizedOptions, B as GenerateClientOptions, a9 as Get, $ as GetAggArgs, a0 as GetAggArgsAgg, a3 as GetAggArgsAny, a6 as GetAggResponse, _ as GetArgs, a2 as GetArgsAny, a5 as GetArgsInclude, Q as GetManyArgs, a1 as GetManyArgsAny, a7 as GetManyResponse, a8 as GetResponse, aa as GetResponseInclude, ab as GetResponseIncludeSelect, ac as GetResponseNoInclude, s as GetRestRoutesArgs, G as GetRestRoutesOptions, t as GetRestRoutesResponse, ak as InverseRelation, am as JsonPutOperations, M as MinimalDriver, al as Put, P as PutEffect, g as RadsConfig, h as RadsConfigDataSource, r as RadsDbInstance, N as RadsFeature, y as RadsHookDoc, L as RadsUiSlotDefinition, K as RadsUiSlotName, I as RadsVitePluginOptions, aj as Relation, i as RequiredFields, l as RestDriverOptions, A as RestFileUploadDriverOptions, n as SchemaLoadResult, o as SchemaValidators, z as SqlDriverOptions, T as TypeDefinition, j as ValidateStringDecoratorArgs, X as VerifyManyArgs, a4 as VerifyManyArgsAny, Y as VerifyManyResponse, Z as Where, W as WhereJsonContains } from './types-f64a81e8.js';
|
|
3
3
|
import { RadsDb } from '_rads-db';
|
|
4
4
|
export { RadsDb } from '_rads-db';
|
|
5
5
|
import 'mssql';
|
|
@@ -77,12 +77,12 @@ type KeepArray<TMaybeArray, TType> = NonNullable<TMaybeArray> extends any[] ? TT
|
|
|
77
77
|
type GetResponseInclude<EN extends keyof EntityMeta, I extends GetArgsInclude<EN>> = I extends {
|
|
78
78
|
_pick: readonly string[];
|
|
79
79
|
} ? GetResponseIncludeSelect<EN, I> : {
|
|
80
|
-
[K in keyof EntityMeta[EN]['type']]: K extends keyof EntityMeta[EN]['relations'] ? K extends keyof I ? KeepArray<EntityMeta[EN]['type'][K], GetResponseInclude<EntityMeta[EN]['relations'][K]['entityName'], I[K]>> : KeepArray<EntityMeta[EN]['type'][K], RelationData<EN, K>> : K extends keyof EntityMeta[EN]['nestedObjects'] ? K extends keyof I ? GetResponseInclude<EntityMeta[EN]['nestedObjects'][K]['entityName'], I[K]
|
|
80
|
+
[K in keyof EntityMeta[EN]['type']]: K extends keyof EntityMeta[EN]['relations'] ? K extends keyof I ? KeepArray<EntityMeta[EN]['type'][K], GetResponseInclude<EntityMeta[EN]['relations'][K]['entityName'], I[K]>> : KeepArray<EntityMeta[EN]['type'][K], RelationData<EN, K>> : K extends keyof EntityMeta[EN]['nestedObjects'] ? K extends keyof I ? KeepArray<EntityMeta[EN]['type'][K], GetResponseInclude<EntityMeta[EN]['nestedObjects'][K]['entityName'], I[K]>> : EntityMeta[EN]['type'][K] : EntityMeta[EN]['type'][K];
|
|
81
81
|
};
|
|
82
82
|
type GetResponseIncludeSelect<EN extends keyof EntityMeta, I extends GetArgsInclude<EN>> = I extends {
|
|
83
83
|
_pick: readonly (infer P)[];
|
|
84
84
|
} ? Pick<{
|
|
85
|
-
[K in keyof EntityMeta[EN]['type']]: K extends keyof EntityMeta[EN]['relations'] ? K extends keyof Omit<I, '_pick'> ? KeepArray<EntityMeta[EN]['type'][K], GetResponseInclude<EntityMeta[EN]['relations'][K]['entityName'], Omit<I, '_pick'>[K]>> : KeepArray<EntityMeta[EN]['type'][K], RelationData<EN, K>> : K extends keyof EntityMeta[EN]['nestedObjects'] ? K extends keyof Omit<I, '_pick'> ? GetResponseInclude<EntityMeta[EN]['nestedObjects'][K]['entityName'], Omit<I, '_pick'>[K]
|
|
85
|
+
[K in keyof EntityMeta[EN]['type']]: K extends keyof EntityMeta[EN]['relations'] ? K extends keyof Omit<I, '_pick'> ? KeepArray<EntityMeta[EN]['type'][K], GetResponseInclude<EntityMeta[EN]['relations'][K]['entityName'], Omit<I, '_pick'>[K]>> : KeepArray<EntityMeta[EN]['type'][K], RelationData<EN, K>> : K extends keyof EntityMeta[EN]['nestedObjects'] ? K extends keyof Omit<I, '_pick'> ? KeepArray<EntityMeta[EN]['type'][K], GetResponseInclude<EntityMeta[EN]['nestedObjects'][K]['entityName'], Omit<I, '_pick'>[K]>> : EntityMeta[EN]['type'][K] : K extends EntityMeta[EN]['jsonFields'] ? K extends keyof Omit<I, '_pick'> ? Omit<I, '_pick'>[K] extends {
|
|
86
86
|
_pick: (infer JP)[];
|
|
87
87
|
} ? Pick<NonNullable<EntityMeta[EN]['type'][K]>, JP & string> : EntityMeta[EN]['type'][K] : EntityMeta[EN]['type'][K] : EntityMeta[EN]['type'][K];
|
|
88
88
|
}, ((P & string) | (Exclude<keyof I, '_pick'> & string)) & keyof EntityMeta[EN]['type']> : never;
|
|
@@ -287,6 +287,7 @@ type Schema = Record<string, TypeDefinition>;
|
|
|
287
287
|
interface SchemaLoadResult {
|
|
288
288
|
schema: Schema;
|
|
289
289
|
entitiesDir?: string;
|
|
290
|
+
entitiesDirs?: string[];
|
|
290
291
|
}
|
|
291
292
|
type SchemaValidators = Record<string, (item: any, oldDoc?: any) => any>;
|
|
292
293
|
interface TypeDefinition {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rads-db",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.37",
|
|
4
4
|
"description": "Say goodbye to boilerplate code and hello to efficient and elegant syntax.",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@fastify/deepmerge": "^1.3.0",
|
|
85
85
|
"dataloader": "^2.2.2",
|
|
86
|
+
"fast-glob": "^3.3.3",
|
|
86
87
|
"ignore": "^5.2.4",
|
|
87
88
|
"jiti": "^2.4.2",
|
|
88
89
|
"klaw": "^4.1.0",
|