@archwall/core 0.2.1 → 1.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/CHANGELOG.md +28 -0
- package/dist/index.cjs +0 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +93 -7
- package/dist/index.d.mts +93 -7
- package/dist/index.mjs +0 -0
- package/dist/index.mjs.map +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/{prepare-BjMxyYOm.mjs → prepare-BxSeKFYq.mjs} +72 -72
- package/dist/{prepare-BjMxyYOm.mjs.map → prepare-BxSeKFYq.mjs.map} +1 -1
- package/dist/{prepare-CEaZxLPI.cjs → prepare-DNER1gV3.cjs} +71 -71
- package/dist/{prepare-CEaZxLPI.cjs.map → prepare-DNER1gV3.cjs.map} +1 -1
- package/dist/{transform-CzxyWbUC.d.mts → transform-beNJIws-.d.cts} +49 -24
- package/dist/{transform-CzxyWbUC.d.cts → transform-beNJIws-.d.mts} +49 -24
- package/package.json +1 -1
|
@@ -282,27 +282,6 @@ declare class GraphDraft implements GraphMutation {
|
|
|
282
282
|
declare function irMajor(version: string): number;
|
|
283
283
|
declare function assertIrCompatible(graphVersion: string): void;
|
|
284
284
|
//#endregion
|
|
285
|
-
//#region src/contracts/classifier.d.ts
|
|
286
|
-
interface ClassifierContext {
|
|
287
|
-
/**
|
|
288
|
-
* Absolute source root from resolved config. Classifier patterns describe the shape of
|
|
289
|
-
* the source tree, so they are relative to this and never to the repository root.
|
|
290
|
-
*/
|
|
291
|
-
sourceRoot: string;
|
|
292
|
-
/**
|
|
293
|
-
* A file's path relative to {@link sourceRoot}, forward-slashed, or null when it lies
|
|
294
|
-
* outside. Every path-based classifier needs exactly this, and none of them should be
|
|
295
|
-
* re-deriving it — guards, slash normalisation and all — in user code.
|
|
296
|
-
*/
|
|
297
|
-
relative(file: string): string | null;
|
|
298
|
-
}
|
|
299
|
-
type TagPatch = Record<string, string> | null | undefined | void;
|
|
300
|
-
interface Classifier {
|
|
301
|
-
name: string;
|
|
302
|
-
classify(module: ModuleNode, ctx: ClassifierContext): TagPatch;
|
|
303
|
-
}
|
|
304
|
-
declare function defineClassifier(classifier: Classifier): Classifier;
|
|
305
|
-
//#endregion
|
|
306
285
|
//#region src/violations.d.ts
|
|
307
286
|
/**
|
|
308
287
|
* The ONE severity vocabulary, shared by violations and diagnostics.
|
|
@@ -435,6 +414,27 @@ declare function countBySeverity(violations: readonly {
|
|
|
435
414
|
*/
|
|
436
415
|
declare function compareViolations(a: Violation, b: Violation): number;
|
|
437
416
|
//#endregion
|
|
417
|
+
//#region src/contracts/classifier.d.ts
|
|
418
|
+
interface ClassifierContext {
|
|
419
|
+
/**
|
|
420
|
+
* Absolute source root from resolved config. Classifier patterns describe the shape of
|
|
421
|
+
* the source tree, so they are relative to this and never to the repository root.
|
|
422
|
+
*/
|
|
423
|
+
sourceRoot: string;
|
|
424
|
+
/**
|
|
425
|
+
* A file's path relative to {@link sourceRoot}, forward-slashed, or null when it lies
|
|
426
|
+
* outside. Every path-based classifier needs exactly this, and none of them should be
|
|
427
|
+
* re-deriving it — guards, slash normalisation and all — in user code.
|
|
428
|
+
*/
|
|
429
|
+
relative(file: string): string | null;
|
|
430
|
+
}
|
|
431
|
+
type TagPatch = Record<string, string> | null | undefined | void;
|
|
432
|
+
interface Classifier {
|
|
433
|
+
name: string;
|
|
434
|
+
classify(module: ModuleNode, ctx: ClassifierContext): TagPatch;
|
|
435
|
+
}
|
|
436
|
+
declare function defineClassifier(classifier: Classifier): Classifier;
|
|
437
|
+
//#endregion
|
|
438
438
|
//#region src/contracts/diagnostic.d.ts
|
|
439
439
|
/** Alias, for readability at use sites — it IS {@link Severity}. */
|
|
440
440
|
type DiagnosticSeverity = Severity;
|
|
@@ -477,7 +477,18 @@ type WellKnownDiagnosticCode =
|
|
|
477
477
|
* "debt we accepted" and becomes a permanent hole, and the stale entry will silently
|
|
478
478
|
* re-suppress the finding if it ever comes back.
|
|
479
479
|
*/
|
|
480
|
-
"baseline-stale"
|
|
480
|
+
"baseline-stale" |
|
|
481
|
+
/**
|
|
482
|
+
* A baseline is configured but could not be used: missing, unparseable, or written under a
|
|
483
|
+
* different fingerprint scheme.
|
|
484
|
+
*
|
|
485
|
+
* Gated with the other configuration errors, and therefore failing by default. The failure
|
|
486
|
+
* this prevents is specific: an unusable baseline suppresses nothing, so the run reports
|
|
487
|
+
* every accepted finding as new — and a team that reads that as "the baseline is broken"
|
|
488
|
+
* is the lucky case. Silence here would instead let a *scheme bump* look like a fresh
|
|
489
|
+
* regression, or let a deleted baseline look like a clean repo.
|
|
490
|
+
*/
|
|
491
|
+
"baseline-invalid";
|
|
481
492
|
type DiagnosticCode = WellKnownDiagnosticCode | (string & {});
|
|
482
493
|
/**
|
|
483
494
|
* Everything the run wants to say that is *not* a violation of the user's architecture: a
|
|
@@ -509,6 +520,20 @@ interface UnscannableFilesDetails {
|
|
|
509
520
|
/** A bounded sample of repo-relative paths, for a message a human can follow. */
|
|
510
521
|
sample: readonly string[];
|
|
511
522
|
}
|
|
523
|
+
/** Payload shape for `code: "baseline-stale"`. */
|
|
524
|
+
interface BaselineStaleDetails {
|
|
525
|
+
/** How many accepted entries this run did not reproduce. */
|
|
526
|
+
count: number;
|
|
527
|
+
/** The fingerprints, so a tool can prune the file without re-running the analysis. */
|
|
528
|
+
fingerprints: readonly string[];
|
|
529
|
+
}
|
|
530
|
+
/** Payload shape for `code: "baseline-invalid"`. */
|
|
531
|
+
interface BaselineInvalidDetails {
|
|
532
|
+
/** Repo-relative path to the configured baseline. */
|
|
533
|
+
path: string;
|
|
534
|
+
/** Why it could not be used, as a sentence fragment. */
|
|
535
|
+
reason: string;
|
|
536
|
+
}
|
|
512
537
|
/** Payload shape for `code: "empty-scope"`. */
|
|
513
538
|
interface EmptyScopeDetails {
|
|
514
539
|
/** The scope as configured, so the message can be acted on without reopening the config. */
|
|
@@ -759,5 +784,5 @@ interface GraphTransform {
|
|
|
759
784
|
}
|
|
760
785
|
declare function defineTransform(transform: GraphTransform): GraphTransform;
|
|
761
786
|
//#endregion
|
|
762
|
-
export {
|
|
763
|
-
//# sourceMappingURL=transform-
|
|
787
|
+
export { ModuleKind as $, ViolationInput as A, Capability as B, ClassifierContext as C, Severity as D, FINGERPRINT_SCHEME as E, locationsOf as F, GraphDelivery as G, EdgeAttributes as H, primaryEdge as I, HostInfo as J, GraphDraft as K, primaryModule as L, compareViolations as M, countBySeverity as N, SeverityCounts as O, fingerprintOf as P, ModuleIdScheme as Q, primarySourceLocation as R, Classifier as S, defineClassifier as T, EdgeKind as U, Edge as V, FIRST_PARTY_KINDS as W, MODULE_ID_SCHEMES as X, IR_VERSION as Y, ModuleId as Z, DiagnosticSeverity as _, defineGraphComputation as a, WellKnownCapability as at, UnscannableFilesDetails as b, GraphQuery as c, displayModuleId as ct, ModuleSelection as d, isThirdParty as dt, ModuleNode as et, filterKey as f, parseModuleId as ft, DiagnosticCode as g, Diagnostic as h, GraphComputation as i, THIRD_PARTY_KINDS as it, ViolationLocation as j, Violation as k, GraphView as l, irMajor as lt, BaselineStaleDetails as m, TransformContext as n, ProjectGraphInit as nt, EdgeFilter as o, WellKnownEdgeKind as ot, BaselineInvalidDetails as p, GraphMutation as q, defineTransform as r, SourceLocation as rt, GraphIndex as s, assertIrCompatible as st, GraphTransform as t, ProjectGraph as tt, ModuleFilter as u, isFirstParty as ut, EmptyScopeDetails as v, TagPatch as w, WellKnownDiagnosticCode as x, RuleSkippedDetails as y, renderMessage as z };
|
|
788
|
+
//# sourceMappingURL=transform-beNJIws-.d.mts.map
|