@objectstack/lint 12.5.0 → 13.0.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/dist/index.cjs +448 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -27
- package/dist/index.d.ts +104 -27
- package/dist/index.js +436 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Manifest } from '@objectstack/sdui-parser';
|
|
2
|
+
import { AccessMatrix } from '@objectstack/spec/security';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Build-time dashboard widget binding diagnostics (issues #1719, #1721).
|
|
@@ -69,7 +70,7 @@ interface WidgetBindingFinding {
|
|
|
69
70
|
/** How to fix (or deliberately suppress) it. */
|
|
70
71
|
hint: string;
|
|
71
72
|
}
|
|
72
|
-
type AnyRec$
|
|
73
|
+
type AnyRec$d = Record<string, unknown>;
|
|
73
74
|
/**
|
|
74
75
|
* Validate every dashboard widget's dataset binding. Returns the list of
|
|
75
76
|
* findings (empty = clean). Caller decides how to surface them: `error`
|
|
@@ -77,7 +78,7 @@ type AnyRec$a = Record<string, unknown>;
|
|
|
77
78
|
* should fail validate/build; `warning` findings are advisory and must
|
|
78
79
|
* never fail the build on their own.
|
|
79
80
|
*/
|
|
80
|
-
declare function validateWidgetBindings(stack: AnyRec$
|
|
81
|
+
declare function validateWidgetBindings(stack: AnyRec$d): WidgetBindingFinding[];
|
|
81
82
|
|
|
82
83
|
interface ExprIssue {
|
|
83
84
|
where: string;
|
|
@@ -90,12 +91,12 @@ interface ExprIssue {
|
|
|
90
91
|
*/
|
|
91
92
|
severity?: 'error' | 'warning';
|
|
92
93
|
}
|
|
93
|
-
type AnyRec$
|
|
94
|
+
type AnyRec$c = Record<string, unknown>;
|
|
94
95
|
/**
|
|
95
96
|
* Validate every predicate in the stack. Returns the list of issues (empty =
|
|
96
97
|
* clean). Caller decides how to surface / whether to fail the build.
|
|
97
98
|
*/
|
|
98
|
-
declare function validateStackExpressions(stack: AnyRec$
|
|
99
|
+
declare function validateStackExpressions(stack: AnyRec$c): ExprIssue[];
|
|
99
100
|
|
|
100
101
|
type ListViewModeSeverity = 'error' | 'warning';
|
|
101
102
|
interface ListViewModeFinding {
|
|
@@ -109,16 +110,17 @@ interface ListViewModeFinding {
|
|
|
109
110
|
hint: string;
|
|
110
111
|
}
|
|
111
112
|
declare const LIST_VIEW_FILTERS_IN_VIEWS_MODE = "list-view-filters-in-views-mode";
|
|
112
|
-
type AnyRec$
|
|
113
|
+
type AnyRec$b = Record<string, unknown>;
|
|
113
114
|
/**
|
|
114
|
-
* Flag ADR-
|
|
115
|
-
*
|
|
116
|
-
* `
|
|
117
|
-
*
|
|
115
|
+
* Flag ADR-0047 "views" mode violations on an object's built-in named views or a
|
|
116
|
+
* `defineView` default `list` / named `listViews`: `quickFilters`, or a `tabs`
|
|
117
|
+
* `userFilters`. A `dropdown` `userFilters` is allowed and not flagged. Returns
|
|
118
|
+
* the list of findings (empty = clean). Caller decides how to surface / whether
|
|
119
|
+
* to fail the build.
|
|
118
120
|
*
|
|
119
121
|
* Feed the PRE-parse stack (normalizeStackInput output) — see file header.
|
|
120
122
|
*/
|
|
121
|
-
declare function validateListViewMode(stack: AnyRec$
|
|
123
|
+
declare function validateListViewMode(stack: AnyRec$b): ListViewModeFinding[];
|
|
122
124
|
|
|
123
125
|
type StyleSeverity = 'error' | 'warning';
|
|
124
126
|
interface StyleFinding {
|
|
@@ -136,14 +138,14 @@ declare const STYLE_CLASSNAME_TAILWIND = "style-classname-tailwind";
|
|
|
136
138
|
declare const STYLE_RESPONSIVE_NO_BASE = "style-responsive-no-base";
|
|
137
139
|
declare const STYLE_UNKNOWN_CSS_PROPERTY = "style-unknown-css-property";
|
|
138
140
|
declare const STYLE_UNKNOWN_TOKEN = "style-unknown-token";
|
|
139
|
-
type AnyRec$
|
|
141
|
+
type AnyRec$a = Record<string, unknown>;
|
|
140
142
|
/**
|
|
141
143
|
* Validate every page's component tree for SDUI styling correctness (ADR-0065).
|
|
142
144
|
* Returns findings (empty = clean). `error` findings describe styles that are
|
|
143
145
|
* silently dropped and should fail validate/build; `warning` findings are
|
|
144
146
|
* advisory (typos, drift, footguns).
|
|
145
147
|
*/
|
|
146
|
-
declare function validateResponsiveStyles(stack: AnyRec$
|
|
148
|
+
declare function validateResponsiveStyles(stack: AnyRec$a): StyleFinding[];
|
|
147
149
|
|
|
148
150
|
type JsxPageSeverity = 'error' | 'warning';
|
|
149
151
|
interface JsxPageFinding {
|
|
@@ -156,8 +158,8 @@ interface JsxPageFinding {
|
|
|
156
158
|
message: string;
|
|
157
159
|
hint: string;
|
|
158
160
|
}
|
|
159
|
-
type AnyRec$
|
|
160
|
-
declare function validateJsxPages(stack: AnyRec$
|
|
161
|
+
type AnyRec$9 = Record<string, unknown>;
|
|
162
|
+
declare function validateJsxPages(stack: AnyRec$9, opts?: {
|
|
161
163
|
manifest?: Manifest;
|
|
162
164
|
}): JsxPageFinding[];
|
|
163
165
|
|
|
@@ -170,8 +172,8 @@ interface ReactPageFinding {
|
|
|
170
172
|
message: string;
|
|
171
173
|
hint: string;
|
|
172
174
|
}
|
|
173
|
-
type AnyRec$
|
|
174
|
-
declare function validateReactPages(stack: AnyRec$
|
|
175
|
+
type AnyRec$8 = Record<string, unknown>;
|
|
176
|
+
declare function validateReactPages(stack: AnyRec$8): ReactPageFinding[];
|
|
175
177
|
|
|
176
178
|
type ReactPropSeverity = 'error' | 'warning';
|
|
177
179
|
interface ReactPropFinding {
|
|
@@ -182,8 +184,8 @@ interface ReactPropFinding {
|
|
|
182
184
|
message: string;
|
|
183
185
|
hint: string;
|
|
184
186
|
}
|
|
185
|
-
type AnyRec$
|
|
186
|
-
declare function validateReactPageProps(stack: AnyRec$
|
|
187
|
+
type AnyRec$7 = Record<string, unknown>;
|
|
188
|
+
declare function validateReactPageProps(stack: AnyRec$7): ReactPropFinding[];
|
|
187
189
|
|
|
188
190
|
type SourceStyleSeverity = 'error' | 'warning';
|
|
189
191
|
interface SourceStyleFinding {
|
|
@@ -195,8 +197,8 @@ interface SourceStyleFinding {
|
|
|
195
197
|
hint: string;
|
|
196
198
|
}
|
|
197
199
|
declare const PAGE_SOURCE_CLASSNAME = "page-source-className-tailwind";
|
|
198
|
-
type AnyRec$
|
|
199
|
-
declare function validatePageSourceStyling(stack: AnyRec$
|
|
200
|
+
type AnyRec$6 = Record<string, unknown>;
|
|
201
|
+
declare function validatePageSourceStyling(stack: AnyRec$6): SourceStyleFinding[];
|
|
200
202
|
|
|
201
203
|
/**
|
|
202
204
|
* Build-time record-title diagnostics (ADR-0079).
|
|
@@ -240,14 +242,14 @@ interface RecordTitleFinding {
|
|
|
240
242
|
/** How to fix it. */
|
|
241
243
|
hint: string;
|
|
242
244
|
}
|
|
243
|
-
type AnyRec$
|
|
245
|
+
type AnyRec$5 = Record<string, unknown>;
|
|
244
246
|
/**
|
|
245
247
|
* Validate every object's record-title declaration. Returns the list of
|
|
246
248
|
* findings (empty = clean). Both rules are advisory (`warning`): the caller
|
|
247
249
|
* must never fail the build on them alone — auto-provision + the `Record #<id>`
|
|
248
250
|
* floor guarantee a resolvable title at runtime.
|
|
249
251
|
*/
|
|
250
|
-
declare function validateRecordTitle(stack: AnyRec$
|
|
252
|
+
declare function validateRecordTitle(stack: AnyRec$5): RecordTitleFinding[];
|
|
251
253
|
|
|
252
254
|
/**
|
|
253
255
|
* Build-time semantic-role diagnostics (ADR-0085).
|
|
@@ -284,13 +286,13 @@ interface SemanticRoleFinding {
|
|
|
284
286
|
/** How to fix it. */
|
|
285
287
|
hint: string;
|
|
286
288
|
}
|
|
287
|
-
type AnyRec$
|
|
289
|
+
type AnyRec$4 = Record<string, unknown>;
|
|
288
290
|
/**
|
|
289
291
|
* Validate every object's semantic-role pointers. Returns the list of
|
|
290
292
|
* findings (empty = clean). Advisory only — the caller must never fail the
|
|
291
293
|
* build on these alone.
|
|
292
294
|
*/
|
|
293
|
-
declare function validateSemanticRoles(stack: AnyRec$
|
|
295
|
+
declare function validateSemanticRoles(stack: AnyRec$4): SemanticRoleFinding[];
|
|
294
296
|
|
|
295
297
|
/**
|
|
296
298
|
* Build-time form-layout diagnostics (#2578).
|
|
@@ -333,11 +335,86 @@ interface FormLayoutFinding {
|
|
|
333
335
|
/** How to fix it. */
|
|
334
336
|
hint: string;
|
|
335
337
|
}
|
|
336
|
-
type AnyRec = Record<string, unknown>;
|
|
338
|
+
type AnyRec$3 = Record<string, unknown>;
|
|
337
339
|
/**
|
|
338
340
|
* Validate authored form-view layout. Returns findings (empty = clean).
|
|
339
341
|
* Advisory only — the caller must never fail the build on these alone.
|
|
340
342
|
*/
|
|
341
|
-
declare function validateFormLayout(stack: AnyRec): FormLayoutFinding[];
|
|
343
|
+
declare function validateFormLayout(stack: AnyRec$3): FormLayoutFinding[];
|
|
344
|
+
|
|
345
|
+
declare const CAPABILITY_REFERENCE_UNKNOWN = "capability-reference-unknown";
|
|
346
|
+
type CapabilityRefSeverity = 'error' | 'warning';
|
|
347
|
+
interface CapabilityRefFinding {
|
|
348
|
+
/** Always `warning` — the reference fails closed at runtime (see module note). */
|
|
349
|
+
severity: CapabilityRefSeverity;
|
|
350
|
+
/** Diagnostic rule id. */
|
|
351
|
+
rule: string;
|
|
352
|
+
/** Human-readable location, e.g. `object "sys_license"`. */
|
|
353
|
+
where: string;
|
|
354
|
+
/** Config path, e.g. `objects[3].requiredPermissions`. */
|
|
355
|
+
path: string;
|
|
356
|
+
/** What is wrong. */
|
|
357
|
+
message: string;
|
|
358
|
+
/** How to fix it. */
|
|
359
|
+
hint: string;
|
|
360
|
+
}
|
|
361
|
+
type AnyRec$2 = Record<string, unknown>;
|
|
362
|
+
/**
|
|
363
|
+
* Validate every capability reference in a stack. Returns findings (empty =
|
|
364
|
+
* clean). Advisory only — callers must not fail the build on these alone.
|
|
365
|
+
*/
|
|
366
|
+
declare function validateCapabilityReferences(stack: AnyRec$2): CapabilityRefFinding[];
|
|
367
|
+
|
|
368
|
+
declare const SECURITY_OWD_UNSET = "security-owd-unset";
|
|
369
|
+
declare const SECURITY_OWD_ALIAS = "security-owd-alias";
|
|
370
|
+
declare const SECURITY_EXTERNAL_WIDER = "security-external-wider-than-internal";
|
|
371
|
+
declare const SECURITY_WILDCARD_VAMA = "security-wildcard-vama";
|
|
372
|
+
declare const SECURITY_ANCHOR_HIGH_PRIVILEGE = "security-anchor-high-privilege";
|
|
373
|
+
declare const SECURITY_ROLE_WORD = "security-role-word";
|
|
374
|
+
declare const SECURITY_PRIVATE_NO_READSCOPE = "security-private-no-readscope";
|
|
375
|
+
type SecuritySeverity = 'error' | 'warning' | 'info';
|
|
376
|
+
interface SecurityFinding {
|
|
377
|
+
severity: SecuritySeverity;
|
|
378
|
+
/** Diagnostic rule id (`security-*`). */
|
|
379
|
+
rule: string;
|
|
380
|
+
/** Human-readable location, e.g. `object "leave_request"`. */
|
|
381
|
+
where: string;
|
|
382
|
+
/** Config path, e.g. `objects[3].sharingModel`. */
|
|
383
|
+
path: string;
|
|
384
|
+
/** What is wrong. */
|
|
385
|
+
message: string;
|
|
386
|
+
/** How to fix it. */
|
|
387
|
+
hint: string;
|
|
388
|
+
}
|
|
389
|
+
type AnyRec$1 = Record<string, unknown>;
|
|
390
|
+
/**
|
|
391
|
+
* Validate the security posture of a stack. Returns findings (empty = clean).
|
|
392
|
+
* `error` findings gate the build in `os compile`; `info` is advisory.
|
|
393
|
+
*/
|
|
394
|
+
declare function validateSecurityPosture(stack: AnyRec$1): SecurityFinding[];
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* [ADR-0090 D6] Access-matrix snapshot — authoring-time companion to the
|
|
398
|
+
* runtime explain engine.
|
|
399
|
+
*
|
|
400
|
+
* `buildAccessMatrix(stack)` derives, PURELY from metadata, one row per
|
|
401
|
+
* (permission set × object) the stack declares: the CRUD/VAMA bits, the
|
|
402
|
+
* depth axes, and the object's OWD for context. The matrix is snapshotted to
|
|
403
|
+
* `access-matrix.json` and diffed on every compile: an unchanged matrix
|
|
404
|
+
* auto-passes; a changed one fails the build until the snapshot is updated —
|
|
405
|
+
* so every capability change becomes a REVIEWABLE, semantic diff
|
|
406
|
+
* ("`crm_admin` gains delete on `crm_lead`") instead of a buried JSON hunk.
|
|
407
|
+
* This is the publish-gate substrate the AI-authoring safety story needs:
|
|
408
|
+
* AI may draft grants freely; it cannot silently change who can do what.
|
|
409
|
+
*/
|
|
410
|
+
|
|
411
|
+
type AnyRec = Record<string, unknown>;
|
|
412
|
+
/** Build the sorted access matrix for a normalized stack. */
|
|
413
|
+
declare function buildAccessMatrix(stack: AnyRec): AccessMatrix;
|
|
414
|
+
/**
|
|
415
|
+
* Semantic diff between two matrices — human-review lines, empty = identical.
|
|
416
|
+
* Ordered: removals, additions, then per-entry bit/scope changes.
|
|
417
|
+
*/
|
|
418
|
+
declare function diffAccessMatrix(before: AccessMatrix, after: AccessMatrix): string[];
|
|
342
419
|
|
|
343
|
-
export { CHART_CONFIG_MISSING, CHART_FIELD_UNKNOWN, type ExprIssue, FIELD_GROUP_EMPTY, FIELD_GROUP_UNDECLARED, FORM_COLSPAN_ABSOLUTE, FORM_FIELD_UNKNOWN, type FormLayoutFinding, type FormLayoutSeverity, type JsxPageFinding, type JsxPageSeverity, LIST_VIEW_FILTERS_IN_VIEWS_MODE, type ListViewModeFinding, type ListViewModeSeverity, MEASURE_AGGREGATE_INCOHERENT, PAGE_SOURCE_CLASSNAME, type ReactPageFinding, type ReactPageSeverity, type ReactPropFinding, type ReactPropSeverity, type RecordTitleFinding, type RecordTitleSeverity, SEMANTIC_ROLE_FIELD_UNKNOWN, STYLE_CLASSNAME_TAILWIND, STYLE_NODE_MISSING_ID, STYLE_RESPONSIVE_NO_BASE, STYLE_UNKNOWN_CSS_PROPERTY, STYLE_UNKNOWN_TOKEN, type SemanticRoleFinding, type SemanticRoleSeverity, type SourceStyleFinding, type SourceStyleSeverity, type StyleFinding, type StyleSeverity, TABLE_COUNT_ONLY, TITLE_FORMAT_RETIRED, TITLE_UNRESOLVABLE, WIDGET_DATASET_UNKNOWN, WIDGET_DIMENSION_UNKNOWN, WIDGET_MEASURE_UNKNOWN, type WidgetBindingFinding, type WidgetBindingSeverity, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSemanticRoles, validateStackExpressions, validateWidgetBindings };
|
|
420
|
+
export { CAPABILITY_REFERENCE_UNKNOWN, CHART_CONFIG_MISSING, CHART_FIELD_UNKNOWN, type CapabilityRefFinding, type CapabilityRefSeverity, type ExprIssue, FIELD_GROUP_EMPTY, FIELD_GROUP_UNDECLARED, FORM_COLSPAN_ABSOLUTE, FORM_FIELD_UNKNOWN, type FormLayoutFinding, type FormLayoutSeverity, type JsxPageFinding, type JsxPageSeverity, LIST_VIEW_FILTERS_IN_VIEWS_MODE, type ListViewModeFinding, type ListViewModeSeverity, MEASURE_AGGREGATE_INCOHERENT, PAGE_SOURCE_CLASSNAME, type ReactPageFinding, type ReactPageSeverity, type ReactPropFinding, type ReactPropSeverity, type RecordTitleFinding, type RecordTitleSeverity, SECURITY_ANCHOR_HIGH_PRIVILEGE, SECURITY_EXTERNAL_WIDER, SECURITY_OWD_ALIAS, SECURITY_OWD_UNSET, SECURITY_PRIVATE_NO_READSCOPE, SECURITY_ROLE_WORD, SECURITY_WILDCARD_VAMA, SEMANTIC_ROLE_FIELD_UNKNOWN, STYLE_CLASSNAME_TAILWIND, STYLE_NODE_MISSING_ID, STYLE_RESPONSIVE_NO_BASE, STYLE_UNKNOWN_CSS_PROPERTY, STYLE_UNKNOWN_TOKEN, type SecurityFinding, type SecuritySeverity, type SemanticRoleFinding, type SemanticRoleSeverity, type SourceStyleFinding, type SourceStyleSeverity, type StyleFinding, type StyleSeverity, TABLE_COUNT_ONLY, TITLE_FORMAT_RETIRED, TITLE_UNRESOLVABLE, WIDGET_DATASET_UNKNOWN, WIDGET_DIMENSION_UNKNOWN, WIDGET_MEASURE_UNKNOWN, type WidgetBindingFinding, type WidgetBindingSeverity, buildAccessMatrix, diffAccessMatrix, validateCapabilityReferences, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSecurityPosture, validateSemanticRoles, validateStackExpressions, validateWidgetBindings };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Manifest } from '@objectstack/sdui-parser';
|
|
2
|
+
import { AccessMatrix } from '@objectstack/spec/security';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Build-time dashboard widget binding diagnostics (issues #1719, #1721).
|
|
@@ -69,7 +70,7 @@ interface WidgetBindingFinding {
|
|
|
69
70
|
/** How to fix (or deliberately suppress) it. */
|
|
70
71
|
hint: string;
|
|
71
72
|
}
|
|
72
|
-
type AnyRec$
|
|
73
|
+
type AnyRec$d = Record<string, unknown>;
|
|
73
74
|
/**
|
|
74
75
|
* Validate every dashboard widget's dataset binding. Returns the list of
|
|
75
76
|
* findings (empty = clean). Caller decides how to surface them: `error`
|
|
@@ -77,7 +78,7 @@ type AnyRec$a = Record<string, unknown>;
|
|
|
77
78
|
* should fail validate/build; `warning` findings are advisory and must
|
|
78
79
|
* never fail the build on their own.
|
|
79
80
|
*/
|
|
80
|
-
declare function validateWidgetBindings(stack: AnyRec$
|
|
81
|
+
declare function validateWidgetBindings(stack: AnyRec$d): WidgetBindingFinding[];
|
|
81
82
|
|
|
82
83
|
interface ExprIssue {
|
|
83
84
|
where: string;
|
|
@@ -90,12 +91,12 @@ interface ExprIssue {
|
|
|
90
91
|
*/
|
|
91
92
|
severity?: 'error' | 'warning';
|
|
92
93
|
}
|
|
93
|
-
type AnyRec$
|
|
94
|
+
type AnyRec$c = Record<string, unknown>;
|
|
94
95
|
/**
|
|
95
96
|
* Validate every predicate in the stack. Returns the list of issues (empty =
|
|
96
97
|
* clean). Caller decides how to surface / whether to fail the build.
|
|
97
98
|
*/
|
|
98
|
-
declare function validateStackExpressions(stack: AnyRec$
|
|
99
|
+
declare function validateStackExpressions(stack: AnyRec$c): ExprIssue[];
|
|
99
100
|
|
|
100
101
|
type ListViewModeSeverity = 'error' | 'warning';
|
|
101
102
|
interface ListViewModeFinding {
|
|
@@ -109,16 +110,17 @@ interface ListViewModeFinding {
|
|
|
109
110
|
hint: string;
|
|
110
111
|
}
|
|
111
112
|
declare const LIST_VIEW_FILTERS_IN_VIEWS_MODE = "list-view-filters-in-views-mode";
|
|
112
|
-
type AnyRec$
|
|
113
|
+
type AnyRec$b = Record<string, unknown>;
|
|
113
114
|
/**
|
|
114
|
-
* Flag ADR-
|
|
115
|
-
*
|
|
116
|
-
* `
|
|
117
|
-
*
|
|
115
|
+
* Flag ADR-0047 "views" mode violations on an object's built-in named views or a
|
|
116
|
+
* `defineView` default `list` / named `listViews`: `quickFilters`, or a `tabs`
|
|
117
|
+
* `userFilters`. A `dropdown` `userFilters` is allowed and not flagged. Returns
|
|
118
|
+
* the list of findings (empty = clean). Caller decides how to surface / whether
|
|
119
|
+
* to fail the build.
|
|
118
120
|
*
|
|
119
121
|
* Feed the PRE-parse stack (normalizeStackInput output) — see file header.
|
|
120
122
|
*/
|
|
121
|
-
declare function validateListViewMode(stack: AnyRec$
|
|
123
|
+
declare function validateListViewMode(stack: AnyRec$b): ListViewModeFinding[];
|
|
122
124
|
|
|
123
125
|
type StyleSeverity = 'error' | 'warning';
|
|
124
126
|
interface StyleFinding {
|
|
@@ -136,14 +138,14 @@ declare const STYLE_CLASSNAME_TAILWIND = "style-classname-tailwind";
|
|
|
136
138
|
declare const STYLE_RESPONSIVE_NO_BASE = "style-responsive-no-base";
|
|
137
139
|
declare const STYLE_UNKNOWN_CSS_PROPERTY = "style-unknown-css-property";
|
|
138
140
|
declare const STYLE_UNKNOWN_TOKEN = "style-unknown-token";
|
|
139
|
-
type AnyRec$
|
|
141
|
+
type AnyRec$a = Record<string, unknown>;
|
|
140
142
|
/**
|
|
141
143
|
* Validate every page's component tree for SDUI styling correctness (ADR-0065).
|
|
142
144
|
* Returns findings (empty = clean). `error` findings describe styles that are
|
|
143
145
|
* silently dropped and should fail validate/build; `warning` findings are
|
|
144
146
|
* advisory (typos, drift, footguns).
|
|
145
147
|
*/
|
|
146
|
-
declare function validateResponsiveStyles(stack: AnyRec$
|
|
148
|
+
declare function validateResponsiveStyles(stack: AnyRec$a): StyleFinding[];
|
|
147
149
|
|
|
148
150
|
type JsxPageSeverity = 'error' | 'warning';
|
|
149
151
|
interface JsxPageFinding {
|
|
@@ -156,8 +158,8 @@ interface JsxPageFinding {
|
|
|
156
158
|
message: string;
|
|
157
159
|
hint: string;
|
|
158
160
|
}
|
|
159
|
-
type AnyRec$
|
|
160
|
-
declare function validateJsxPages(stack: AnyRec$
|
|
161
|
+
type AnyRec$9 = Record<string, unknown>;
|
|
162
|
+
declare function validateJsxPages(stack: AnyRec$9, opts?: {
|
|
161
163
|
manifest?: Manifest;
|
|
162
164
|
}): JsxPageFinding[];
|
|
163
165
|
|
|
@@ -170,8 +172,8 @@ interface ReactPageFinding {
|
|
|
170
172
|
message: string;
|
|
171
173
|
hint: string;
|
|
172
174
|
}
|
|
173
|
-
type AnyRec$
|
|
174
|
-
declare function validateReactPages(stack: AnyRec$
|
|
175
|
+
type AnyRec$8 = Record<string, unknown>;
|
|
176
|
+
declare function validateReactPages(stack: AnyRec$8): ReactPageFinding[];
|
|
175
177
|
|
|
176
178
|
type ReactPropSeverity = 'error' | 'warning';
|
|
177
179
|
interface ReactPropFinding {
|
|
@@ -182,8 +184,8 @@ interface ReactPropFinding {
|
|
|
182
184
|
message: string;
|
|
183
185
|
hint: string;
|
|
184
186
|
}
|
|
185
|
-
type AnyRec$
|
|
186
|
-
declare function validateReactPageProps(stack: AnyRec$
|
|
187
|
+
type AnyRec$7 = Record<string, unknown>;
|
|
188
|
+
declare function validateReactPageProps(stack: AnyRec$7): ReactPropFinding[];
|
|
187
189
|
|
|
188
190
|
type SourceStyleSeverity = 'error' | 'warning';
|
|
189
191
|
interface SourceStyleFinding {
|
|
@@ -195,8 +197,8 @@ interface SourceStyleFinding {
|
|
|
195
197
|
hint: string;
|
|
196
198
|
}
|
|
197
199
|
declare const PAGE_SOURCE_CLASSNAME = "page-source-className-tailwind";
|
|
198
|
-
type AnyRec$
|
|
199
|
-
declare function validatePageSourceStyling(stack: AnyRec$
|
|
200
|
+
type AnyRec$6 = Record<string, unknown>;
|
|
201
|
+
declare function validatePageSourceStyling(stack: AnyRec$6): SourceStyleFinding[];
|
|
200
202
|
|
|
201
203
|
/**
|
|
202
204
|
* Build-time record-title diagnostics (ADR-0079).
|
|
@@ -240,14 +242,14 @@ interface RecordTitleFinding {
|
|
|
240
242
|
/** How to fix it. */
|
|
241
243
|
hint: string;
|
|
242
244
|
}
|
|
243
|
-
type AnyRec$
|
|
245
|
+
type AnyRec$5 = Record<string, unknown>;
|
|
244
246
|
/**
|
|
245
247
|
* Validate every object's record-title declaration. Returns the list of
|
|
246
248
|
* findings (empty = clean). Both rules are advisory (`warning`): the caller
|
|
247
249
|
* must never fail the build on them alone — auto-provision + the `Record #<id>`
|
|
248
250
|
* floor guarantee a resolvable title at runtime.
|
|
249
251
|
*/
|
|
250
|
-
declare function validateRecordTitle(stack: AnyRec$
|
|
252
|
+
declare function validateRecordTitle(stack: AnyRec$5): RecordTitleFinding[];
|
|
251
253
|
|
|
252
254
|
/**
|
|
253
255
|
* Build-time semantic-role diagnostics (ADR-0085).
|
|
@@ -284,13 +286,13 @@ interface SemanticRoleFinding {
|
|
|
284
286
|
/** How to fix it. */
|
|
285
287
|
hint: string;
|
|
286
288
|
}
|
|
287
|
-
type AnyRec$
|
|
289
|
+
type AnyRec$4 = Record<string, unknown>;
|
|
288
290
|
/**
|
|
289
291
|
* Validate every object's semantic-role pointers. Returns the list of
|
|
290
292
|
* findings (empty = clean). Advisory only — the caller must never fail the
|
|
291
293
|
* build on these alone.
|
|
292
294
|
*/
|
|
293
|
-
declare function validateSemanticRoles(stack: AnyRec$
|
|
295
|
+
declare function validateSemanticRoles(stack: AnyRec$4): SemanticRoleFinding[];
|
|
294
296
|
|
|
295
297
|
/**
|
|
296
298
|
* Build-time form-layout diagnostics (#2578).
|
|
@@ -333,11 +335,86 @@ interface FormLayoutFinding {
|
|
|
333
335
|
/** How to fix it. */
|
|
334
336
|
hint: string;
|
|
335
337
|
}
|
|
336
|
-
type AnyRec = Record<string, unknown>;
|
|
338
|
+
type AnyRec$3 = Record<string, unknown>;
|
|
337
339
|
/**
|
|
338
340
|
* Validate authored form-view layout. Returns findings (empty = clean).
|
|
339
341
|
* Advisory only — the caller must never fail the build on these alone.
|
|
340
342
|
*/
|
|
341
|
-
declare function validateFormLayout(stack: AnyRec): FormLayoutFinding[];
|
|
343
|
+
declare function validateFormLayout(stack: AnyRec$3): FormLayoutFinding[];
|
|
344
|
+
|
|
345
|
+
declare const CAPABILITY_REFERENCE_UNKNOWN = "capability-reference-unknown";
|
|
346
|
+
type CapabilityRefSeverity = 'error' | 'warning';
|
|
347
|
+
interface CapabilityRefFinding {
|
|
348
|
+
/** Always `warning` — the reference fails closed at runtime (see module note). */
|
|
349
|
+
severity: CapabilityRefSeverity;
|
|
350
|
+
/** Diagnostic rule id. */
|
|
351
|
+
rule: string;
|
|
352
|
+
/** Human-readable location, e.g. `object "sys_license"`. */
|
|
353
|
+
where: string;
|
|
354
|
+
/** Config path, e.g. `objects[3].requiredPermissions`. */
|
|
355
|
+
path: string;
|
|
356
|
+
/** What is wrong. */
|
|
357
|
+
message: string;
|
|
358
|
+
/** How to fix it. */
|
|
359
|
+
hint: string;
|
|
360
|
+
}
|
|
361
|
+
type AnyRec$2 = Record<string, unknown>;
|
|
362
|
+
/**
|
|
363
|
+
* Validate every capability reference in a stack. Returns findings (empty =
|
|
364
|
+
* clean). Advisory only — callers must not fail the build on these alone.
|
|
365
|
+
*/
|
|
366
|
+
declare function validateCapabilityReferences(stack: AnyRec$2): CapabilityRefFinding[];
|
|
367
|
+
|
|
368
|
+
declare const SECURITY_OWD_UNSET = "security-owd-unset";
|
|
369
|
+
declare const SECURITY_OWD_ALIAS = "security-owd-alias";
|
|
370
|
+
declare const SECURITY_EXTERNAL_WIDER = "security-external-wider-than-internal";
|
|
371
|
+
declare const SECURITY_WILDCARD_VAMA = "security-wildcard-vama";
|
|
372
|
+
declare const SECURITY_ANCHOR_HIGH_PRIVILEGE = "security-anchor-high-privilege";
|
|
373
|
+
declare const SECURITY_ROLE_WORD = "security-role-word";
|
|
374
|
+
declare const SECURITY_PRIVATE_NO_READSCOPE = "security-private-no-readscope";
|
|
375
|
+
type SecuritySeverity = 'error' | 'warning' | 'info';
|
|
376
|
+
interface SecurityFinding {
|
|
377
|
+
severity: SecuritySeverity;
|
|
378
|
+
/** Diagnostic rule id (`security-*`). */
|
|
379
|
+
rule: string;
|
|
380
|
+
/** Human-readable location, e.g. `object "leave_request"`. */
|
|
381
|
+
where: string;
|
|
382
|
+
/** Config path, e.g. `objects[3].sharingModel`. */
|
|
383
|
+
path: string;
|
|
384
|
+
/** What is wrong. */
|
|
385
|
+
message: string;
|
|
386
|
+
/** How to fix it. */
|
|
387
|
+
hint: string;
|
|
388
|
+
}
|
|
389
|
+
type AnyRec$1 = Record<string, unknown>;
|
|
390
|
+
/**
|
|
391
|
+
* Validate the security posture of a stack. Returns findings (empty = clean).
|
|
392
|
+
* `error` findings gate the build in `os compile`; `info` is advisory.
|
|
393
|
+
*/
|
|
394
|
+
declare function validateSecurityPosture(stack: AnyRec$1): SecurityFinding[];
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* [ADR-0090 D6] Access-matrix snapshot — authoring-time companion to the
|
|
398
|
+
* runtime explain engine.
|
|
399
|
+
*
|
|
400
|
+
* `buildAccessMatrix(stack)` derives, PURELY from metadata, one row per
|
|
401
|
+
* (permission set × object) the stack declares: the CRUD/VAMA bits, the
|
|
402
|
+
* depth axes, and the object's OWD for context. The matrix is snapshotted to
|
|
403
|
+
* `access-matrix.json` and diffed on every compile: an unchanged matrix
|
|
404
|
+
* auto-passes; a changed one fails the build until the snapshot is updated —
|
|
405
|
+
* so every capability change becomes a REVIEWABLE, semantic diff
|
|
406
|
+
* ("`crm_admin` gains delete on `crm_lead`") instead of a buried JSON hunk.
|
|
407
|
+
* This is the publish-gate substrate the AI-authoring safety story needs:
|
|
408
|
+
* AI may draft grants freely; it cannot silently change who can do what.
|
|
409
|
+
*/
|
|
410
|
+
|
|
411
|
+
type AnyRec = Record<string, unknown>;
|
|
412
|
+
/** Build the sorted access matrix for a normalized stack. */
|
|
413
|
+
declare function buildAccessMatrix(stack: AnyRec): AccessMatrix;
|
|
414
|
+
/**
|
|
415
|
+
* Semantic diff between two matrices — human-review lines, empty = identical.
|
|
416
|
+
* Ordered: removals, additions, then per-entry bit/scope changes.
|
|
417
|
+
*/
|
|
418
|
+
declare function diffAccessMatrix(before: AccessMatrix, after: AccessMatrix): string[];
|
|
342
419
|
|
|
343
|
-
export { CHART_CONFIG_MISSING, CHART_FIELD_UNKNOWN, type ExprIssue, FIELD_GROUP_EMPTY, FIELD_GROUP_UNDECLARED, FORM_COLSPAN_ABSOLUTE, FORM_FIELD_UNKNOWN, type FormLayoutFinding, type FormLayoutSeverity, type JsxPageFinding, type JsxPageSeverity, LIST_VIEW_FILTERS_IN_VIEWS_MODE, type ListViewModeFinding, type ListViewModeSeverity, MEASURE_AGGREGATE_INCOHERENT, PAGE_SOURCE_CLASSNAME, type ReactPageFinding, type ReactPageSeverity, type ReactPropFinding, type ReactPropSeverity, type RecordTitleFinding, type RecordTitleSeverity, SEMANTIC_ROLE_FIELD_UNKNOWN, STYLE_CLASSNAME_TAILWIND, STYLE_NODE_MISSING_ID, STYLE_RESPONSIVE_NO_BASE, STYLE_UNKNOWN_CSS_PROPERTY, STYLE_UNKNOWN_TOKEN, type SemanticRoleFinding, type SemanticRoleSeverity, type SourceStyleFinding, type SourceStyleSeverity, type StyleFinding, type StyleSeverity, TABLE_COUNT_ONLY, TITLE_FORMAT_RETIRED, TITLE_UNRESOLVABLE, WIDGET_DATASET_UNKNOWN, WIDGET_DIMENSION_UNKNOWN, WIDGET_MEASURE_UNKNOWN, type WidgetBindingFinding, type WidgetBindingSeverity, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSemanticRoles, validateStackExpressions, validateWidgetBindings };
|
|
420
|
+
export { CAPABILITY_REFERENCE_UNKNOWN, CHART_CONFIG_MISSING, CHART_FIELD_UNKNOWN, type CapabilityRefFinding, type CapabilityRefSeverity, type ExprIssue, FIELD_GROUP_EMPTY, FIELD_GROUP_UNDECLARED, FORM_COLSPAN_ABSOLUTE, FORM_FIELD_UNKNOWN, type FormLayoutFinding, type FormLayoutSeverity, type JsxPageFinding, type JsxPageSeverity, LIST_VIEW_FILTERS_IN_VIEWS_MODE, type ListViewModeFinding, type ListViewModeSeverity, MEASURE_AGGREGATE_INCOHERENT, PAGE_SOURCE_CLASSNAME, type ReactPageFinding, type ReactPageSeverity, type ReactPropFinding, type ReactPropSeverity, type RecordTitleFinding, type RecordTitleSeverity, SECURITY_ANCHOR_HIGH_PRIVILEGE, SECURITY_EXTERNAL_WIDER, SECURITY_OWD_ALIAS, SECURITY_OWD_UNSET, SECURITY_PRIVATE_NO_READSCOPE, SECURITY_ROLE_WORD, SECURITY_WILDCARD_VAMA, SEMANTIC_ROLE_FIELD_UNKNOWN, STYLE_CLASSNAME_TAILWIND, STYLE_NODE_MISSING_ID, STYLE_RESPONSIVE_NO_BASE, STYLE_UNKNOWN_CSS_PROPERTY, STYLE_UNKNOWN_TOKEN, type SecurityFinding, type SecuritySeverity, type SemanticRoleFinding, type SemanticRoleSeverity, type SourceStyleFinding, type SourceStyleSeverity, type StyleFinding, type StyleSeverity, TABLE_COUNT_ONLY, TITLE_FORMAT_RETIRED, TITLE_UNRESOLVABLE, WIDGET_DATASET_UNKNOWN, WIDGET_DIMENSION_UNKNOWN, WIDGET_MEASURE_UNKNOWN, type WidgetBindingFinding, type WidgetBindingSeverity, buildAccessMatrix, diffAccessMatrix, validateCapabilityReferences, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSecurityPosture, validateSemanticRoles, validateStackExpressions, validateWidgetBindings };
|