remult 0.27.13 → 0.27.14

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.
@@ -16,6 +16,8 @@ import { isOfType } from '../src/isOfType.js';
16
16
  import { initDataProviderOrJson } from './initDataProviderOrJson.js';
17
17
  export function createRemultServerCore(options, serverCoreOptions) {
18
18
  const safeOptions = options ?? {};
19
+ if (!safeOptions.entities)
20
+ safeOptions.entities = [];
19
21
  if (!safeOptions.subscriptionServer) {
20
22
  safeOptions.subscriptionServer = new SseSubscriptionServer();
21
23
  }
@@ -38,7 +38,7 @@ export function verifyFieldRelationInfo(repo, remult, dp) {
38
38
  compoundIdField: undefined,
39
39
  };
40
40
  function buildError(what) {
41
- return Error(`Error for relation: "${field.key}" to "${toRepo.metadata.key}": ` +
41
+ return Error(`Error for relation: "${repo.metadata.key}.${field.key}", ` +
42
42
  what);
43
43
  }
44
44
  let hasFields = () => relationField || relFields.fields;
@@ -70,7 +70,7 @@ export function verifyFieldRelationInfo(repo, remult, dp) {
70
70
  }
71
71
  }
72
72
  if (!hasFields())
73
- throw buildError(`No matching field found on target. Please specify field/fields`);
73
+ throw buildError(`No matching field found on target "${toRepo.metadata.key}". Please specify field/fields`);
74
74
  }
75
75
  function requireField(field, meta) {
76
76
  const result = meta.fields.find(field);
@@ -17,6 +17,7 @@ const wnn = [
17
17
  export const flags = {
18
18
  error500RetryCount: 4,
19
19
  };
20
+ //p1 - add aggregate to query
20
21
  //p1 - add parameter all to deleteMany, and updateMany
21
22
  //p1 filter.apply ApiPreFilter
22
23
  /*p1 - add id and use uuid by default, but allow changes with Fields.id.defaultIdProvider NO but defaultProvider yes???
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.27.13",
3
+ "version": "0.27.14",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "homepage": "https://remult.dev",
6
6
  "repository": {