@jskit-ai/crud-core 0.2.68 → 0.2.70

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
+ - The `crud/crud-feature-package` pattern gives `@jskit-ai/config-eslint`'s larger file limit: files under 1,200 lines (it said 750); functions stay under 600.
5
6
  - A CRUD feature's record routes and its view, update and delete actions take the record ids its contract's `recordId` says (`@jskit-ai/resource-crud-core`'s `defineCrudContract`), in place of the kernel's positive-integer `recordIdParamsValidator`, so the assistant and the HTTP routes view, change and delete a legacy row 0 that the owner's `normalizeId` keeps (jskit-ai#503). A contract without `recordId` takes positive integers as before.
6
7
  - A CRUD list or view's sparse fieldset for its own records, named by the contract's namespace as its routes and the assistant's description name it (`fields[job_kinds]=name`), narrows them when the table resource's name is not the namespace in camelCase (`taskTypes` as `job_kinds`; jskit-ai#503). The service passed the namespace key on, and json-rest-api refused it with "Unknown resource type 'jobKinds' requested in sparse fields"; it now names that fieldset by the table resource.
7
8
  - A CRUD action's documents carry the contract's namespace as their records' JSON:API type, as its HTTP routes answer it, whatever its table resource is named (jskit-ai#503). The CRUD service answered json-rest-api's documents, which type a record by its table resource's name, so a resource served under another namespace (`checklistTypes` as `checklist_types`) answered `checklistTypes` from its list, view, create and update actions; its HTTP routes still answered `checklist_types` because the response schema writes the type it declares. The assistant's result transform, which decodes the action's document as the routes answer it, then refused every such list and view (and create and update) with "Expected JSON:API resource type checklist_types, received checklistTypes.", a 500. The service now gives its own records the namespace as their type; a link and the included record it reaches keep the table resource's name, as the routes answer them, so a reader still pairs them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/crud-core",
3
- "version": "0.2.68",
3
+ "version": "0.2.70",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
@@ -51,6 +51,6 @@
51
51
  "peerDependencies": {
52
52
  "@jskit-ai/http-runtime": "0.2.39",
53
53
  "@jskit-ai/kernel": "0.2.38",
54
- "@jskit-ai/resource-runtime": "0.2.62"
54
+ "@jskit-ai/resource-runtime": "0.2.63"
55
55
  }
56
56
  }
@@ -54,7 +54,7 @@ from a generator questionnaire or treat a live table as the sole contract.
54
54
  Each action's `execute` is one call to one service method with the
55
55
  validated input, and its argument is typed as crud-core's
56
56
  `CrudCustomActionInvocation`. Keep one copy of each helper per package, files
57
- under 750 lines and functions under 600.
57
+ under 1,200 lines and functions under 600.
58
58
 
59
59
  ## Framework APIs
60
60
 
@@ -9,7 +9,7 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.68",
12
+ "@jskit-ai/crud-core": "0.2.70",
13
13
  "@jskit-ai/resource-core": "0.1.229",
14
14
  "@jskit-ai/resource-crud-core": "0.1.232"
15
15
  },