@md-code/follow-architecture 0.3.2 → 0.3.3
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 +17 -0
- package/README.md +43 -12
- package/dist/closure-project.js +7 -17
- package/dist/code-entities/entities.js +7 -17
- package/dist/code-entities/project.js +7 -17
- package/dist/code-entities/walk.js +7 -17
- package/dist/config-project.js +7 -17
- package/dist/config-report.js +7 -17
- package/dist/config-rule.js +7 -17
- package/dist/config-state.js +7 -17
- package/dist/css/index.js +7 -17
- package/dist/css/syntax/css/index.js +7 -17
- package/dist/css/syntax/language.js +7 -17
- package/dist/css/syntax/scss/index.js +7 -17
- package/dist/css/syntax/styled/document.js +7 -17
- package/dist/entities/ast/depth.js +7 -17
- package/dist/entities/ast/index.d.ts +2 -2
- package/dist/entities/ast/resolve.js +7 -17
- package/dist/entities/kinds.js +7 -17
- package/dist/entities/location/where.d.ts +2 -2
- package/dist/entities/location/where.js +7 -17
- package/dist/entities/queries.js +7 -17
- package/dist/entities/tree/build.js +7 -17
- package/dist/entities/tree/entries.d.ts +1 -1
- package/dist/entities/tree/match.js +7 -17
- package/dist/fa-open.js +7 -17
- package/dist/fa-store.js +7 -17
- package/dist/facts-record.js +7 -17
- package/dist/frameworks/index.js +7 -17
- package/dist/ignore.js +12 -26
- package/dist/index-zone.js +7 -17
- package/dist/main.js +10 -19
- package/dist/nodes/children.js +7 -17
- package/dist/nodes/finally/emit.d.ts +1 -1
- package/dist/nodes/similar.js +7 -17
- package/dist/pipeline-facts.d.ts +1 -1
- package/dist/pipeline-facts.js +7 -17
- package/dist/pipeline.d.ts +1 -1
- package/dist/report/errorTypes/decision-maker.js +7 -17
- package/dist/report/errorTypes/index.js +7 -17
- package/dist/report/user-report/build/bundle.js +7 -17
- package/dist/report/user-report/build/bundle.prebuilt.js +152 -152
- package/dist/report/user-report/data/collect.js +7 -17
- package/dist/report/user-report/data/entity-examples.js +7 -17
- package/dist/report/user-report/data/nodes.js +7 -17
- package/dist/report/user-report/data/scan.js +7 -17
- package/dist/report/user-report/index.js +7 -17
- package/dist/rules/index.d.ts +1 -1
- package/dist/rules/normalize.js +7 -17
- package/dist/scripts/audit-report.js +7 -17
- package/dist/usage-index.js +7 -17
- package/dist/usage-sweep.js +7 -17
- package/dist/utils/aliases.js +7 -17
- package/dist/utils/configs.js +7 -17
- package/dist/utils/files.js +7 -17
- package/dist/utils/imports.js +7 -17
- package/dist/utils/packages.js +7 -17
- package/dist/utils/pattern.js +9 -19
- package/package.json +2 -2
package/dist/entities/kinds.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.declaredActions = exports.changesState = exports.CHANGES_STATE = exports.EDGE_FACTS = exports.FACT_KINDS = exports.VIA = exports.RELATION = void 0;
|
|
37
27
|
const configError = __importStar(require("@md-code/follow-architecture/report/configErrors"));
|
|
@@ -5,8 +5,8 @@ import type { FileFacts } from "@md-code/follow-architecture/entities/facts";
|
|
|
5
5
|
type Caps = Record<string, string | undefined>;
|
|
6
6
|
declare const parseWhereEntry: (entry: FieldValue, entities?: Set<string> | null, aliases?: Aliases | null) => WhereEntry;
|
|
7
7
|
declare const parseWhere: (value: FieldValue | null | undefined, entities?: Set<string> | null, aliases?: Aliases | null) => WhereEntry[];
|
|
8
|
-
declare const matchesWhere: (
|
|
9
|
-
declare const checkWhere: (
|
|
8
|
+
declare const matchesWhere: (entry: WhereEntry, rel: string, arch: Arch, facts: FileFacts, targetCaps?: Caps) => boolean;
|
|
9
|
+
declare const checkWhere: (entries: WhereEntry[], rel: string, arch: Arch, facts: FileFacts, targetCaps?: Caps) => boolean;
|
|
10
10
|
declare const accessorLabel: (e: {
|
|
11
11
|
scope?: string | null;
|
|
12
12
|
segments?: string[] | null;
|
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.entryKey = exports.fillTemplate = exports.labelOf = exports.accessorLabel = exports.checkWhere = exports.matchesWhere = exports.parseWhere = exports.parseWhereEntry = exports.toList = void 0;
|
|
37
27
|
// THE `where` GRAMMAR — one implementation of "here" / "by this code", shared by
|
package/dist/entities/queries.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.isObj = exports.isList = exports.hitOf = exports.innerFilterOf = exports.passes = exports.matches = exports.KNOWN_OPS = exports.COMPOSITION_OPS = void 0;
|
|
37
27
|
// The single generic filter engine. Every `when` / `where` / classification
|
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.variantsOf = exports.buildTree = void 0;
|
|
37
27
|
// Nodes → path variants (one per parent) + the entity homes they imply.
|
|
@@ -3,5 +3,5 @@ import type { Arch, ArchChild, ArchNode } from "@md-code/follow-architecture/ent
|
|
|
3
3
|
import type { Finding, FindingFrom } from "@md-code/follow-architecture/entities/findings";
|
|
4
4
|
declare const findChild: (children: ArchChild[], seg: string | undefined, isFile: boolean) => ArchChild | null;
|
|
5
5
|
declare const templateNode: (arch: Arch, parentSlug: string, child: ArchChild, relPath: string) => ArchNode | null;
|
|
6
|
-
declare const checkTree: (
|
|
6
|
+
declare const checkTree: (relPath: string, arch: Arch, out: Finding[], finding: FindingFrom, facts: FileFacts, repoFiles: string[]) => void;
|
|
7
7
|
export { checkTree, findChild, templateNode };
|
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.allMatches = exports.targetCapsFor = exports.placeholderPositions = exports.ancestorsAreReal = exports.instanceAt = exports.folderOwner = exports.deepestMatch = exports.matchNode = void 0;
|
|
37
27
|
// A path → the node it is, and whether that node is really an instance there.
|
package/dist/fa-open.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.CHUNK = exports.USAGE_VERSION = exports.OUT_VERSION = exports.PEERS_VERSION = exports.SECTION_VERSION = exports.USAGE_NAME = exports.OUT_NAME = exports.PEERS_NAME = exports.SECTION_NAME = exports.takeCompactionWarning = exports.takeWarning = exports.endChunk = exports.handleOf = exports.openFactsIndex = void 0;
|
|
37
27
|
// OPENING THE FACTS INDEX AND KNOWING WHETHER A STORED VALUE IS STILL OURS: the
|
package/dist/fa-store.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.compactionLine = exports.prune = exports.finish = exports.settle = exports.keepUsage = exports.keepVerdict = exports.keepFacts = exports.flushChunk = void 0;
|
|
37
27
|
// THE WRITE SIDE OF THE FACTS INDEX: one chunk of values per flush — every
|
package/dist/facts-record.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.namesCodeEntity = exports.slimmable = exports.needsUsage = exports.checkLive = exports.checkRecord = exports.extractFileFacts = void 0;
|
|
37
27
|
// A FILE'S FACTS AS A RECORD. `extractFileFacts` is the only producer: it reads
|
package/dist/frameworks/index.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.REGISTRY = exports.resetFacets = exports.classAttributes = exports.facets = exports.enrich = void 0;
|
|
37
27
|
// Framework registry — a READING of the AST, never a change to it.
|
package/dist/ignore.js
CHANGED
|
@@ -30,33 +30,19 @@ const IGNORE_DIRS = [
|
|
|
30
30
|
".github",
|
|
31
31
|
];
|
|
32
32
|
exports.IGNORE_DIRS = IGNORE_DIRS;
|
|
33
|
-
// THE SCAN SCOPE OF THE
|
|
34
|
-
//
|
|
33
|
+
// THE SCAN SCOPE OF THE REPOSITORY. `IGNORE_DIRS` above matches a NAME at any
|
|
34
|
+
// depth; this list names the repo-relative places that are not under the
|
|
35
35
|
// architecture contract yet: the deployable apps, the platform packages only
|
|
36
36
|
// those apps consume, the tooling scripts and the root config files. Paths and
|
|
37
|
-
// globs, not names, on purpose — `packages/native`
|
|
38
|
-
// `packages/follow-architecture/
|
|
39
|
-
// `packages/follow-architecture/tests/cli/` are IN it, and a folder name cannot
|
|
40
|
-
// tell them apart.
|
|
37
|
+
// globs, not names, on purpose — a folder name cannot tell `packages/native` (out
|
|
38
|
+
// of scope) from `packages/follow-architecture/tests/cli/` (in it).
|
|
41
39
|
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
// to the
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"packages/native/**",
|
|
51
|
-
"packages/cli/**",
|
|
52
|
-
"packages/infrastructure/**",
|
|
53
|
-
"packages/stylelint/**",
|
|
54
|
-
"scripts/**",
|
|
55
|
-
// Every JS file, at any depth: the repo's sources are TypeScript, so a `.js`,
|
|
56
|
-
// `.cjs` or `.mjs` here is a config or a build artifact, not contract code. This
|
|
57
|
-
// also covers the root configs (`eslint.config.mjs`, `*.config.js`).
|
|
58
|
-
"**/*.js",
|
|
59
|
-
"**/*.cjs",
|
|
60
|
-
"**/*.mjs",
|
|
61
|
-
];
|
|
40
|
+
// EMPTY ON PURPOSE: this is a repository's scope, not the tool's. A published
|
|
41
|
+
// tool that ships the scope of its own repository hides an app, a script or a JS
|
|
42
|
+
// file in every consumer that happens to use those names. A repo states its own
|
|
43
|
+
// scope in its ESLint config (the rule's `ignores`) and in its CLI run
|
|
44
|
+
// (`--ignore`), one list with two callers; both ADD to the defaults here.
|
|
45
|
+
// What stays the tool's own are the universals in `IGNORE_DIRS` above — installed
|
|
46
|
+
// dependencies and generated output — which mean the same everywhere.
|
|
47
|
+
const IGNORE_PATHS = [];
|
|
62
48
|
exports.IGNORE_PATHS = IGNORE_PATHS;
|
package/dist/index-zone.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.MAX_FOLDER = exports.MAX_ZONE = exports.extendZone = exports.closureOf = exports.importersOf = exports.zoneOf = void 0;
|
|
37
27
|
// WHICH FILES A WARM RUN HAS TO READ AGAIN. The summary in the light section
|
package/dist/main.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.repoOf = exports.canonicalRoot = exports.buildArchitecture = exports.loadArchitecture = exports.main = void 0;
|
|
37
27
|
const fs = __importStar(require("node:fs"));
|
|
@@ -379,8 +369,9 @@ const main = (argv) => {
|
|
|
379
369
|
// architecture (which describes code, not how to find it).
|
|
380
370
|
const exts = [...new Set([...pattern_1.DEFAULT_EXTS, ...(args.ext ?? [])])];
|
|
381
371
|
const ignoreDirs = [...new Set([...pattern_1.DEFAULT_IGNORE_DIRS, ...(args.ignoreDir ?? [])])];
|
|
382
|
-
// Repo-relative paths
|
|
383
|
-
//
|
|
372
|
+
// Repo-relative paths a REPOSITORY declares out of scope: `--ignore` only. The
|
|
373
|
+
// tool ships none (`IGNORE_PATHS` is empty) — an `apps/`, a `scripts/` or a
|
|
374
|
+
// `.js` rule of one monorepo must not hide a consumer's code.
|
|
384
375
|
const ignoreGlobs = [...new Set([...pattern_1.DEFAULT_IGNORE_PATHS, ...(args.ignore ?? [])])];
|
|
385
376
|
// ONE walk: the scan list, the repo file list and the ts-morph project are the
|
|
386
377
|
// same set of files. `references` asks who uses a name ACROSS files.
|
package/dist/nodes/children.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.entitiesOf = exports.ancestorChain = exports.missingRequiredChild = exports.folderContents = exports.compileChild = exports.nodePrefixRe = exports.nodePathRe = void 0;
|
|
37
27
|
// Node child handling: a child is either a plain string name or a
|
|
@@ -2,5 +2,5 @@ import type { ArchNode } from "@md-code/follow-architecture/entities/architectur
|
|
|
2
2
|
import type { FileContext } from "@md-code/follow-architecture/entities/context";
|
|
3
3
|
import type { Finding, FindingFrom } from "@md-code/follow-architecture/entities/findings";
|
|
4
4
|
import type { Violation } from "./violation";
|
|
5
|
-
declare const emitFindings: (
|
|
5
|
+
declare const emitFindings: (violations: Violation[], ctx: FileContext, node: ArchNode, out: Finding[], findingFrom: FindingFrom) => void;
|
|
6
6
|
export { emitFindings };
|
package/dist/nodes/similar.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.criteriaOf = exports.similarNodes = void 0;
|
|
37
27
|
// HOW MUCH a folder LOOKS LIKE a declared entity — measured in ENTITYS, not in
|
package/dist/pipeline-facts.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare const needsUsage: (arch: Arch) => boolean;
|
|
|
3
3
|
import type { Arch } from "./entities/architecture";
|
|
4
4
|
import type { FileContext } from "./entities/context";
|
|
5
5
|
import type { Candidate, FileFacts } from "./entities/facts";
|
|
6
|
-
declare const collectFacts: (
|
|
6
|
+
declare const collectFacts: (abs: string, arch: Arch, project: Project, repoFiles: string[], usage?: boolean, record?: boolean, inText?: string) => {
|
|
7
7
|
ctx: FileContext;
|
|
8
8
|
candidates: Candidate[];
|
|
9
9
|
fileFacts: FileFacts;
|
package/dist/pipeline-facts.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.collectFacts = exports.needsUsage = void 0;
|
|
37
27
|
// The FACTS phase of the per-file pipeline: load the source file, collect the
|
package/dist/pipeline.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import { createTsProject } from "./entities/ast";
|
|
|
3
3
|
import type { Arch } from "./entities/architecture";
|
|
4
4
|
import type { Finding } from "./entities/findings";
|
|
5
5
|
import type { SeenStore } from "./utils/seen";
|
|
6
|
-
declare const checkFile: (
|
|
6
|
+
declare const checkFile: (abs: string, arch: Arch, project: Project, repoFiles: string[], dedupe: SeenStore) => Finding[];
|
|
7
7
|
export { checkFile, createTsProject };
|
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.DEFAULT_THRESHOLDS = exports.DEFAULT_WEIGHTS = exports.resolveThresholds = exports.resolveWeights = exports.decide = exports.normalize = exports.TYPES = exports.describe = void 0;
|
|
37
27
|
// THE decision maker — one file, three jobs, in this order:
|
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.TYPES = exports.ids = exports.renderToken = exports.describe = void 0;
|
|
37
27
|
// The vocabulary of a finding: message, repairs, and the ids the picture
|