@objectstack/lint 12.6.0 → 14.3.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 +593 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +124 -23
- package/dist/index.d.ts +124 -23
- package/dist/index.js +576 -0
- 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$e = 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$e): 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$d = 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$d): ExprIssue[];
|
|
99
100
|
|
|
100
101
|
type ListViewModeSeverity = 'error' | 'warning';
|
|
101
102
|
interface ListViewModeFinding {
|
|
@@ -109,7 +110,7 @@ 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$c = Record<string, unknown>;
|
|
113
114
|
/**
|
|
114
115
|
* Flag ADR-0047 "views" mode violations on an object's built-in named views or a
|
|
115
116
|
* `defineView` default `list` / named `listViews`: `quickFilters`, or a `tabs`
|
|
@@ -119,7 +120,7 @@ type AnyRec$8 = Record<string, unknown>;
|
|
|
119
120
|
*
|
|
120
121
|
* Feed the PRE-parse stack (normalizeStackInput output) — see file header.
|
|
121
122
|
*/
|
|
122
|
-
declare function validateListViewMode(stack: AnyRec$
|
|
123
|
+
declare function validateListViewMode(stack: AnyRec$c): ListViewModeFinding[];
|
|
123
124
|
|
|
124
125
|
type StyleSeverity = 'error' | 'warning';
|
|
125
126
|
interface StyleFinding {
|
|
@@ -137,14 +138,14 @@ declare const STYLE_CLASSNAME_TAILWIND = "style-classname-tailwind";
|
|
|
137
138
|
declare const STYLE_RESPONSIVE_NO_BASE = "style-responsive-no-base";
|
|
138
139
|
declare const STYLE_UNKNOWN_CSS_PROPERTY = "style-unknown-css-property";
|
|
139
140
|
declare const STYLE_UNKNOWN_TOKEN = "style-unknown-token";
|
|
140
|
-
type AnyRec$
|
|
141
|
+
type AnyRec$b = Record<string, unknown>;
|
|
141
142
|
/**
|
|
142
143
|
* Validate every page's component tree for SDUI styling correctness (ADR-0065).
|
|
143
144
|
* Returns findings (empty = clean). `error` findings describe styles that are
|
|
144
145
|
* silently dropped and should fail validate/build; `warning` findings are
|
|
145
146
|
* advisory (typos, drift, footguns).
|
|
146
147
|
*/
|
|
147
|
-
declare function validateResponsiveStyles(stack: AnyRec$
|
|
148
|
+
declare function validateResponsiveStyles(stack: AnyRec$b): StyleFinding[];
|
|
148
149
|
|
|
149
150
|
type JsxPageSeverity = 'error' | 'warning';
|
|
150
151
|
interface JsxPageFinding {
|
|
@@ -157,8 +158,8 @@ interface JsxPageFinding {
|
|
|
157
158
|
message: string;
|
|
158
159
|
hint: string;
|
|
159
160
|
}
|
|
160
|
-
type AnyRec$
|
|
161
|
-
declare function validateJsxPages(stack: AnyRec$
|
|
161
|
+
type AnyRec$a = Record<string, unknown>;
|
|
162
|
+
declare function validateJsxPages(stack: AnyRec$a, opts?: {
|
|
162
163
|
manifest?: Manifest;
|
|
163
164
|
}): JsxPageFinding[];
|
|
164
165
|
|
|
@@ -171,8 +172,8 @@ interface ReactPageFinding {
|
|
|
171
172
|
message: string;
|
|
172
173
|
hint: string;
|
|
173
174
|
}
|
|
174
|
-
type AnyRec$
|
|
175
|
-
declare function validateReactPages(stack: AnyRec$
|
|
175
|
+
type AnyRec$9 = Record<string, unknown>;
|
|
176
|
+
declare function validateReactPages(stack: AnyRec$9): ReactPageFinding[];
|
|
176
177
|
|
|
177
178
|
type ReactPropSeverity = 'error' | 'warning';
|
|
178
179
|
interface ReactPropFinding {
|
|
@@ -183,8 +184,8 @@ interface ReactPropFinding {
|
|
|
183
184
|
message: string;
|
|
184
185
|
hint: string;
|
|
185
186
|
}
|
|
186
|
-
type AnyRec$
|
|
187
|
-
declare function validateReactPageProps(stack: AnyRec$
|
|
187
|
+
type AnyRec$8 = Record<string, unknown>;
|
|
188
|
+
declare function validateReactPageProps(stack: AnyRec$8): ReactPropFinding[];
|
|
188
189
|
|
|
189
190
|
type SourceStyleSeverity = 'error' | 'warning';
|
|
190
191
|
interface SourceStyleFinding {
|
|
@@ -196,8 +197,8 @@ interface SourceStyleFinding {
|
|
|
196
197
|
hint: string;
|
|
197
198
|
}
|
|
198
199
|
declare const PAGE_SOURCE_CLASSNAME = "page-source-className-tailwind";
|
|
199
|
-
type AnyRec$
|
|
200
|
-
declare function validatePageSourceStyling(stack: AnyRec$
|
|
200
|
+
type AnyRec$7 = Record<string, unknown>;
|
|
201
|
+
declare function validatePageSourceStyling(stack: AnyRec$7): SourceStyleFinding[];
|
|
201
202
|
|
|
202
203
|
/**
|
|
203
204
|
* Build-time record-title diagnostics (ADR-0079).
|
|
@@ -241,14 +242,14 @@ interface RecordTitleFinding {
|
|
|
241
242
|
/** How to fix it. */
|
|
242
243
|
hint: string;
|
|
243
244
|
}
|
|
244
|
-
type AnyRec$
|
|
245
|
+
type AnyRec$6 = Record<string, unknown>;
|
|
245
246
|
/**
|
|
246
247
|
* Validate every object's record-title declaration. Returns the list of
|
|
247
248
|
* findings (empty = clean). Both rules are advisory (`warning`): the caller
|
|
248
249
|
* must never fail the build on them alone — auto-provision + the `Record #<id>`
|
|
249
250
|
* floor guarantee a resolvable title at runtime.
|
|
250
251
|
*/
|
|
251
|
-
declare function validateRecordTitle(stack: AnyRec$
|
|
252
|
+
declare function validateRecordTitle(stack: AnyRec$6): RecordTitleFinding[];
|
|
252
253
|
|
|
253
254
|
/**
|
|
254
255
|
* Build-time semantic-role diagnostics (ADR-0085).
|
|
@@ -285,13 +286,13 @@ interface SemanticRoleFinding {
|
|
|
285
286
|
/** How to fix it. */
|
|
286
287
|
hint: string;
|
|
287
288
|
}
|
|
288
|
-
type AnyRec$
|
|
289
|
+
type AnyRec$5 = Record<string, unknown>;
|
|
289
290
|
/**
|
|
290
291
|
* Validate every object's semantic-role pointers. Returns the list of
|
|
291
292
|
* findings (empty = clean). Advisory only — the caller must never fail the
|
|
292
293
|
* build on these alone.
|
|
293
294
|
*/
|
|
294
|
-
declare function validateSemanticRoles(stack: AnyRec$
|
|
295
|
+
declare function validateSemanticRoles(stack: AnyRec$5): SemanticRoleFinding[];
|
|
295
296
|
|
|
296
297
|
/**
|
|
297
298
|
* Build-time form-layout diagnostics (#2578).
|
|
@@ -334,11 +335,111 @@ interface FormLayoutFinding {
|
|
|
334
335
|
/** How to fix it. */
|
|
335
336
|
hint: string;
|
|
336
337
|
}
|
|
337
|
-
type AnyRec = Record<string, unknown>;
|
|
338
|
+
type AnyRec$4 = Record<string, unknown>;
|
|
338
339
|
/**
|
|
339
340
|
* Validate authored form-view layout. Returns findings (empty = clean).
|
|
340
341
|
* Advisory only — the caller must never fail the build on these alone.
|
|
341
342
|
*/
|
|
342
|
-
declare function validateFormLayout(stack: AnyRec): FormLayoutFinding[];
|
|
343
|
+
declare function validateFormLayout(stack: AnyRec$4): 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$3 = 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$3): CapabilityRefFinding[];
|
|
367
|
+
|
|
368
|
+
declare const APPROVAL_ROLE_NOT_MEMBERSHIP_TIER = "approval-role-not-membership-tier";
|
|
369
|
+
declare const APPROVAL_APPROVER_TYPE_UNKNOWN = "approval-approver-type-unknown";
|
|
370
|
+
declare const APPROVAL_ESCALATION_REASSIGN_NO_TARGET = "approval-escalation-reassign-no-target";
|
|
371
|
+
type ApprovalApproverSeverity = 'error' | 'warning' | 'info';
|
|
372
|
+
interface ApprovalApproverFinding {
|
|
373
|
+
severity: ApprovalApproverSeverity;
|
|
374
|
+
/** Diagnostic rule id (`approval-*`). */
|
|
375
|
+
rule: string;
|
|
376
|
+
/** Human-readable location, e.g. `flow "expense_approval" · node "step1"`. */
|
|
377
|
+
where: string;
|
|
378
|
+
/** Config path, e.g. `flows[0].nodes[2].config.approvers[0]`. */
|
|
379
|
+
path: string;
|
|
380
|
+
/** What is wrong. */
|
|
381
|
+
message: string;
|
|
382
|
+
/** How to fix it. */
|
|
383
|
+
hint: string;
|
|
384
|
+
}
|
|
385
|
+
type AnyRec$2 = Record<string, unknown>;
|
|
386
|
+
/**
|
|
387
|
+
* Validate the approvers of every Approval node in the stack's flows.
|
|
388
|
+
* Returns findings (empty = clean).
|
|
389
|
+
*/
|
|
390
|
+
declare function validateApprovalApprovers(stack: AnyRec$2): ApprovalApproverFinding[];
|
|
391
|
+
|
|
392
|
+
declare const SECURITY_OWD_UNSET = "security-owd-unset";
|
|
393
|
+
declare const SECURITY_OWD_ALIAS = "security-owd-alias";
|
|
394
|
+
declare const SECURITY_EXTERNAL_WIDER = "security-external-wider-than-internal";
|
|
395
|
+
declare const SECURITY_WILDCARD_VAMA = "security-wildcard-vama";
|
|
396
|
+
declare const SECURITY_ANCHOR_HIGH_PRIVILEGE = "security-anchor-high-privilege";
|
|
397
|
+
declare const SECURITY_ROLE_WORD = "security-role-word";
|
|
398
|
+
declare const SECURITY_BOOK_AUDIENCE_UNKNOWN_SET = "security-book-audience-unknown-set";
|
|
399
|
+
declare const SECURITY_PRIVATE_NO_READSCOPE = "security-private-no-readscope";
|
|
400
|
+
type SecuritySeverity = 'error' | 'warning' | 'info';
|
|
401
|
+
interface SecurityFinding {
|
|
402
|
+
severity: SecuritySeverity;
|
|
403
|
+
/** Diagnostic rule id (`security-*`). */
|
|
404
|
+
rule: string;
|
|
405
|
+
/** Human-readable location, e.g. `object "leave_request"`. */
|
|
406
|
+
where: string;
|
|
407
|
+
/** Config path, e.g. `objects[3].sharingModel`. */
|
|
408
|
+
path: string;
|
|
409
|
+
/** What is wrong. */
|
|
410
|
+
message: string;
|
|
411
|
+
/** How to fix it. */
|
|
412
|
+
hint: string;
|
|
413
|
+
}
|
|
414
|
+
type AnyRec$1 = Record<string, unknown>;
|
|
415
|
+
/**
|
|
416
|
+
* Validate the security posture of a stack. Returns findings (empty = clean).
|
|
417
|
+
* `error` findings gate the build in `os compile`; `info` is advisory.
|
|
418
|
+
*/
|
|
419
|
+
declare function validateSecurityPosture(stack: AnyRec$1): SecurityFinding[];
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* [ADR-0090 D6] Access-matrix snapshot — authoring-time companion to the
|
|
423
|
+
* runtime explain engine.
|
|
424
|
+
*
|
|
425
|
+
* `buildAccessMatrix(stack)` derives, PURELY from metadata, one row per
|
|
426
|
+
* (permission set × object) the stack declares: the CRUD/VAMA bits, the
|
|
427
|
+
* depth axes, and the object's OWD for context. The matrix is snapshotted to
|
|
428
|
+
* `access-matrix.json` and diffed on every compile: an unchanged matrix
|
|
429
|
+
* auto-passes; a changed one fails the build until the snapshot is updated —
|
|
430
|
+
* so every capability change becomes a REVIEWABLE, semantic diff
|
|
431
|
+
* ("`crm_admin` gains delete on `crm_lead`") instead of a buried JSON hunk.
|
|
432
|
+
* This is the publish-gate substrate the AI-authoring safety story needs:
|
|
433
|
+
* AI may draft grants freely; it cannot silently change who can do what.
|
|
434
|
+
*/
|
|
435
|
+
|
|
436
|
+
type AnyRec = Record<string, unknown>;
|
|
437
|
+
/** Build the sorted access matrix for a normalized stack. */
|
|
438
|
+
declare function buildAccessMatrix(stack: AnyRec): AccessMatrix;
|
|
439
|
+
/**
|
|
440
|
+
* Semantic diff between two matrices — human-review lines, empty = identical.
|
|
441
|
+
* Ordered: removals, additions, then per-entry bit/scope changes.
|
|
442
|
+
*/
|
|
443
|
+
declare function diffAccessMatrix(before: AccessMatrix, after: AccessMatrix): string[];
|
|
343
444
|
|
|
344
|
-
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 };
|
|
445
|
+
export { APPROVAL_APPROVER_TYPE_UNKNOWN, APPROVAL_ESCALATION_REASSIGN_NO_TARGET, APPROVAL_ROLE_NOT_MEMBERSHIP_TIER, type ApprovalApproverFinding, type ApprovalApproverSeverity, 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_BOOK_AUDIENCE_UNKNOWN_SET, 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, validateApprovalApprovers, 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$e = 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$e): 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$d = 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$d): ExprIssue[];
|
|
99
100
|
|
|
100
101
|
type ListViewModeSeverity = 'error' | 'warning';
|
|
101
102
|
interface ListViewModeFinding {
|
|
@@ -109,7 +110,7 @@ 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$c = Record<string, unknown>;
|
|
113
114
|
/**
|
|
114
115
|
* Flag ADR-0047 "views" mode violations on an object's built-in named views or a
|
|
115
116
|
* `defineView` default `list` / named `listViews`: `quickFilters`, or a `tabs`
|
|
@@ -119,7 +120,7 @@ type AnyRec$8 = Record<string, unknown>;
|
|
|
119
120
|
*
|
|
120
121
|
* Feed the PRE-parse stack (normalizeStackInput output) — see file header.
|
|
121
122
|
*/
|
|
122
|
-
declare function validateListViewMode(stack: AnyRec$
|
|
123
|
+
declare function validateListViewMode(stack: AnyRec$c): ListViewModeFinding[];
|
|
123
124
|
|
|
124
125
|
type StyleSeverity = 'error' | 'warning';
|
|
125
126
|
interface StyleFinding {
|
|
@@ -137,14 +138,14 @@ declare const STYLE_CLASSNAME_TAILWIND = "style-classname-tailwind";
|
|
|
137
138
|
declare const STYLE_RESPONSIVE_NO_BASE = "style-responsive-no-base";
|
|
138
139
|
declare const STYLE_UNKNOWN_CSS_PROPERTY = "style-unknown-css-property";
|
|
139
140
|
declare const STYLE_UNKNOWN_TOKEN = "style-unknown-token";
|
|
140
|
-
type AnyRec$
|
|
141
|
+
type AnyRec$b = Record<string, unknown>;
|
|
141
142
|
/**
|
|
142
143
|
* Validate every page's component tree for SDUI styling correctness (ADR-0065).
|
|
143
144
|
* Returns findings (empty = clean). `error` findings describe styles that are
|
|
144
145
|
* silently dropped and should fail validate/build; `warning` findings are
|
|
145
146
|
* advisory (typos, drift, footguns).
|
|
146
147
|
*/
|
|
147
|
-
declare function validateResponsiveStyles(stack: AnyRec$
|
|
148
|
+
declare function validateResponsiveStyles(stack: AnyRec$b): StyleFinding[];
|
|
148
149
|
|
|
149
150
|
type JsxPageSeverity = 'error' | 'warning';
|
|
150
151
|
interface JsxPageFinding {
|
|
@@ -157,8 +158,8 @@ interface JsxPageFinding {
|
|
|
157
158
|
message: string;
|
|
158
159
|
hint: string;
|
|
159
160
|
}
|
|
160
|
-
type AnyRec$
|
|
161
|
-
declare function validateJsxPages(stack: AnyRec$
|
|
161
|
+
type AnyRec$a = Record<string, unknown>;
|
|
162
|
+
declare function validateJsxPages(stack: AnyRec$a, opts?: {
|
|
162
163
|
manifest?: Manifest;
|
|
163
164
|
}): JsxPageFinding[];
|
|
164
165
|
|
|
@@ -171,8 +172,8 @@ interface ReactPageFinding {
|
|
|
171
172
|
message: string;
|
|
172
173
|
hint: string;
|
|
173
174
|
}
|
|
174
|
-
type AnyRec$
|
|
175
|
-
declare function validateReactPages(stack: AnyRec$
|
|
175
|
+
type AnyRec$9 = Record<string, unknown>;
|
|
176
|
+
declare function validateReactPages(stack: AnyRec$9): ReactPageFinding[];
|
|
176
177
|
|
|
177
178
|
type ReactPropSeverity = 'error' | 'warning';
|
|
178
179
|
interface ReactPropFinding {
|
|
@@ -183,8 +184,8 @@ interface ReactPropFinding {
|
|
|
183
184
|
message: string;
|
|
184
185
|
hint: string;
|
|
185
186
|
}
|
|
186
|
-
type AnyRec$
|
|
187
|
-
declare function validateReactPageProps(stack: AnyRec$
|
|
187
|
+
type AnyRec$8 = Record<string, unknown>;
|
|
188
|
+
declare function validateReactPageProps(stack: AnyRec$8): ReactPropFinding[];
|
|
188
189
|
|
|
189
190
|
type SourceStyleSeverity = 'error' | 'warning';
|
|
190
191
|
interface SourceStyleFinding {
|
|
@@ -196,8 +197,8 @@ interface SourceStyleFinding {
|
|
|
196
197
|
hint: string;
|
|
197
198
|
}
|
|
198
199
|
declare const PAGE_SOURCE_CLASSNAME = "page-source-className-tailwind";
|
|
199
|
-
type AnyRec$
|
|
200
|
-
declare function validatePageSourceStyling(stack: AnyRec$
|
|
200
|
+
type AnyRec$7 = Record<string, unknown>;
|
|
201
|
+
declare function validatePageSourceStyling(stack: AnyRec$7): SourceStyleFinding[];
|
|
201
202
|
|
|
202
203
|
/**
|
|
203
204
|
* Build-time record-title diagnostics (ADR-0079).
|
|
@@ -241,14 +242,14 @@ interface RecordTitleFinding {
|
|
|
241
242
|
/** How to fix it. */
|
|
242
243
|
hint: string;
|
|
243
244
|
}
|
|
244
|
-
type AnyRec$
|
|
245
|
+
type AnyRec$6 = Record<string, unknown>;
|
|
245
246
|
/**
|
|
246
247
|
* Validate every object's record-title declaration. Returns the list of
|
|
247
248
|
* findings (empty = clean). Both rules are advisory (`warning`): the caller
|
|
248
249
|
* must never fail the build on them alone — auto-provision + the `Record #<id>`
|
|
249
250
|
* floor guarantee a resolvable title at runtime.
|
|
250
251
|
*/
|
|
251
|
-
declare function validateRecordTitle(stack: AnyRec$
|
|
252
|
+
declare function validateRecordTitle(stack: AnyRec$6): RecordTitleFinding[];
|
|
252
253
|
|
|
253
254
|
/**
|
|
254
255
|
* Build-time semantic-role diagnostics (ADR-0085).
|
|
@@ -285,13 +286,13 @@ interface SemanticRoleFinding {
|
|
|
285
286
|
/** How to fix it. */
|
|
286
287
|
hint: string;
|
|
287
288
|
}
|
|
288
|
-
type AnyRec$
|
|
289
|
+
type AnyRec$5 = Record<string, unknown>;
|
|
289
290
|
/**
|
|
290
291
|
* Validate every object's semantic-role pointers. Returns the list of
|
|
291
292
|
* findings (empty = clean). Advisory only — the caller must never fail the
|
|
292
293
|
* build on these alone.
|
|
293
294
|
*/
|
|
294
|
-
declare function validateSemanticRoles(stack: AnyRec$
|
|
295
|
+
declare function validateSemanticRoles(stack: AnyRec$5): SemanticRoleFinding[];
|
|
295
296
|
|
|
296
297
|
/**
|
|
297
298
|
* Build-time form-layout diagnostics (#2578).
|
|
@@ -334,11 +335,111 @@ interface FormLayoutFinding {
|
|
|
334
335
|
/** How to fix it. */
|
|
335
336
|
hint: string;
|
|
336
337
|
}
|
|
337
|
-
type AnyRec = Record<string, unknown>;
|
|
338
|
+
type AnyRec$4 = Record<string, unknown>;
|
|
338
339
|
/**
|
|
339
340
|
* Validate authored form-view layout. Returns findings (empty = clean).
|
|
340
341
|
* Advisory only — the caller must never fail the build on these alone.
|
|
341
342
|
*/
|
|
342
|
-
declare function validateFormLayout(stack: AnyRec): FormLayoutFinding[];
|
|
343
|
+
declare function validateFormLayout(stack: AnyRec$4): 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$3 = 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$3): CapabilityRefFinding[];
|
|
367
|
+
|
|
368
|
+
declare const APPROVAL_ROLE_NOT_MEMBERSHIP_TIER = "approval-role-not-membership-tier";
|
|
369
|
+
declare const APPROVAL_APPROVER_TYPE_UNKNOWN = "approval-approver-type-unknown";
|
|
370
|
+
declare const APPROVAL_ESCALATION_REASSIGN_NO_TARGET = "approval-escalation-reassign-no-target";
|
|
371
|
+
type ApprovalApproverSeverity = 'error' | 'warning' | 'info';
|
|
372
|
+
interface ApprovalApproverFinding {
|
|
373
|
+
severity: ApprovalApproverSeverity;
|
|
374
|
+
/** Diagnostic rule id (`approval-*`). */
|
|
375
|
+
rule: string;
|
|
376
|
+
/** Human-readable location, e.g. `flow "expense_approval" · node "step1"`. */
|
|
377
|
+
where: string;
|
|
378
|
+
/** Config path, e.g. `flows[0].nodes[2].config.approvers[0]`. */
|
|
379
|
+
path: string;
|
|
380
|
+
/** What is wrong. */
|
|
381
|
+
message: string;
|
|
382
|
+
/** How to fix it. */
|
|
383
|
+
hint: string;
|
|
384
|
+
}
|
|
385
|
+
type AnyRec$2 = Record<string, unknown>;
|
|
386
|
+
/**
|
|
387
|
+
* Validate the approvers of every Approval node in the stack's flows.
|
|
388
|
+
* Returns findings (empty = clean).
|
|
389
|
+
*/
|
|
390
|
+
declare function validateApprovalApprovers(stack: AnyRec$2): ApprovalApproverFinding[];
|
|
391
|
+
|
|
392
|
+
declare const SECURITY_OWD_UNSET = "security-owd-unset";
|
|
393
|
+
declare const SECURITY_OWD_ALIAS = "security-owd-alias";
|
|
394
|
+
declare const SECURITY_EXTERNAL_WIDER = "security-external-wider-than-internal";
|
|
395
|
+
declare const SECURITY_WILDCARD_VAMA = "security-wildcard-vama";
|
|
396
|
+
declare const SECURITY_ANCHOR_HIGH_PRIVILEGE = "security-anchor-high-privilege";
|
|
397
|
+
declare const SECURITY_ROLE_WORD = "security-role-word";
|
|
398
|
+
declare const SECURITY_BOOK_AUDIENCE_UNKNOWN_SET = "security-book-audience-unknown-set";
|
|
399
|
+
declare const SECURITY_PRIVATE_NO_READSCOPE = "security-private-no-readscope";
|
|
400
|
+
type SecuritySeverity = 'error' | 'warning' | 'info';
|
|
401
|
+
interface SecurityFinding {
|
|
402
|
+
severity: SecuritySeverity;
|
|
403
|
+
/** Diagnostic rule id (`security-*`). */
|
|
404
|
+
rule: string;
|
|
405
|
+
/** Human-readable location, e.g. `object "leave_request"`. */
|
|
406
|
+
where: string;
|
|
407
|
+
/** Config path, e.g. `objects[3].sharingModel`. */
|
|
408
|
+
path: string;
|
|
409
|
+
/** What is wrong. */
|
|
410
|
+
message: string;
|
|
411
|
+
/** How to fix it. */
|
|
412
|
+
hint: string;
|
|
413
|
+
}
|
|
414
|
+
type AnyRec$1 = Record<string, unknown>;
|
|
415
|
+
/**
|
|
416
|
+
* Validate the security posture of a stack. Returns findings (empty = clean).
|
|
417
|
+
* `error` findings gate the build in `os compile`; `info` is advisory.
|
|
418
|
+
*/
|
|
419
|
+
declare function validateSecurityPosture(stack: AnyRec$1): SecurityFinding[];
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* [ADR-0090 D6] Access-matrix snapshot — authoring-time companion to the
|
|
423
|
+
* runtime explain engine.
|
|
424
|
+
*
|
|
425
|
+
* `buildAccessMatrix(stack)` derives, PURELY from metadata, one row per
|
|
426
|
+
* (permission set × object) the stack declares: the CRUD/VAMA bits, the
|
|
427
|
+
* depth axes, and the object's OWD for context. The matrix is snapshotted to
|
|
428
|
+
* `access-matrix.json` and diffed on every compile: an unchanged matrix
|
|
429
|
+
* auto-passes; a changed one fails the build until the snapshot is updated —
|
|
430
|
+
* so every capability change becomes a REVIEWABLE, semantic diff
|
|
431
|
+
* ("`crm_admin` gains delete on `crm_lead`") instead of a buried JSON hunk.
|
|
432
|
+
* This is the publish-gate substrate the AI-authoring safety story needs:
|
|
433
|
+
* AI may draft grants freely; it cannot silently change who can do what.
|
|
434
|
+
*/
|
|
435
|
+
|
|
436
|
+
type AnyRec = Record<string, unknown>;
|
|
437
|
+
/** Build the sorted access matrix for a normalized stack. */
|
|
438
|
+
declare function buildAccessMatrix(stack: AnyRec): AccessMatrix;
|
|
439
|
+
/**
|
|
440
|
+
* Semantic diff between two matrices — human-review lines, empty = identical.
|
|
441
|
+
* Ordered: removals, additions, then per-entry bit/scope changes.
|
|
442
|
+
*/
|
|
443
|
+
declare function diffAccessMatrix(before: AccessMatrix, after: AccessMatrix): string[];
|
|
343
444
|
|
|
344
|
-
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 };
|
|
445
|
+
export { APPROVAL_APPROVER_TYPE_UNKNOWN, APPROVAL_ESCALATION_REASSIGN_NO_TARGET, APPROVAL_ROLE_NOT_MEMBERSHIP_TIER, type ApprovalApproverFinding, type ApprovalApproverSeverity, 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_BOOK_AUDIENCE_UNKNOWN_SET, 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, validateApprovalApprovers, validateCapabilityReferences, validateFormLayout, validateJsxPages, validateListViewMode, validatePageSourceStyling, validateReactPageProps, validateReactPages, validateRecordTitle, validateResponsiveStyles, validateSecurityPosture, validateSemanticRoles, validateStackExpressions, validateWidgetBindings };
|