@jskit-ai/crud-core 0.2.28 → 0.2.29

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/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - Depends on json-rest-api 3.1.5 exactly (from 3.1.4), from the registry with its published integrity: a read-only builder (a `scopedQuery()`, a join source, a row policy's `ownTable()`) that json-rest-api's own query compiles as a subquery keeps its joins, where 3.1.4 dropped them and the subquery matched more rows than it should (a row policy or filter narrowing with `whereExists` over a joined subquery widened), and `lockByIds`/`lockWhere` take `lockMode: 'share'`.
5
6
  - A `date`, `dateRange` or `numberRange` list filter with a custom `apply` filters a list whose service passes its query through `toJsonRestQuery` (step 5 of the structured-filters guide), where json-rest-api refused the list with 422 "Field not allowed": its search schema entry (`jsonRestSearchSchema`) takes the filter's own key, but `toJsonRestQuery` sent the internal bound keys of a range filter without one (`__jskit_<key>_from` and `__jskit_<key>_toExclusive`, or `_min` and `_max`). It now sends such a filter under its own key with its parsed value, a day, `{ from, to }` or `{ min, max }`, which json-rest-api hands the `apply` as `applyQuery` does. Each filter's search schema entries and the values `toJsonRestQuery` sends for it now come from one place, so a list sends only keys its search schema declares, for every filter type with or without an `apply`; range filters without one keep their bound keys. Tests list orders over HTTP through such filters and check every type.
6
7
  - A CRUD list or view whose includes reach below their first level refuses a `fields` key that is a relationship alias, or that names no type it shows, as it did before 0.2.26 and as a contract whose includes stop at their first level does: 400 `ACTION_VALIDATION_FAILED` naming `fields.<key>`, with the allowed types and the type to use for each alias (`crud.query.fieldsKeysInvalidWithAliases`), before the action runs. Since 0.2.26 the list and view actions checked such keys inside `execute` and threw kernel's `createValidationError` (`validation_failed`), so an assistant tool calling the list with `fields: { pet: [...] }` was told only "Validation failed.", without the field or the type to use, and the generated action registered with another `execute` (as a test stubs it) took the key. The check (`createIncludedFieldsetsCheck`) is now the actions' `checkInput`, which the kernel's action pipeline runs right after the input schema; its `crud.query.fieldsNotShown` refusal is answered the same way, and a fieldset for a type the includes reach still narrows it.
7
8
  - A CRUD list over HTTP takes a filter that holds several values (`recordIdMany`, `enumMany`, and the list's `id`) as one comma-separated value too, `filter[customer]=1,2`, the form JSON:API gives a list, where the route's query validation refused it with 400 before the filter could split it (since 0.2.46 the filter reads `1,2` as `["1", "2"]`, but only a value the client named twice reached it in that form). Each entry must still be valid: `filter[customer]=1,,2` or a value the filter does not offer still answers 400.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/crud-core",
3
- "version": "0.2.28",
3
+ "version": "0.2.29",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
@@ -20,9 +20,9 @@
20
20
  "./locales/en.json": "./locales/en.json"
21
21
  },
22
22
  "dependencies": {
23
- "@jskit-ai/resource-core": "0.1.211",
24
- "@jskit-ai/resource-crud-core": "0.1.213",
25
- "json-rest-api": "3.1.4",
23
+ "@jskit-ai/resource-core": "0.1.212",
24
+ "@jskit-ai/resource-crud-core": "0.1.214",
25
+ "json-rest-api": "3.1.5",
26
26
  "json-rest-schema": "^1.0.20"
27
27
  },
28
28
  "description": "Shared server-side CRUD service, repository, route, and query helpers.",
@@ -49,8 +49,8 @@
49
49
  }
50
50
  },
51
51
  "peerDependencies": {
52
- "@jskit-ai/http-runtime": "0.2.20",
53
- "@jskit-ai/kernel": "0.2.20",
54
- "@jskit-ai/resource-runtime": "0.2.25"
52
+ "@jskit-ai/http-runtime": "0.2.21",
53
+ "@jskit-ai/kernel": "0.2.21",
54
+ "@jskit-ai/resource-runtime": "0.2.26"
55
55
  }
56
56
  }
@@ -9,9 +9,9 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.28",
13
- "@jskit-ai/resource-core": "0.1.211",
14
- "@jskit-ai/resource-crud-core": "0.1.213"
12
+ "@jskit-ai/crud-core": "0.2.29",
13
+ "@jskit-ai/resource-core": "0.1.212",
14
+ "@jskit-ai/resource-crud-core": "0.1.214"
15
15
  },
16
16
  "jskit": {
17
17
  "kind": "runtime",