@htilabs/platform-common-models 0.42.0 → 0.42.1
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 +18 -0
- package/dist/{index-uz57Fic9.d.ts → index-BHSRMJvd.d.ts} +1 -1
- package/dist/{index-1pWiqEBC.d.cts → index-DF469Qgd.d.cts} +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/models/index.d.cts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/schemas/index.d.cts +25 -25
- package/dist/schemas/index.d.ts +25 -25
- package/dist/sharing-ceiling/index.cjs +10 -10
- package/dist/sharing-ceiling/index.cjs.map +1 -1
- package/dist/sharing-ceiling/index.d.cts +9 -2
- package/dist/sharing-ceiling/index.d.ts +9 -2
- package/dist/sharing-ceiling/index.js +10 -10
- package/dist/sharing-ceiling/index.js.map +1 -1
- package/package.json +1 -1
- package/src/sharingCeiling/__tests__/resolveShare.test.ts +114 -0
- package/src/sharingCeiling/resolve.ts +32 -17
- package/dist/{cvcEntry-DAuhe0cd.d.cts → cvcEntry-DQEoFVL2.d.cts} +8 -8
- package/dist/{cvcEntry-DAuhe0cd.d.ts → cvcEntry-DQEoFVL2.d.ts} +8 -8
package/README.md
CHANGED
|
@@ -16,6 +16,24 @@ Package exports are organized into a public root API and a small number of
|
|
|
16
16
|
dedicated subpaths (`/validation`, `/cvcs`) — consult `package.json` for the
|
|
17
17
|
authoritative `exports` map.
|
|
18
18
|
|
|
19
|
+
## share-resolver / 0.42.1 (behaviour fix)
|
|
20
|
+
|
|
21
|
+
A row is OUTSIDE a governing list only when neither it nor anything beneath
|
|
22
|
+
it is covered. 0.42.0 withheld a GROUPING as a unit when the list named only
|
|
23
|
+
its rows (`instrument_summary` named through `summary_lap`): the grouping
|
|
24
|
+
landed in `excludedItems`, and `shareRowCeiling` then dropped the named rows
|
|
25
|
+
with it — Thread's inside-ceiling adoption found the `risk_only_handoff`
|
|
26
|
+
preset's seven screen summaries refused by the ceiling built from that very
|
|
27
|
+
preset. Now the uncovered rows are withheld each at their own grain and the
|
|
28
|
+
named ones stand. Same rule for the legacy cell chain's list, a field-group
|
|
29
|
+
limit (`infoScopeItems`) and the team ceiling's list.
|
|
30
|
+
|
|
31
|
+
**Consumers:** `excludedItems` / `teamExcludedItems` changed shape. A code is
|
|
32
|
+
withheld when it or an ancestor is listed; a grouping is listed only when
|
|
33
|
+
nothing beneath it is covered, so a grouping code's absence no longer means
|
|
34
|
+
the whole grouping may leave. For a send decision read `shareRowCeiling` +
|
|
35
|
+
`rowsOverCeiling`, never a grouping-code check against `excludedItems` alone.
|
|
36
|
+
|
|
19
37
|
## share-resolver / 0.42.0 (additive)
|
|
20
38
|
|
|
21
39
|
0.42.0 (Kickoff 13, GDR § 5.79 "ONE resolver per runtime") ships THE share
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-
|
|
1
|
+
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-DQEoFVL2.js';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
3
|
import { HydratedDocument, Connection, Model } from 'mongoose';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-
|
|
1
|
+
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-DQEoFVL2.cjs';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
3
|
import { HydratedDocument, Connection, Model } from 'mongoose';
|
|
4
4
|
|
package/dist/index.cjs
CHANGED
|
@@ -17131,6 +17131,9 @@ function resolveShare(input) {
|
|
|
17131
17131
|
let excludedReason = null;
|
|
17132
17132
|
const teamExcludedItems = [];
|
|
17133
17133
|
let teamExcludedReason = null;
|
|
17134
|
+
const outside = (covered) => items.filter(
|
|
17135
|
+
(r) => !covered(r) && !items.some((d) => d !== r && covered(d) && scope.ancestorsOf(d).includes(r))
|
|
17136
|
+
);
|
|
17134
17137
|
const addExcluded = (rows, why) => {
|
|
17135
17138
|
for (const r of rows)
|
|
17136
17139
|
if (!floorItems.includes(r) && !excludedItems.includes(r))
|
|
@@ -17166,7 +17169,7 @@ function resolveShare(input) {
|
|
|
17166
17169
|
}
|
|
17167
17170
|
if (allowed && !req && groupCeiling !== null && !scopeListStrictlyCovers(scope, groupCeiling, g)) {
|
|
17168
17171
|
addExcluded(
|
|
17169
|
-
|
|
17172
|
+
outside((r) => scopeListCovers(scope, groupCeiling, g, r)),
|
|
17170
17173
|
"Outside the payload for this purpose"
|
|
17171
17174
|
);
|
|
17172
17175
|
}
|
|
@@ -17177,17 +17180,16 @@ function resolveShare(input) {
|
|
|
17177
17180
|
}
|
|
17178
17181
|
if (allowed && !req && polScopeBinds && !scopeListStrictlyCovers(scope, govList, g)) {
|
|
17179
17182
|
addExcluded(
|
|
17180
|
-
|
|
17183
|
+
outside((r) => scopeListCovers(scope, govList, g, r)),
|
|
17181
17184
|
`Outside what the \u201C${govName}\u201D policy allows for this purpose`
|
|
17182
17185
|
);
|
|
17183
17186
|
}
|
|
17184
17187
|
const govRows = polScopeBinds ? own3(govItems, g) : void 0;
|
|
17185
17188
|
if (allowed && !req && isStringList2(govRows)) {
|
|
17186
17189
|
const keep = new Set(govRows);
|
|
17190
|
+
const kept = (r) => keep.has(r) || scope.ancestorsOf(r).some((a) => a !== g && keep.has(a));
|
|
17187
17191
|
addExcluded(
|
|
17188
|
-
|
|
17189
|
-
(r) => !keep.has(r) && !scope.ancestorsOf(r).some((a) => a !== g && keep.has(a))
|
|
17190
|
-
),
|
|
17192
|
+
outside(kept),
|
|
17191
17193
|
`Outside what the \u201C${govName}\u201D policy allows for this purpose`
|
|
17192
17194
|
);
|
|
17193
17195
|
}
|
|
@@ -17200,15 +17202,13 @@ function resolveShare(input) {
|
|
|
17200
17202
|
const why = `Outside what your team's \u201C${tcNamed?.name}\u201D policy allows`;
|
|
17201
17203
|
const outRows = /* @__PURE__ */ new Set();
|
|
17202
17204
|
if (tcScope !== null && !scopeListStrictlyCovers(scope, tcScope, g)) {
|
|
17203
|
-
for (const r of
|
|
17204
|
-
if (!scopeListCovers(scope, tcScope, g, r)) outRows.add(r);
|
|
17205
|
+
for (const r of outside((x) => scopeListCovers(scope, tcScope, g, x))) outRows.add(r);
|
|
17205
17206
|
}
|
|
17206
17207
|
const tcRows = own3(tcItems, g);
|
|
17207
17208
|
if (isStringList2(tcRows)) {
|
|
17208
17209
|
const keep = new Set(tcRows);
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
outRows.add(r);
|
|
17210
|
+
const kept = (r) => keep.has(r) || scope.ancestorsOf(r).some((a) => a !== g && keep.has(a));
|
|
17211
|
+
for (const r of outside(kept)) outRows.add(r);
|
|
17212
17212
|
}
|
|
17213
17213
|
for (const r of outRows)
|
|
17214
17214
|
if (!floorItems.includes(r) && !excludedItems.includes(r))
|