@akanjs/cli 3.0.0-alpha.59 → 3.0.0-alpha.60

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/.build-stamp CHANGED
@@ -1 +1 @@
1
- 2a386b0b70a16d11250c7e4aca6dd3bd50e566cd58d8b1aef0a602fe45395659
1
+ e8e9e8a86daef5bad8df77bd9043d3141520c12a7df48126081356d7c91cbf64
@@ -406,6 +406,12 @@ workflow changes.
406
406
 
407
407
  ### Slices, Queries, and Hydration
408
408
 
409
+ - **The root slice (`""`, generated by `slice()`) takes `queryKey` and `args`, not a query.** `initX("byOwner",
410
+ [ownerId])` names one of the model's own filters and passes that filter's args; no key at all is the `any`
411
+ filter every model carries. A raw query descriptor let a caller compose a query the model never declared, and
412
+ could not survive the query string at all — `String(value)` sends `[object Object]`. Args are parsed by the type
413
+ the filter declared, a missing required one is refused, and args past the declared ones are dropped
414
+ (`resolveFilterQuery`, `pkgs/akanjs/document/filterMeta.ts`). It is an admin API: `root:` is always `Admin`.
409
415
  - A slice's `exec` returns a `QueryOf` (an opaque query descriptor, `pkgs/akanjs/constant/types.ts`); you **cannot** chain `.sort()`/`.limit()` on it.
410
416
  - Apply ordering/paging via the store `init` fetch option instead: `initX(..., { sort, page, limit })` (`pkgs/akanjs/fetch/fetchType/sliceFetch.type.ts`).
411
417
  - Generated list accessors like `listBy(...)` return `Promise<Doc[]>`. For a chainable builder (`.sort().skip().limit().select()`) use the model facade's `findMany`/`findOne` (`FindManyChain`, `pkgs/akanjs/document/into.ts`).
@@ -424,6 +430,12 @@ workflow changes.
424
430
  - **A filter may not be keyed after its own model.** Filter methods are assigned after CRUD, so a filter `chat` on
425
431
  model `chat` would silently swap the single-document `removeChat`/`updateChat` for a hookless query-level one. It
426
432
  throws at boot instead (`assertFilterFitsCrud`).
433
+ - **"Has no value" is `q.empty`, never `q.missing`.** The three absence operators are distinct: `q.exists` is the
434
+ key being present, `q.missing` is the key being *absent from the stored JSON*, and `q.empty` is either — absent,
435
+ or present and null. An optional field is written both ways over its life: an insert that omits it leaves the key
436
+ out, while a document read back and saved carries the explicit `null` that the read materialized. So `q.missing`
437
+ matches a freshly inserted row and silently stops matching that same row after its first round-trip save. Reach
438
+ for it only to find rows written before the field was declared.
427
439
 
428
440
  ### Text Search In A Filter — `q.search()`
429
441
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.0.0-alpha.59",
3
+ "version": "3.0.0-alpha.60",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -34,7 +34,7 @@
34
34
  "@langchain/openai": "^1.4.6",
35
35
  "@tailwindcss/node": "^4.3.0",
36
36
  "@trapezedev/project": "^7.1.4",
37
- "akanjs": "3.0.0-alpha.59",
37
+ "akanjs": "3.0.0-alpha.60",
38
38
  "chalk": "^5.6.2",
39
39
  "commander": "^14.0.3",
40
40
  "dayjs": "^1.11.20",