@jskit-ai/crud-core 0.2.22 → 0.2.23

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.3 exactly (from 3.1.2), from the registry with its published integrity: a write checks each linked target type with one read of the targets' ids (their minimal records only for a target resource with a `checkPermissions` hook), which also takes the shared lock on the belongs-to and polymorphic targets it stores, before `beforeSchemaValidate` rather than after the `beforeDataCall` hooks; in a system context a belongs-to its declared foreign key protects is left to that key, so a missing target there fails with the database's foreign key error instead of `not_found`. json-rest-api now asks for json-rest-schema ^1.0.20.
5
6
  - Depends on json-rest-api 3.1.2 exactly (from 3.1.1), from the registry with its published integrity: json-rest-api bounds a blob field itself too (`maxBytes` required, a blob answered only where `fields` names it, at most 16 MiB of named blobs per read, none in an include, `queryAll` or HTTP response, many-row write statements chunked by blob bytes, and the MySQL/MariaDB column type chosen by `maxBytes`), its `contains`, `startsWith` and `endsWith` filters match `%`, `_` and `\` literally on every database, a relationship write checks and locks each related type's targets in one query, and an AnyAPI many-to-many read costs its own link rows instead of growing with the square of them.
6
7
  - A patch naming a linked record that does not exist (a `lookup` field's id with no such row) is refused as that record missing, the error json-rest-api raises with its `resourceType` and `resourceId`, where the CRUD service answered `404 Document not found.` as if the patched record itself were missing. View, patch and delete still answer the 404 (or null for delete) for their own record missing or out of scope.
7
8
  - A CRUD contract whose `includeFields` lists a link of the included record as a field is refused at boot, at every depth, with an error that names the form to use: a belongs-to field by its key (`"locationId"`) or its relationship (`"location"`), or a collection relation. A JSON:API document answers a link under the record's relationships, never among its attributes, so such an entry never showed and the included record read as if it had no link, which emptied an app's board grouped by it. List it as `{ location: [] }`, which answers the linked id, with the fields to show of the linked record inside it. `CrudContractsProvider` checks every registered contract when it seals the registry at boot, once every feature owns its tables, against the table resources `runtime.resources` answers; a level whose table no feature owns is left alone.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/crud-core",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
@@ -20,10 +20,10 @@
20
20
  "./locales/en.json": "./locales/en.json"
21
21
  },
22
22
  "dependencies": {
23
- "@jskit-ai/resource-core": "0.1.208",
24
- "@jskit-ai/resource-crud-core": "0.1.208",
25
- "json-rest-api": "3.1.2",
26
- "json-rest-schema": "^1.0.17"
23
+ "@jskit-ai/resource-core": "0.1.209",
24
+ "@jskit-ai/resource-crud-core": "0.1.209",
25
+ "json-rest-api": "3.1.3",
26
+ "json-rest-schema": "^1.0.20"
27
27
  },
28
28
  "description": "Shared server-side CRUD service, repository, route, and query helpers.",
29
29
  "jskit": {
@@ -49,8 +49,8 @@
49
49
  }
50
50
  },
51
51
  "peerDependencies": {
52
- "@jskit-ai/http-runtime": "0.2.17",
53
- "@jskit-ai/kernel": "0.2.17",
54
- "@jskit-ai/resource-runtime": "0.2.19"
52
+ "@jskit-ai/http-runtime": "0.2.18",
53
+ "@jskit-ai/kernel": "0.2.18",
54
+ "@jskit-ai/resource-runtime": "0.2.20"
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.22",
13
- "@jskit-ai/resource-core": "0.1.208",
14
- "@jskit-ai/resource-crud-core": "0.1.208"
12
+ "@jskit-ai/crud-core": "0.2.23",
13
+ "@jskit-ai/resource-core": "0.1.209",
14
+ "@jskit-ai/resource-crud-core": "0.1.209"
15
15
  },
16
16
  "jskit": {
17
17
  "kind": "runtime",