@web-ts-toolkit/access-router 0.54.0 → 0.56.0
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/README.md +417 -9
- package/advanced.d.mts +1 -1
- package/advanced.d.ts +1 -1
- package/advanced.js +623 -156
- package/advanced.mjs +597 -130
- package/index.d.mts +5 -2
- package/index.d.ts +5 -2
- package/index.js +3033 -1831
- package/index.mjs +2780 -1578
- package/llms.txt +3 -0
- package/package.json +3 -3
- package/{parsers-ZSrF7SNu.d.mts → parsers-BXKoUKMa.d.mts} +633 -444
- package/{parsers-ZSrF7SNu.d.ts → parsers-BXKoUKMa.d.ts} +633 -444
package/llms.txt
CHANGED
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
- [Includes/count cardinality](README.md#include-cardinality) · [Bounded numeric Map counts and Set-to-number migration](README.md#numeric-grouped-count-service-api-breaking-migration) · [Source/attachment provenance](README.md#safe-include-output-paths)
|
|
36
36
|
- [Correlated includes and literal escapes](README.md#correlated-includes) · [Nested writes and trusted hooks](README.md#nested-updates-and-trusted-hooks)
|
|
37
37
|
- [Virtuals, literal-filter preservation and output compatibility](README.md#virtuals-computed-fields) · [Request/runtime reentrant hook chains](README.md#hook-admission-and-reentrant-service-calls) · [Separate persistence limits](README.md#persistence-concurrency-and-resource-limits)
|
|
38
|
+
- [Private populated dependencies](README.md#private-populated-dependencies) · [Runnable example](README.md#runnable-private-dependency-example): server virtual `dependsOnPopulate: [{ path, select? }]`, automatically retained scope-local static ObjectId ref/1D array, eagerly registered same-runtime/same-connection target. Explicit `ModelVirtualDescriptor<Source, Value, { ref: Target }>` types only optional getter argument four (`populated = {}`); argument one/local dependsOn and persisted/write/public types stay unchanged. Root/advanced types: ModelVirtualPopulateDependency, ModelVirtualPopulateInputs. No client/query authority or new entrypoint.
|
|
39
|
+
- [Runtime private-read mode](README.md#runtime-private-read-mode): `api.setGlobalOptions({ requireReadOperationAccessForPopulateDependencies: false })` opts out of private target operationAccess.read only; default true, only literal false bypasses, malformed JS/undefined stays conservative true. Typed GlobalOptions/exact setters/getters; server/runtime-only, isolated and captured with source/target/query intent before awaits, including nested output. Not requireRegisteredPopulateModels: eager private registration/static declarations remain. Source/target input-field permissions are already bypassed; virtual output authorization and request baseFilter.read/overrideFilter.read/retained IDs still govern. False + virtual-only selection adds no operation check solely to fetch.
|
|
40
|
+
- [Private target/read/selection rules](README.md#target-authority-selection-and-reconstruction) · [Release compatibility](README.md#release-compatibility-dependency-reference-omission): BOTH modes apply an independent captured caller target BASE-read visibility gate to active selected/applicable dependency refs. Source unselected/denied -> omit; target read denied/failed -> omit entire ref INCLUDING ID, outranking list/custom populate access and public related-operation grants. Read allowed + ordinary population -> original authorized mask; read allowed + no population -> exact original refs/arrays/nulls/misses/order/duplicates/presence. This intentionally supersedes prior D1 denied-ID fallback even in default mode; no active plan/no feature keeps ordinary behavior. Private availability/getter outcomes never grant reference output. Compatible positive fetch unions retain separate masks/private request row scope, independent of public match/access/related grants. Each getter gets only its declared fourth-argument mask; no implicit DTO/handle/metadata/hook/task transport, only its authorized deliberate return. No recursive private target virtuals or successful-write retries. See README for selection/errors/inheritance/native isolation/hydration caveats and measured compatible-group batching.
|
|
38
41
|
|
|
39
42
|
## Additional examples
|
|
40
43
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@web-ts-toolkit/access-router",
|
|
3
3
|
"description": "ACL-aware Express routers and in-memory data services for Mongoose-backed APIs",
|
|
4
4
|
"homepage": "https://web-ts-toolkit.pages.dev/docs/packages/access-router",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.56.0",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"./**/index.js",
|
|
8
8
|
"./**/index.mjs",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"node": ">=22"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@web-ts-toolkit/express-json-router": "0.
|
|
61
|
-
"@web-ts-toolkit/utils": "0.
|
|
60
|
+
"@web-ts-toolkit/express-json-router": "0.56.0",
|
|
61
|
+
"@web-ts-toolkit/utils": "0.56.0",
|
|
62
62
|
"just-diff": "^6.0.2",
|
|
63
63
|
"mongoose-schema-jsonschema": "^4.0.1",
|
|
64
64
|
"sift": "^17.1.3",
|