@morriconeluca/eslint-plugin-faf 0.4.0 → 0.6.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/README.md +216 -244
- package/dist/main.cjs +13793 -1271
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.cts +345 -32
- package/dist/main.d.ts +325 -32
- package/dist/main.js +13800 -1270
- package/dist/main.js.map +1 -1
- package/package.json +46 -22
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/_rules/category-mutually-exclusive/category-mutually-exclusive.rule.ts","../src/_rules/_rules@shared/_utils/_aggregates/classify-folder/classify-folder.util.ts","../src/_rules/_rules@shared/_utils/_utils@shared/_stores/cache/cache.store.ts","../src/_rules/_rules@shared/_utils/_primitives/get-root-fragment-config/get-root-fragment-config.util.ts","../src/_rules/_rules@shared/_utils/_compounds/is-root-fragment/is-root-fragment.util.ts","../src/_rules/_rules@shared/_utils/_primitives/get-category-config/get-category-config.util.ts","../src/_rules/_rules@shared/_utils/_primitives/read-dir-cached/read-dir-cached.util.ts","../src/_rules/_rules@shared/_utils/_primitives/find-tree-config/find-tree-config.util.ts","../src/_rules/_rules@shared/_utils/_primitives/to-relative-path/to-relative-path.util.ts","../src/_rules/enforce-access-node/enforce-access-node.rule.ts","../src/_rules/naming-conventions/naming-conventions.rule.ts","../src/_rules/_rules@shared/_utils/_primitives/get-file-role/get-file-role.util.ts","../src/_rules/_rules@shared/_utils/_primitives/get-project-root/get-project-root.util.ts","../src/_rules/no-direct-fragment-import/no-direct-fragment-import.rule.ts","../src/_rules/_rules@shared/_utils/_aggregates/resolve-import-path/resolve-import-path.util.ts","../src/_rules/no-fractal-branch-leak/no-fractal-branch-leak.rule.ts","../src/_rules/_rules@shared/_utils/_primitives/get-fractal-branch-owner/get-fractal-branch-owner.util.ts","../src/_rules/_rules@shared/_utils/_primitives/get-immediate-sub-domain/get-immediate-sub-domain.util.ts","../src/_rules/_rules@shared/_utils/_systems/get-private-category-info/get-private-category-info.util.ts","../src/_rules/no-peer-dependency/no-peer-dependency.rule.ts","../src/_rules/_rules@shared/_utils/_primitives/find-tree-config-including-excluded/find-tree-config-including-excluded.util.ts","../src/_rules/_rules@shared/_utils/_primitives/get-lca-and-sub-branches/get-lca-and-sub-branches.util.ts","../src/_rules/_rules@shared/_utils/_primitives/get-role-hierarchy-index/get-role-hierarchy-index.util.ts","../src/_rules/_rules@shared/_utils/_primitives/resolve-horizontal-hierarchy/resolve-horizontal-hierarchy.util.ts","../src/_rules/no-private-category-leak/no-private-category-leak.rule.ts","../src/rules.ts","../src/configs.ts","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@morriconeluca/eslint-plugin-faf\",\n \"version\": \"0.4.0\",\n \"description\": \"An ESLint plugin for FAF projects.\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/morriconeluca/eslint-plugin-faf.git\"\n },\n \"main\": \"./dist/main.cjs\",\n \"module\": \"./dist/main.js\",\n \"types\": \"./dist/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/main.d.ts\",\n \"import\": \"./dist/main.js\",\n \"require\": \"./dist/main.cjs\"\n }\n },\n \"publishConfig\": {\n \"access\": \"public\",\n \"provenance\": true\n },\n \"imports\": {\n \"#_rules@shared/*\": \"./src/_rules/_rules@shared/*\",\n \"#_utils@shared/*\": \"./src/_rules/_rules@shared/_utils/_utils@shared/*\"\n },\n \"type\": \"module\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build\": \"npm run lint && tsup\",\n \"test\": \"vitest run\",\n \"dev\": \"vitest\",\n \"lint\": \"npm run lint:types && npm run lint:eslint\",\n \"lint:eslint\": \"eslint .\",\n \"lint:types\": \"tsc --noEmit\",\n \"lint:fix\": \"eslint --fix .\",\n \"format\": \"prettier --write .\",\n \"check-format\": \"prettier --check .\",\n \"ci\": \"npm run build && npm run check-format && npm run test\",\n \"prepublishOnly\": \"npm run ci\",\n \"local-release\": \"changeset version && changeset publish\",\n \"prepare\": \"husky\"\n },\n \"keywords\": [\n \"eslint\",\n \"eslintplugin\",\n \"faf\"\n ],\n \"author\": \"Luca Morricone\",\n \"license\": \"MIT\",\n \"peerDependencies\": {\n \"eslint\": \"^8.57.0 || ^9.0.0 || ^10.0.0\"\n },\n \"devDependencies\": {\n \"@changesets/cli\": \"^2.31.0\",\n \"@commitlint/cli\": \"^21.0.2\",\n \"@commitlint/config-conventional\": \"^21.0.2\",\n \"@eslint/js\": \"^10.0.1\",\n \"@types/eslint\": \"^9.6.1\",\n \"@types/node\": \"^25.9.3\",\n \"@typescript-eslint/utils\": \"^8.24.1\",\n \"dependency-cruiser\": \"^17.4.3\",\n \"eslint\": \"^10.5.0\",\n \"eslint-import-resolver-typescript\": \"^4.4.5\",\n \"eslint-plugin-import-x\": \"^4.16.2\",\n \"eslint-plugin-perfectionist\": \"^5.9.0\",\n \"husky\": \"^9.1.7\",\n \"lint-staged\": \"^17.0.7\",\n \"prettier\": \"^3.8.4\",\n \"tsup\": \"^8.3.6\",\n \"typescript\": \"^6.0.3\",\n \"typescript-eslint\": \"^8.61.0\",\n \"vitest\": \"^4.1.9\"\n },\n \"lint-staged\": {\n \"*\": \"prettier --write --ignore-unknown\",\n \"src/**/*.ts\": \"eslint --fix\"\n }\n}\n","import type { Rule } from 'eslint';\n\nimport path from 'path';\n\nimport type { TFafSettings } from '#_rules@shared/_types/faf.type.js';\n\nimport { classifyFolder } from '#_rules@shared/_utils/_aggregates/classify-folder/index.js';\nimport { findTreeConfig } from '#_rules@shared/_utils/_primitives/find-tree-config/index.js';\nimport { getCategoryConfig } from '#_rules@shared/_utils/_primitives/get-category-config/index.js';\nimport { readDirCached } from '#_rules@shared/_utils/_primitives/read-dir-cached/index.js';\nimport { toRelativePath } from '#_rules@shared/_utils/_primitives/to-relative-path/index.js';\n\n/**\n * @fileoverview Rule: faf/category-mutually-exclusive\n * Enforces the FAF rule of Category Purity (Mutua Esclusività).\n *\n * FAF Law: Categories must contain either ONLY single files (Logical Nodes) or ONLY subfolders (Fragments).\n *\n * Valid:\n * - A category configured with `allowSingleFiles: true` containing only files (e.g. `_types/user.type.ts`).\n * - A category configured with `allowSingleFiles: false` containing only Fragment folders (e.g. `_utils/get-path/`).\n *\n * Invalid:\n * - Mixing single files and subfolders directly inside the same category directory.\n * - Placing files directly in a Category that is not configured to allow single files (`allowSingleFiles: false`).\n */\nconst rule: Rule.RuleModule = {\n create(context) {\n const absPath = context.filename;\n const relPath = toRelativePath(absPath);\n const settings = context.settings as { faf?: TFafSettings };\n\n if (!settings.faf) {\n return {};\n }\n\n const config = findTreeConfig(relPath, settings.faf);\n if (!config) {\n return {};\n }\n\n const relDir = path.dirname(relPath);\n const parentType = classifyFolder(relDir, config);\n\n if (parentType !== 'category') {\n return {};\n }\n\n const fileName = path.basename(relPath);\n\n return {\n Program(node) {\n const contents = readDirCached(relDir);\n\n const activeFiles = contents.files.filter(\n (f) => f !== 'README.md' && f !== 'package.json' && !f.startsWith('.')\n );\n const activeDirs = contents.dirs.filter((d) => !d.startsWith('_')); // Ignore sub-categories/layers/fractal branches\n\n const hasFiles = activeFiles.length > 0;\n const hasDirs = activeDirs.length > 0;\n\n if (hasFiles && hasDirs) {\n context.report({\n loc: { column: 0, line: 1 },\n message: `Mutua Esclusività violation in Category \"${path.basename(relDir)}\": cannot mix single files (${activeFiles.join(', ')}) and Fragment directories (${activeDirs.join(', ')}).`,\n node,\n });\n }\n\n // Also check if category config allows single files\n if (hasFiles) {\n const folderName = path.basename(relDir);\n const catConfig = getCategoryConfig(relDir, config);\n if (catConfig) {\n const ext = path.extname(fileName);\n const isAllowedAsset =\n catConfig.allowedExtensions?.includes(ext) ?? false;\n\n // If the category defines allowedExtensions and this file's\n // extension is not in the list, skip — naming-conventions\n // already reports a precise extension-mismatch error.\n if (\n !isAllowedAsset &&\n catConfig.allowedExtensions &&\n catConfig.allowedExtensions.length > 0\n ) {\n return;\n }\n\n if (!catConfig.allowSingleFiles && !isAllowedAsset) {\n context.report({\n message: `Category \"${folderName}\" cannot contain file nodes directly. File \"${fileName}\" must be encapsulated inside a Fragment.`,\n node,\n });\n }\n }\n }\n },\n };\n },\n meta: {\n docs: {\n description:\n 'Enforce that Categories contain either only file nodes or only Fragment folders, and check whitelist roles',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nexport default rule;\n","import path from 'path';\n\nimport { state } from '#_utils@shared/_stores/cache/index.js';\n\nimport type { TFolderType, TTreeConfig } from '../../../_types/faf.type.js';\n\nimport { isRootFragment } from '../../_compounds/is-root-fragment/index.js';\nimport { getCategoryConfig } from '../../_primitives/get-category-config/index.js';\nimport { readDirCached } from '../../_primitives/read-dir-cached/index.js';\n\n/**\n * Classifies a relative directory path into a FAF structural category (Layer, Category, Fragment, etc.).\n * Memoizes results in `state.classifyCache` to optimize recursive parent checks.\n *\n * @param relDirPath - Directory path relative to the project root.\n * @param config - Tree configuration.\n * @returns The classified folder type.\n */\nexport function classifyFolder(\n relDirPath: string,\n config: TTreeConfig\n): TFolderType {\n const cached = state.classifyCache.get(relDirPath);\n if (cached !== undefined) {\n return cached;\n }\n\n const result = _classifyFolder(relDirPath, config);\n state.classifyCache.set(relDirPath, result);\n return result;\n}\n\nfunction _classifyFolder(relDirPath: string, config: TTreeConfig): TFolderType {\n const isExcluded = config.excludes?.some(\n (exc) => relDirPath === exc || relDirPath.startsWith(exc + '/')\n );\n if (isExcluded) {\n return 'foreign';\n }\n\n if (isRootFragment(relDirPath, config)) {\n return 'root-fragment';\n }\n\n const folderName = path.basename(relDirPath);\n\n if (folderName.startsWith('_') && folderName.includes('@shared')) {\n return 'fractal-branch';\n }\n\n const contents = readDirCached(relDirPath);\n const hasAccessNode = contents.files.some(\n (f) => f === 'index.ts' || f === 'index.js'\n );\n\n const isRoute =\n config.routeHierarchies &&\n config.routeHierarchies.some((rh) =>\n rh.paths.some((rp) => {\n if (relDirPath.startsWith(rp + '/')) {\n const remainder = relDirPath.substring(rp.length + 1);\n const segments = remainder.split('/');\n return !segments.some(\n (seg) => seg.endsWith('@shared') || seg.includes('@shared')\n );\n }\n return false;\n })\n );\n\n if (isRoute && !hasAccessNode) {\n return 'layer';\n }\n\n if (folderName.startsWith('_')) {\n const catConfig = getCategoryConfig(relDirPath, config);\n if (catConfig) {\n return 'category';\n }\n\n return 'layer';\n }\n\n const isCategory =\n config.categories &&\n config.categories.some((c) => c.name === '_' + folderName);\n if (isCategory && !hasAccessNode) {\n return 'category';\n }\n\n if (hasAccessNode) {\n return 'fragment';\n }\n\n return 'invalid-fragment';\n}\n","import type { TCacheState } from './cache.type.js';\n\n/**\n * Persistent global caching state mapping to optimized native collections.\n * Persists for the lifetime of a single ESLint run.\n * Cleaned up between testing suites dynamically using clearDirCache.\n */\nexport const state: TCacheState = {\n categoryConfigCache: new Map(),\n classifyCache: new Map(),\n dirCache: {},\n packageImports: null,\n projectRoot: process.cwd(),\n resolvedImportPathCache: new Map(),\n rolesCache: new WeakMap(),\n treeConfigCache: new Map(),\n treeConfigIncludingExcludedCache: new Map(),\n};\n","import type {\n TRootFragmentConfig,\n TTreeConfig,\n} from '../../../_types/faf.type.js';\n\n/**\n * Searches the tree configuration for the Root Fragment configuration matching the given path.\n * Traverses recursively down through sub-root configurations.\n *\n * @param relDirPath - Directory path relative to the project root.\n * @param config - Tree configuration.\n * @returns The matching Root Fragment configuration or null if not found.\n */\nexport function getRootFragmentConfig(\n relDirPath: string,\n config: TTreeConfig\n): null | TRootFragmentConfig {\n const checkConfig = (\n rfConfig: TRootFragmentConfig\n ): null | TRootFragmentConfig => {\n if (rfConfig.paths.includes(relDirPath)) {\n return rfConfig;\n }\n if (rfConfig.subRootFragments) {\n for (const sub of rfConfig.subRootFragments) {\n const res = checkConfig(sub);\n if (res) return res;\n }\n }\n return null;\n };\n\n if (config.rootFragments) {\n for (const rf of config.rootFragments) {\n const res = checkConfig(rf);\n if (res) return res;\n }\n }\n return null;\n}\n","import type { TTreeConfig } from '../../../_types/faf.type.js';\n\nimport { getRootFragmentConfig } from '../../_primitives/get-root-fragment-config/index.js';\n\n/**\n * Checks if a relative directory path corresponds to a configured Root Fragment.\n *\n * @param relDirPath - Directory path relative to the project root.\n * @param config - Tree configuration.\n * @returns True if the path is a Root Fragment.\n */\nexport function isRootFragment(\n relDirPath: string,\n config: TTreeConfig\n): boolean {\n return getRootFragmentConfig(relDirPath, config) !== null;\n}\n","import path from 'path';\n\nimport { state } from '#_utils@shared/_stores/cache/index.js';\n\nimport type { TCategoryConfig, TTreeConfig } from '../../../_types/faf.type.js';\n\n/**\n * Returns the TCategoryConfig for a given path by traversing upwards to the closest Category folder.\n * Result is cached in `state.categoryConfigCache`.\n *\n * @param relDirPath - Directory path relative to the project root.\n * @param config - Tree configuration.\n * @returns The Category configuration or null if not in a Category.\n */\nexport function getCategoryConfig(\n relDirPath: string,\n config: TTreeConfig\n): null | TCategoryConfig {\n const cached = state.categoryConfigCache.get(relDirPath);\n if (cached !== undefined) {\n return cached;\n }\n\n let result: null | TCategoryConfig = null;\n let current = relDirPath;\n while (current && current !== '.' && current !== '/') {\n const folderName = path.basename(current);\n if (folderName.startsWith('_') && !folderName.includes('@shared')) {\n const catConfig = config.categories?.find((c) => c.name === folderName);\n if (catConfig) {\n result = catConfig;\n break;\n }\n } else {\n break;\n }\n const parent = path.dirname(current).replace(/\\\\/g, '/');\n if (parent === current) break;\n current = parent;\n }\n\n state.categoryConfigCache.set(relDirPath, result);\n return result;\n}\n","import fs from 'fs';\nimport path from 'path';\n\nimport { state } from '#_utils@shared/_stores/cache/index.js';\n\n/**\n * Returns a cached record of files and directories within a target directory path.\n * Limits disk access by caching results in `state.dirCache` on the first miss.\n * Performs a single fs.readdirSync operation to optimize synchronous I/O.\n *\n * @param relDirPath - Directory path relative to the project root.\n * @returns Object with arrays of directory names and file names.\n */\nexport function readDirCached(relDirPath: string): {\n dirs: string[];\n files: string[];\n} {\n const absPath = path\n .resolve(state.projectRoot, relDirPath)\n .replace(/\\\\/g, '/');\n if (state.dirCache[absPath]) {\n return state.dirCache[absPath];\n }\n\n try {\n const entries = fs.readdirSync(absPath, { withFileTypes: true });\n const files: string[] = [];\n const dirs: string[] = [];\n\n for (const entry of entries) {\n if (entry.isFile()) {\n files.push(entry.name);\n } else if (entry.isDirectory()) {\n dirs.push(entry.name);\n }\n }\n\n state.dirCache[absPath] = { dirs, files };\n return state.dirCache[absPath];\n } catch {\n return { dirs: [], files: [] };\n }\n}\n","import { state } from '#_utils@shared/_stores/cache/index.js';\n\nimport type { TFafSettings, TTreeConfig } from '../../../_types/faf.type.js';\n\n/**\n * Finds the tree configuration that includes the given relative file path,\n * excluding paths designated as Foreign Domains. Uses `state.treeConfigCache`\n * to speed up subsequent queries.\n *\n * @param relPath - Path relative to the project root.\n * @param settings - The global FAF settings containing trees configuration.\n * @returns The matching tree configuration or null if not found or excluded.\n */\nexport function findTreeConfig(\n relPath: string,\n settings: TFafSettings\n): null | TTreeConfig {\n if (!settings || !settings.trees) {\n return null;\n }\n\n const cached = state.treeConfigCache.get(relPath);\n if (cached !== undefined) {\n return cached;\n }\n\n let result: null | TTreeConfig = null;\n for (const tree of settings.trees) {\n const isIncluded = tree.includes.some(\n (inc) => relPath === inc || relPath.startsWith(inc + '/')\n );\n const isExcluded = tree.excludes?.some(\n (exc) => relPath === exc || relPath.startsWith(exc + '/')\n );\n\n if (isIncluded && !isExcluded) {\n result = tree;\n break;\n }\n }\n\n state.treeConfigCache.set(relPath, result);\n return result;\n}\n","import path from 'path';\n\nimport { state } from '#_utils@shared/_stores/cache/index.js';\n\n/**\n * Normalizes any path to be relative to the project root and formats it with forward slashes.\n *\n * @param absoluteOrRelative - Input path string.\n * @returns Normalized relative path.\n */\nexport function toRelativePath(absoluteOrRelative: string): string {\n let abs = absoluteOrRelative;\n if (!path.isAbsolute(abs)) {\n abs = path.resolve(state.projectRoot, abs);\n }\n const rel = path.relative(state.projectRoot, abs);\n return rel.replace(/\\\\/g, '/');\n}\n","import type { Rule } from 'eslint';\n\nimport path from 'path';\n\nimport type { TFafSettings } from '#_rules@shared/_types/faf.type.js';\n\nimport { classifyFolder } from '#_rules@shared/_utils/_aggregates/classify-folder/index.js';\nimport { findTreeConfig } from '#_rules@shared/_utils/_primitives/find-tree-config/index.js';\nimport { toRelativePath } from '#_rules@shared/_utils/_primitives/to-relative-path/index.js';\n\n/**\n * @fileoverview Rule: faf/enforce-access-node\n * Enforces the FAF Law of Access Node Integrity.\n *\n * FAF Law: An Access Node (barrel file like `index.ts`) must only define and export the Fragment's public interface.\n * It is restricted to import/export only its own sibling Fragment Nodes using simple relative paths.\n *\n * Valid:\n * - `export * from './button.component';` inside `button/index.ts`.\n * - `export type * from './button.type';` inside `button/index.ts`.\n *\n * Invalid:\n * - Importing/exporting files from subfolders (e.g. `export * from './_components/child';`).\n * - Importing/exporting files from parent folders or external paths (e.g. `export * from '../utils';`).\n * - Exporting files that do not share the parent Fragment's name prefix.\n */\nconst rule: Rule.RuleModule = {\n create(context) {\n const absPath = context.filename;\n const relPath = toRelativePath(absPath);\n const fileName = path.basename(relPath);\n\n if (fileName !== 'index.ts' && fileName !== 'index.js') {\n return {};\n }\n\n const settings = context.settings as { faf?: TFafSettings };\n if (!settings.faf) {\n return {};\n }\n\n const config = findTreeConfig(relPath, settings.faf);\n if (!config) {\n return {};\n }\n\n const relDir = path.dirname(relPath);\n const parentType = classifyFolder(relDir, config);\n\n // If it's not a Fragment, naming-conventions handles it, but let's ignore it here\n if (parentType !== 'fragment') {\n return {};\n }\n\n function checkSource(node: Rule.Node, sourceVal: string) {\n // Matches only \"./filename\" with no further \"/\" (no subfolders, no parent folders)\n const isValidSibling = /^\\.\\/[^/]+$/.test(sourceVal);\n if (!isValidSibling) {\n context.report({\n message: `Access Node (index file) can only import or export its own sibling Fragment Nodes using simple relative paths (e.g. \"./example.component\"). Got \"${sourceVal}\".`,\n node,\n });\n return;\n }\n\n const importedFilename = path.basename(sourceVal);\n if (\n importedFilename === 'index' ||\n importedFilename === 'index.ts' ||\n importedFilename === 'index.js' ||\n importedFilename === 'README.md' ||\n importedFilename === 'package.json'\n ) {\n return;\n }\n\n const fragmentName = path.basename(relDir);\n if (!importedFilename.startsWith(fragmentName + '.')) {\n context.report({\n message: `Access Node (index file) can only re-export its own Fragment Nodes (names starting with \"${fragmentName}.\"). Got \"${importedFilename}\".`,\n node,\n });\n }\n }\n\n return {\n ExportAllDeclaration(node) {\n checkSource(node, node.source.value as string);\n },\n ExportNamedDeclaration(node) {\n if (node.source) {\n checkSource(node, node.source.value as string);\n }\n },\n ImportDeclaration(node) {\n checkSource(node, node.source.value as string);\n },\n };\n },\n meta: {\n docs: {\n description: 'Enforce Access Node rules for Fragments',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nexport default rule;\n","import type { Rule } from 'eslint';\n\nimport path from 'path';\n\nimport type {\n TFafSettings,\n THttpMethod,\n} from '#_rules@shared/_types/faf.type.js';\n\nimport { classifyFolder } from '#_rules@shared/_utils/_aggregates/classify-folder/index.js';\nimport { findTreeConfig } from '#_rules@shared/_utils/_primitives/find-tree-config/index.js';\nimport { getCategoryConfig } from '#_rules@shared/_utils/_primitives/get-category-config/index.js';\nimport { getFileRole } from '#_rules@shared/_utils/_primitives/get-file-role/index.js';\nimport { getProjectRoot } from '#_rules@shared/_utils/_primitives/get-project-root/index.js';\nimport { getRootFragmentConfig } from '#_rules@shared/_utils/_primitives/get-root-fragment-config/index.js';\nimport { readDirCached } from '#_rules@shared/_utils/_primitives/read-dir-cached/index.js';\nimport { toRelativePath } from '#_rules@shared/_utils/_primitives/to-relative-path/index.js';\n\nconst KEBAB_CASE_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;\nconst DEFAULT_HTTP_METHODS: THttpMethod[] = [\n 'connect',\n 'delete',\n 'get',\n 'head',\n 'options',\n 'patch',\n 'post',\n 'put',\n 'trace',\n];\n\n/**\n * @fileoverview Rule: faf/naming-conventions\n * Enforces FAF folder taxonomy, naming conventions, and file role suffixes.\n *\n * FAF Law:\n * - Folders and files in the logical domain must use kebab-case.\n * - Categories/Layers must start with an underscore (e.g. `_components`).\n * - Fragments must NOT start with an underscore.\n * - Sibling Fragment Nodes must share the parent Fragment folder's name.\n * - All logical nodes must end with a valid role suffix (e.g. `[name].[role].ts`).\n * - Fragments placed under a Category (or Route) must contain a Master Node with the corresponding role.\n * - Every Fragment must have a Master Node, and Fragment Nodes must have unique Roles.\n * - A route terminal Fragment's name must follow the \"<method>-<object>\" pattern.\n */\nconst rule: Rule.RuleModule = {\n create(context) {\n return {\n Program(node) {\n const absPath = context.filename;\n const relPath = toRelativePath(absPath);\n const settings = context.settings as { faf?: TFafSettings };\n\n if (!settings.faf) {\n return;\n }\n\n const config = findTreeConfig(relPath, settings.faf);\n if (!config) {\n return;\n }\n\n const relDir = path.dirname(relPath);\n const folderName = path.basename(relDir);\n const parentType = classifyFolder(relDir, config);\n\n if (parentType === 'foreign') {\n return;\n }\n\n const fileName = path.basename(relPath);\n\n // Validate folder conventions across all ancestors, not just the immediate parent\n let currentDir = relDir;\n while (currentDir && currentDir !== '.' && currentDir !== '/') {\n const isInTree = config.includes.some(\n (inc) => currentDir === inc || currentDir.startsWith(inc + '/')\n );\n const isExcluded =\n config.excludes?.some(\n (exc) => currentDir === exc || currentDir.startsWith(exc + '/')\n ) ?? false;\n\n if (!isInTree || isExcluded) {\n break;\n }\n\n const currentFolderName = path.basename(currentDir);\n const currentType = classifyFolder(currentDir, config);\n\n // Layers and Categories must be prefixed with an underscore\n if (\n (currentType === 'layer' || currentType === 'category') &&\n !currentFolderName.startsWith('_')\n ) {\n context.report({\n message: `Layer/Category directory \"${currentFolderName}\" must be prefixed with an underscore (e.g. \"_${currentFolderName}\").`,\n node,\n });\n }\n\n // Fragments must NOT be prefixed with an underscore\n if (\n currentFolderName.startsWith('_') &&\n !currentFolderName.includes('@shared')\n ) {\n const contents = readDirCached(currentDir);\n const hasIndex =\n contents.files.includes('index.ts') ||\n contents.files.includes('index.js');\n if (hasIndex) {\n context.report({\n message: `Directory \"${currentFolderName}\" has an Access Node (index.ts) but its name starts with \"_\". Fragments must not be prefixed with underscore.`,\n node,\n });\n }\n }\n\n if (currentFolderName !== 'src') {\n let baseFolderName = currentFolderName.replace(/@shared$/, '');\n if (baseFolderName.startsWith('_')) {\n baseFolderName = baseFolderName.substring(1);\n }\n if (\n baseFolderName.startsWith('[') &&\n baseFolderName.endsWith(']')\n ) {\n baseFolderName = baseFolderName.substring(\n 1,\n baseFolderName.length - 1\n );\n }\n const isKebab = KEBAB_CASE_REGEX.test(baseFolderName);\n if (!isKebab) {\n context.report({\n message: `Folder name \"${currentFolderName}\" must be in kebab-case (e.g. \"_my-folder\" or \"_[my-param]\").`,\n node,\n });\n }\n }\n\n if (currentType === 'fractal-branch') {\n const expectedScope = path.basename(path.dirname(currentDir));\n const normalizedExpectedScope = expectedScope.startsWith('_')\n ? expectedScope.substring(1)\n : expectedScope;\n const expectedName = `_${normalizedExpectedScope}@shared`;\n if (currentFolderName !== expectedName) {\n context.report({\n message: `Fractal Branch name \"${currentFolderName}\" must match its parent scope name: \"${expectedName}\".`,\n node,\n });\n }\n }\n\n if (currentType === 'invalid-fragment') {\n context.report({\n message: `Fragment directory \"${currentFolderName}\" is missing an Access Node (index.ts/index.js).`,\n node,\n });\n }\n\n const relParentDir = path.dirname(currentDir).replace(/\\\\/g, '/');\n const parentFolderName = path.basename(relParentDir);\n // 'unknown' means relParentDir falls outside any configured tree path,\n // i.e. it is the literal Root Container\n const relParentType =\n relParentDir === '.' || relParentDir === '/'\n ? 'unknown'\n : classifyFolder(relParentDir, config);\n\n if (currentType === 'root-fragment') {\n if (\n relParentType !== 'root-fragment' &&\n relParentType !== 'unknown'\n ) {\n context.report({\n message: `Root Fragment directory \"${currentFolderName}\" must be placed directly inside a Root Container or another Root Fragment, not inside \"${parentFolderName}\" (classified as ${relParentType}).`,\n node,\n });\n }\n }\n\n if (currentType === 'layer') {\n if (\n relParentType === 'fragment' ||\n relParentType === 'invalid-fragment'\n ) {\n context.report({\n message: `Layer directory \"${currentFolderName}\" cannot be placed inside \"${parentFolderName}\" (classified as ${relParentType}). Layers cannot reside within Fragments.`,\n node,\n });\n }\n }\n\n // A Fragment cannot be placed directly:\n // - under a Layer (unless it terminates a configured Route Hierarchy)\n // - inside another Fragment (must be nested within a Private Category)\n // - inside a Fractal Branch\n // - inside a nested Root Fragment (must be contained within a Category)\n if (\n currentType === 'fragment' ||\n currentType === 'invalid-fragment'\n ) {\n const isParentRootContainer =\n config.includes.includes(relParentDir);\n if (relParentType === 'layer') {\n const isParentRoute =\n config.routeHierarchies &&\n config.routeHierarchies.some((rh) =>\n rh.paths.some(\n (rp) =>\n relParentDir === rp || relParentDir.startsWith(rp + '/')\n )\n );\n if (!isParentRoute) {\n context.report({\n message: `Fragment directory \"${currentFolderName}\" cannot be placed directly inside Layer \"${parentFolderName}\". Fragments must be contained within a Category.`,\n node,\n });\n }\n } else if (\n relParentType === 'fragment' ||\n relParentType === 'invalid-fragment'\n ) {\n context.report({\n message: `Fragment directory \"${currentFolderName}\" cannot be placed directly inside Fragment \"${parentFolderName}\". Sub-Fragments must be contained within a Private Category.`,\n node,\n });\n } else if (relParentType === 'fractal-branch') {\n context.report({\n message: `Fragment directory \"${currentFolderName}\" cannot be placed directly inside Fractal Branch \"${parentFolderName}\". Fragments must be contained within a Category.`,\n node,\n });\n } else if (\n relParentType === 'root-fragment' &&\n !isParentRootContainer\n ) {\n context.report({\n message: `Fragment directory \"${currentFolderName}\" cannot be placed directly inside Root Fragment \"${parentFolderName}\". Fragments must be contained within a Category.`,\n node,\n });\n }\n }\n\n if (currentType === 'fractal-branch') {\n if (relParentType === 'fractal-branch') {\n context.report({\n message: `Fractal Branch \"${currentFolderName}\" cannot be placed inside another Fractal Branch \"${parentFolderName}\".`,\n node,\n });\n }\n }\n\n currentDir = path.dirname(currentDir).replace(/\\\\/g, '/');\n }\n\n if (parentType === 'layer') {\n context.report({\n message: `Layers cannot contain files directly. File \"${fileName}\" is placed directly inside Layer \"${folderName}\".`,\n node,\n });\n return;\n }\n\n if (parentType === 'fractal-branch') {\n context.report({\n message: `Fractal Branches cannot contain files directly. File \"${fileName}\" is placed directly inside Fractal Branch \"${folderName}\".`,\n node,\n });\n return;\n }\n\n if (parentType === 'invalid-fragment') {\n return; // Already reported by ancestor loop\n }\n\n // Must run before the Access Node check below: a Root Fragment's internal\n // naming (including a file named \"index.ts\") is governed by \"rootNodes\", not\n // by the ordinary Fragment taxonomy\n const rfConfig = getRootFragmentConfig(relDir, config);\n if (rfConfig) {\n const flatRootNodes = rfConfig.rootNodes.flat();\n const isMatchedRootNode = flatRootNodes.some((rn) => {\n if (rn.includes('/')) {\n const rfPath = rfConfig.paths[0] ?? '';\n const absRn = path.resolve(getProjectRoot(), rfPath, rn);\n return toRelativePath(absRn) === relPath;\n }\n return rn === fileName;\n });\n\n if (isMatchedRootNode) {\n return; // Valid Root Node\n }\n }\n\n if (fileName === 'index.ts' || fileName === 'index.js') {\n if (parentType !== 'fragment') {\n context.report({\n message: `Access Nodes (\"index.ts/index.js\") are exclusive to Fragments. Found index file directly inside \"${folderName}\" (classified as ${parentType}).`,\n node,\n });\n } else {\n const contents = readDirCached(relDir);\n const hasFragmentNode = contents.files.some(\n (f) =>\n f !== 'index.ts' &&\n f !== 'index.js' &&\n f !== 'README.md' &&\n f !== 'package.json' &&\n f !== 'tsconfig.json'\n );\n if (!hasFragmentNode) {\n context.report({\n message: `Fragment \"${folderName}\" has no Master Node. Every Fragment must contain at least one Fragment Node establishing its Role.`,\n node,\n });\n }\n }\n return;\n }\n\n if (\n fileName === 'README.md' ||\n fileName === 'package.json' ||\n fileName === 'tsconfig.json'\n ) {\n return;\n }\n\n const role = getFileRole(fileName, config);\n const ext = path.extname(fileName);\n\n // A Logical Node's name admits exactly one Role segment\n const allRoleNames = new Set(config.roles.flat());\n const roleSegments = fileName\n .slice(0, fileName.length - ext.length)\n .split('.')\n .slice(1)\n .filter((part) => allRoleNames.has(part));\n const multiRoleMessage = `File \"${fileName}\" composes multiple Roles (\"${roleSegments.join('\", \"')}\") in its name. A Logical Node may declare only one Role; promote the detail that needs its own Role to an autonomous Sub-Fragment.`;\n\n if (parentType === 'fragment') {\n // Check route hierarchy role constraint\n const matchedRoute = config.routeHierarchies?.find((rh) =>\n rh.paths.some((rp) => relDir === rp || relDir.startsWith(rp + '/'))\n );\n if (matchedRoute) {\n const contents = readDirCached(relDir);\n const fileRoles = contents.files.map((f) => getFileRole(f, config));\n if (!fileRoles.includes(matchedRoute.role)) {\n context.report({\n message: `Route terminal Fragment \"${folderName}\" must contain a Master Node with role \"${matchedRoute.role}\" (e.g. \"${folderName}.${matchedRoute.role}.ts\").`,\n node,\n });\n }\n\n const httpMethods =\n matchedRoute.httpMethods ?? DEFAULT_HTTP_METHODS;\n const routeNameRegex = new RegExp(\n `^(${httpMethods.join('|')})-[a-z0-9]+(-[a-z0-9]+)*$`\n );\n if (!routeNameRegex.test(folderName)) {\n context.report({\n message: `Route terminal Fragment \"${folderName}\" must follow the \"<method>-<object>\" pattern with a lowercase HTTP method (${httpMethods.join(', ')}).`,\n node,\n });\n }\n }\n\n // Check category role constraint\n let currentParent = path.dirname(relDir).replace(/\\\\/g, '/');\n let categoryConfig = null;\n let categoryFolderName = '';\n while (\n currentParent &&\n currentParent !== '.' &&\n currentParent !== '/'\n ) {\n const parentType = classifyFolder(currentParent, config);\n if (parentType === 'category') {\n categoryConfig = getCategoryConfig(currentParent, config);\n categoryFolderName = path.basename(currentParent);\n break;\n } else if (\n parentType === 'fragment' ||\n parentType === 'root-fragment' ||\n parentType === 'layer'\n ) {\n break;\n }\n const nextParent = path.dirname(currentParent).replace(/\\\\/g, '/');\n if (nextParent === currentParent) break;\n currentParent = nextParent;\n }\n\n if (categoryConfig && categoryConfig.role) {\n const contents = readDirCached(relDir);\n const fileRoles = contents.files.map((f) => getFileRole(f, config));\n if (!fileRoles.includes(categoryConfig.role)) {\n context.report({\n message: `Fragment \"${folderName}\" inside Category \"${categoryFolderName}\" must contain a Master Node with role \"${categoryConfig.role}\" (e.g. \"${folderName}.${categoryConfig.role}.ts\").`,\n node,\n });\n }\n }\n\n if (!fileName.startsWith(folderName + '.')) {\n context.report({\n message: `Fragment Node \"${fileName}\" must share the parent Fragment name: \"${folderName}.<role>${ext}\".`,\n node,\n });\n }\n\n // In a Fragment, ALL files must have a role, even if they have whitelisted extensions\n if (!role) {\n context.report({\n message: `File \"${fileName}\" inside Fragment \"${folderName}\" must have an explicit role suffix (e.g. \"${folderName}.style${ext}\").`,\n node,\n });\n } else if (roleSegments.length > 1) {\n context.report({ message: multiRoleMessage, node });\n } else {\n const contents = readDirCached(relDir);\n // Exclude the Access Node: it always resolves to role 'index', which a\n // Fragment Node could otherwise also carry via an explicit \".index\" suffix\n const duplicate = contents.files.find(\n (f) =>\n f !== fileName &&\n f !== 'index.ts' &&\n f !== 'index.js' &&\n getFileRole(f, config) === role\n );\n if (duplicate) {\n context.report({\n message: `Fragment Node \"${fileName}\" shares Role \"${role}\" with sibling \"${duplicate}\". Each Fragment Node must have a unique Role within its Fragment.`,\n node,\n });\n }\n }\n }\n\n if (parentType === 'category') {\n const catConfig = getCategoryConfig(relDir, config);\n if (catConfig) {\n const allowedExts = catConfig.allowedExtensions ?? [\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n ];\n if (!allowedExts.includes(ext)) {\n context.report({\n message: `File extension \"${ext}\" is not allowed in Category \"${folderName}\". Allowed extensions: ${allowedExts.join(', ')}.`,\n node,\n });\n return;\n }\n\n const isCodeExt = ['.js', '.jsx', '.ts', '.tsx'].includes(ext);\n if (isCodeExt) {\n if (!role) {\n context.report({\n message: `Logical Node \"${fileName}\" inside Category \"${folderName}\" must have a role suffix.`,\n node,\n });\n } else if (role !== catConfig.role) {\n context.report({\n message: `Role \"${role}\" for file \"${fileName}\" does not match the expected Category role \"${catConfig.role}\".`,\n node,\n });\n } else if (roleSegments.length > 1) {\n context.report({ message: multiRoleMessage, node });\n }\n } else {\n // Asset files\n if (role && role !== catConfig.role) {\n context.report({\n message: `Role \"${role}\" for asset \"${fileName}\" does not match the expected Category role \"${catConfig.role}\".`,\n node,\n });\n } else if (role && roleSegments.length > 1) {\n context.report({ message: multiRoleMessage, node });\n }\n }\n }\n }\n },\n };\n },\n meta: {\n docs: {\n description:\n 'Enforce naming conventions and folder taxonomy in FAF architecture',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nexport default rule;\n","import { state } from '#_utils@shared/_stores/cache/index.js';\n\nimport type { TTreeConfig } from '../../../_types/faf.type.js';\n\n/**\n * Extracts the architectural role of a file based on its name extensions.\n * Returns special role 'index' for Access Nodes.\n * Uses `state.rolesCache` to store configurations flattened as Set for O(1) lookups.\n *\n * @param fileName - Base name of the file.\n * @param config - Tree configuration.\n * @returns The matching role suffix or null if none.\n */\nexport function getFileRole(\n fileName: string,\n config: TTreeConfig\n): null | string {\n // Exclusions: Access nodes\n if (fileName === 'index.ts' || fileName === 'index.js') {\n return 'index';\n }\n\n const parts = fileName.split('.');\n\n // Cache flat roles as a Set inside WeakMap\n let allRoles = state.rolesCache.get(config);\n if (!allRoles) {\n allRoles = new Set(config.roles.flat());\n state.rolesCache.set(config, allRoles);\n }\n\n // Search from right to left\n for (let i = parts.length - 2; i >= 1; i--) {\n const part = parts[i];\n if (part && allRoles.has(part)) {\n return part;\n }\n }\n\n return null;\n}\n","import { state } from '#_utils@shared/_stores/cache/index.js';\n\n/**\n * Returns the currently configured project root directory path.\n */\nexport function getProjectRoot(): string {\n return state.projectRoot;\n}\n","import type { Rule } from 'eslint';\n\nimport path from 'path';\n\nimport type { TFafSettings } from '#_rules@shared/_types/faf.type.js';\n\nimport { classifyFolder } from '#_rules@shared/_utils/_aggregates/classify-folder/index.js';\nimport { resolveImportPath } from '#_rules@shared/_utils/_aggregates/resolve-import-path/index.js';\nimport { findTreeConfig } from '#_rules@shared/_utils/_primitives/find-tree-config/index.js';\nimport { toRelativePath } from '#_rules@shared/_utils/_primitives/to-relative-path/index.js';\n\n/**\n * @fileoverview Rule: faf/no-direct-fragment-import\n * Enforces the FAF Law of Fragment Encapsulation.\n *\n * FAF Law: External files must never import directly a Fragment's internal files.\n * All imports from outside the Fragment's boundaries must pass exclusively through its Access Node (`index.ts`).\n *\n * Valid:\n * - `import { Button } from '#_ui/_components/button/index.js';`\n *\n * Invalid:\n * - `import { Button } from '#_ui/_components/button/button.component.js';`\n */\nconst rule: Rule.RuleModule = {\n create(context) {\n const absPath = context.filename;\n const relPath = toRelativePath(absPath);\n const settings = context.settings as { faf?: TFafSettings };\n\n if (!settings.faf) {\n return {};\n }\n\n const config = findTreeConfig(relPath, settings.faf);\n if (!config) {\n return {};\n }\n\n function checkImport(node: Rule.Node, importValue: string) {\n const resolvedRelPath = resolveImportPath(\n importValue,\n relPath,\n settings.faf!\n );\n if (!resolvedRelPath) {\n return; // External import or unresolved alias\n }\n\n const importedDir = path.dirname(resolvedRelPath);\n const importedFile = path.basename(resolvedRelPath);\n\n // If the imported file is inside a Fragment\n const importedFolderType = classifyFolder(importedDir, config!);\n if (importedFolderType === 'fragment') {\n const isAccessNode =\n importedFile === 'index.ts' || importedFile === 'index.js';\n if (!isAccessNode) {\n // Only a sibling Fragment Node (same directory) is exempt from the Access Node\n const isInside = path.dirname(relPath) === importedDir;\n if (!isInside) {\n context.report({\n message: `Direct import of Fragment internal file \"${importedFile}\" is forbidden. You must import through its Access Node (index file) in \"${importedDir}\".`,\n node,\n });\n }\n }\n }\n }\n\n return {\n ExportAllDeclaration(node) {\n checkImport(node, node.source.value as string);\n },\n ExportNamedDeclaration(node) {\n if (node.source) {\n checkImport(node, node.source.value as string);\n }\n },\n ImportDeclaration(node) {\n checkImport(node, node.source.value as string);\n },\n };\n },\n meta: {\n docs: {\n description:\n 'Prevent direct import of Fragment internal files from outside the Fragment',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nexport default rule;\n","import fs from 'fs';\nimport path from 'path';\n\nimport { state } from '#_utils@shared/_stores/cache/index.js';\n\nimport type { TFafSettings } from '../../../_types/faf.type.js';\n\nimport { readDirCached } from '../../_primitives/read-dir-cached/index.js';\nimport { toRelativePath } from '../../_primitives/to-relative-path/index.js';\n\n/**\n * Resolves an import path into a project-root-relative path.\n * Checks against aliases (both package.json subpath imports and faf.config.ts settings).\n * Caches mapping in `state.resolvedImportPathCache` to optimize duplicate node checks.\n *\n * @param importPath - Import value (e.g. \"./helper.js\" or \"#_rules@shared/foo\").\n * @param currentFileRelative - Path of the file performing the import, relative to root.\n * @param settings - Global FAF settings.\n * @returns The resolved project-relative path, or empty string if it's an external library.\n */\nexport function resolveImportPath(\n importPath: string,\n currentFileRelative: string,\n settings: TFafSettings\n): string {\n const cacheKey = `${currentFileRelative}::${importPath}`;\n const cached = state.resolvedImportPathCache.get(cacheKey);\n if (cached !== undefined) {\n return cached;\n }\n\n const result = _resolveImportPath(importPath, currentFileRelative, settings);\n state.resolvedImportPathCache.set(cacheKey, result);\n return result;\n}\n\nfunction _resolveImportPath(\n importPath: string,\n currentFileRelative: string,\n settings: TFafSettings\n): string {\n const pkgImports = loadPackageImports(state.projectRoot);\n const aliases =\n Object.keys(pkgImports).length > 0 ? pkgImports : settings?.aliases || {};\n\n // Check if it matches any registered alias prefix\n let matchedAlias: null | string = null;\n let longestMatch = 0;\n\n for (const alias of Object.keys(aliases)) {\n if (importPath === alias || importPath.startsWith(alias + '/')) {\n if (alias.length > longestMatch) {\n longestMatch = alias.length;\n matchedAlias = alias;\n }\n }\n }\n\n let relResolved: string;\n\n if (matchedAlias) {\n // 1. Alias resolution\n const target = aliases[matchedAlias];\n if (target) {\n const remainder = importPath.substring(matchedAlias.length);\n const absTarget = path.resolve(state.projectRoot, target + remainder);\n relResolved = toRelativePath(absTarget);\n } else {\n return ''; // Unresolved alias target\n }\n } else {\n // 2. Relative/absolute path resolution\n if (importPath.startsWith('.') || importPath.startsWith('/')) {\n const absCurrentDir = path.dirname(\n path.resolve(state.projectRoot, currentFileRelative)\n );\n const absResolved = path.resolve(absCurrentDir, importPath);\n relResolved = toRelativePath(absResolved);\n } else {\n return ''; // External import (e.g. library from node_modules)\n }\n }\n\n return finalizeResolvedPath(relResolved);\n}\n\n/**\n * Bare script extensions (i.e. without any additional Role/suffix segment) considered\n * when disambiguating an extension-less import against multiple same-prefix candidates.\n */\nconst SCRIPT_EXTENSIONS = new Set([\n 'cjs',\n 'cts',\n 'js',\n 'jsx',\n 'mjs',\n 'mts',\n 'ts',\n 'tsx',\n]);\n\n/**\n * Helper to check if a resolved relative path points to a directory with an index file,\n * or a file missing its extension, and resolves it accordingly.\n */\nfunction finalizeResolvedPath(relResolved: string): string {\n const resolvedDir = path.dirname(relResolved).replace(/\\\\/g, '/');\n const resolvedBase = path.basename(relResolved);\n\n // 1. Check if the path itself is a directory containing index.ts/js\n const dirContents = readDirCached(relResolved);\n if (dirContents.files.includes('index.ts')) {\n return (relResolved === '.' ? '' : relResolved + '/') + 'index.ts';\n }\n if (dirContents.files.includes('index.js')) {\n return (relResolved === '.' ? '' : relResolved + '/') + 'index.js';\n }\n\n // 2. Check if the path is a file missing its extension\n const parentContents = readDirCached(resolvedDir);\n const exactMatch = parentContents.files.find((f) => f === resolvedBase);\n if (!exactMatch) {\n // Multiple files can share the same prefix (e.g. \"foo.ts\" and \"foo.spec.ts\" both\n // start with \"foo.\"). Prefer the candidate whose remainder is a bare script\n // extension over one carrying an additional Role/suffix segment, so resolution\n // doesn't depend on filesystem readdir order.\n const candidates = parentContents.files.filter((f) =>\n f.startsWith(resolvedBase + '.')\n );\n const matchWithExt =\n candidates.find((f) =>\n SCRIPT_EXTENSIONS.has(f.slice(resolvedBase.length + 1))\n ) ?? candidates[0];\n if (matchWithExt) {\n return (resolvedDir === '.' ? '' : resolvedDir + '/') + matchWithExt;\n }\n }\n\n return relResolved;\n}\n\nfunction loadPackageImports(projectRootPath: string): Record<string, string> {\n if (state.packageImports !== null) {\n return state.packageImports;\n }\n\n state.packageImports = {};\n\n // Isolate the test environment from physical package.json of the host plugin codebase\n const isTest =\n typeof process !== 'undefined' &&\n (process.env.NODE_ENV === 'test' || process.env.VITEST === 'true');\n if (isTest) {\n return state.packageImports;\n }\n\n const pkgPath = path.resolve(projectRootPath, 'package.json');\n if (fs.existsSync(pkgPath)) {\n try {\n const pkgContent = fs.readFileSync(pkgPath, 'utf8');\n const pkg = JSON.parse(pkgContent) as {\n imports?: Record<string, unknown>;\n };\n if (pkg.imports) {\n for (const [key, val] of Object.entries(pkg.imports)) {\n if (typeof val === 'string') {\n // Strip wildcards\n const cleanKey = key.endsWith('/*')\n ? key.slice(0, -2)\n : key.endsWith('*')\n ? key.slice(0, -1)\n : key;\n let cleanVal = val.endsWith('/*')\n ? val.slice(0, -2)\n : val.endsWith('*')\n ? val.slice(0, -1)\n : val;\n\n // Normalize target path (remove leading './' or '/')\n if (cleanVal.startsWith('./')) {\n cleanVal = cleanVal.substring(2);\n } else if (cleanVal.startsWith('/')) {\n cleanVal = cleanVal.substring(1);\n }\n\n state.packageImports[cleanKey] = cleanVal;\n }\n }\n }\n } catch {\n // Ignore parsing errors and keep packageImports empty\n }\n }\n\n return state.packageImports;\n}\n","import type { Rule } from 'eslint';\n\nimport path from 'path';\n\nimport type { TFafSettings } from '#_rules@shared/_types/faf.type.js';\n\nimport { resolveImportPath } from '#_rules@shared/_utils/_aggregates/resolve-import-path/index.js';\nimport { findTreeConfig } from '#_rules@shared/_utils/_primitives/find-tree-config/index.js';\nimport { getFractalBranchOwner } from '#_rules@shared/_utils/_primitives/get-fractal-branch-owner/index.js';\nimport { getImmediateSubDomain } from '#_rules@shared/_utils/_primitives/get-immediate-sub-domain/index.js';\nimport { toRelativePath } from '#_rules@shared/_utils/_primitives/to-relative-path/index.js';\nimport { getPrivateCategoryInfo } from '#_rules@shared/_utils/_systems/get-private-category-info/index.js';\n\n/**\n * @fileoverview Rule: faf/no-fractal-branch-leak\n * Enforces the FAF Law of Fractal Branch Encapsulation.\n *\n * FAF Law: Fractal Branches (directories following the `_<Scope>@shared` naming convention)\n * hold internal shared implementations. They are private to their parent Scope's subtree\n * and cannot leak or be imported by files outside of that scope.\n *\n * Valid:\n * - A utility inside `src/_rules/_rules@shared/_utils/` importing from `src/_rules/_rules@shared/`.\n *\n * Invalid:\n * - A rule inside `src/_rules/naming-conventions/` importing from `src/_rules/_rules@shared/_utils/_utils@shared/` (out-of-scope).\n */\nconst rule: Rule.RuleModule = {\n create(context) {\n const absPath = context.filename;\n const relPath = toRelativePath(absPath);\n const settings = context.settings as { faf?: TFafSettings };\n\n if (!settings.faf) {\n return {};\n }\n\n const config = findTreeConfig(relPath, settings.faf);\n if (!config) {\n return {};\n }\n\n function checkImport(node: Rule.Node, importValue: string) {\n const resolvedRelPath = resolveImportPath(\n importValue,\n relPath,\n settings.faf!\n );\n if (!resolvedRelPath) {\n return; // External import or unresolved alias\n }\n\n const importedDir = path.dirname(resolvedRelPath);\n const fractalBranchOwner = getFractalBranchOwner(importedDir);\n\n if (fractalBranchOwner) {\n // The importing file must be inside the owner's sub-tree\n const isDescendant =\n relPath === fractalBranchOwner ||\n relPath.startsWith(fractalBranchOwner + '/');\n if (!isDescendant) {\n context.report({\n message: `Importing from Fractal Branch is forbidden. The imported resource is private to \"${fractalBranchOwner}\" and its descendants.`,\n node,\n });\n } else {\n // Even within an authorized Fractal Branch scope, a Private Category nested\n // inside it still applies its own, narrower access restriction\n const info = getPrivateCategoryInfo(importedDir, config!);\n if (info) {\n const { owner, privateCategoryPath } = info;\n const isPrivateDirectChild = path.dirname(relPath) === owner;\n\n const importerSubDomain = getImmediateSubDomain(\n relPath,\n privateCategoryPath\n );\n const importedSubDomain = getImmediateSubDomain(\n resolvedRelPath,\n privateCategoryPath\n );\n const isInsideSameSubDomain =\n importerSubDomain !== '' &&\n importerSubDomain === importedSubDomain;\n\n // `fractalBranchOwner` is already the closest Fractal Branch to importedDir (same\n // input as above), so if it lies inside the Private Category, `isDescendant` above\n // has already proven the importer's access to it.\n const isFractalBranchAllowed =\n fractalBranchOwner === privateCategoryPath ||\n fractalBranchOwner.startsWith(privateCategoryPath + '/');\n\n if (\n !isPrivateDirectChild &&\n !isInsideSameSubDomain &&\n !isFractalBranchAllowed\n ) {\n context.report({\n message: `Importing from Private Category is forbidden. The imported resource is private to \"${owner}\".`,\n node,\n });\n }\n }\n }\n }\n }\n\n return {\n ExportAllDeclaration(node) {\n checkImport(node, node.source.value as string);\n },\n ExportNamedDeclaration(node) {\n if (node.source) {\n checkImport(node, node.source.value as string);\n }\n },\n ImportDeclaration(node) {\n checkImport(node, node.source.value as string);\n },\n };\n },\n meta: {\n docs: {\n description:\n 'Prevent leakage of Fractal Branch internals outside their owner scope',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nexport default rule;\n","import path from 'path';\n\n/**\n * Returns the owner of the closest Fractal Branch ancestor, or null.\n */\nexport function getFractalBranchOwner(relPath: string): null | string {\n let current = relPath;\n while (current && current !== '.' && current !== '/') {\n const folderName = path.basename(current);\n if (folderName.startsWith('_') && folderName.includes('@shared')) {\n return path.dirname(current).replace(/\\\\/g, '/');\n }\n const parent = path.dirname(current).replace(/\\\\/g, '/');\n if (parent === current) {\n break;\n }\n current = parent;\n }\n return null;\n}\n","/**\n * Returns the immediate sub-domain path relative to the private category path,\n * or the private category path itself if no sub-segment exists.\n * Returns an empty string if the relPath is not inside the private category path.\n */\nexport function getImmediateSubDomain(\n relPath: string,\n privateCategoryPath: string\n): string {\n if (\n relPath !== privateCategoryPath &&\n !relPath.startsWith(privateCategoryPath + '/')\n ) {\n return '';\n }\n const relative = relPath.substring(privateCategoryPath.length + 1);\n const firstSegment = relative.split('/')[0];\n return firstSegment\n ? privateCategoryPath + '/' + firstSegment\n : privateCategoryPath;\n}\n","import path from 'path';\n\nimport type { TTreeConfig } from '../../../_types/faf.type.js';\n\nimport { classifyFolder } from '../../_aggregates/classify-folder/index.js';\n\n/**\n * Returns the owner and private category path of the private category if the given path is inside one, or null.\n */\nexport function getPrivateCategoryInfo(\n relPath: string,\n config: TTreeConfig\n): null | { owner: string; privateCategoryPath: string } {\n let current = relPath;\n while (current && current !== '.' && current !== '/') {\n const parent = path.dirname(current).replace(/\\\\/g, '/');\n if (parent === current) {\n break;\n }\n\n const currentType = classifyFolder(current, config);\n const parentType = classifyFolder(parent, config);\n\n if (\n currentType === 'category' &&\n (parentType === 'fragment' || parentType === 'root-fragment')\n ) {\n return { owner: parent, privateCategoryPath: current };\n }\n\n current = parent;\n }\n return null;\n}\n","import type { Rule } from 'eslint';\n\nimport path from 'path';\n\nimport type {\n TFafSettings,\n TRootFragmentConfig,\n TTreeConfig,\n} from '#_rules@shared/_types/faf.type.js';\n\nimport { classifyFolder } from '#_rules@shared/_utils/_aggregates/classify-folder/index.js';\nimport { resolveImportPath } from '#_rules@shared/_utils/_aggregates/resolve-import-path/index.js';\nimport { findTreeConfigIncludingExcluded } from '#_rules@shared/_utils/_primitives/find-tree-config-including-excluded/index.js';\nimport { getFileRole } from '#_rules@shared/_utils/_primitives/get-file-role/index.js';\nimport { getLcaAndSubBranches } from '#_rules@shared/_utils/_primitives/get-lca-and-sub-branches/index.js';\nimport { getRoleHierarchyIndex } from '#_rules@shared/_utils/_primitives/get-role-hierarchy-index/index.js';\nimport { getRootFragmentConfig } from '#_rules@shared/_utils/_primitives/get-root-fragment-config/index.js';\nimport { resolveHorizontalHierarchy } from '#_rules@shared/_utils/_primitives/resolve-horizontal-hierarchy/index.js';\nimport { toRelativePath } from '#_rules@shared/_utils/_primitives/to-relative-path/index.js';\n\nfunction getRootNodeIndex(\n relPath: string,\n rfConfig: TRootFragmentConfig,\n lcaPath: string\n): number {\n const relToLca = path.relative(lcaPath, relPath).replace(/\\\\/g, '/');\n for (let i = 0; i < rfConfig.rootNodes.length; i++) {\n const group = rfConfig.rootNodes[i];\n if (group && group.includes(relToLca)) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * Checks if B is inside a Private Category of the LCA directory.\n */\nfunction isInsidePrivateCategoryOfLca(\n relPathB: string,\n lcaPath: string,\n config: TTreeConfig\n): boolean {\n let current = relPathB;\n while (current && current !== '.' && current !== '/' && current !== lcaPath) {\n const parent = path.dirname(current).replace(/\\\\/g, '/');\n if (parent === current) {\n break;\n }\n\n const currentType = classifyFolder(current, config);\n const parentType = classifyFolder(parent, config);\n\n if (\n currentType === 'category' &&\n (parentType === 'fragment' || parentType === 'root-fragment') &&\n parent === lcaPath\n ) {\n return true;\n }\n\n current = parent;\n }\n return false;\n}\n\n/**\n * @fileoverview Rule: faf/no-peer-dependency\n * Enforces the FAF Law of Separation between Peers.\n *\n * FAF Law: Sibling directories and files (at the same filesystem level) must not import each other\n * unless a horizontal hierarchy flow is explicitly configured (via local/global horizontal hierarchies).\n * For files inside a Fragment, peer imports flow according to the index order defined in the `roles` configuration.\n *\n * Valid:\n * - A compound utility importing from a primitive utility (if compounds ➔ primitives is configured).\n * - Sibling Fragment Nodes importing from each other according to the roles scale order (e.g. `util` imports `type`).\n *\n * Invalid:\n * - A primitive utility importing from a compound utility (violating horizontal hierarchy).\n * - Circular imports between sibling folders with no configured hierarchy.\n */\nconst rule: Rule.RuleModule = {\n create(context) {\n const absPath = context.filename;\n const relPath = toRelativePath(absPath);\n const settings = context.settings as { faf?: TFafSettings };\n\n if (!settings.faf) {\n return {};\n }\n\n const config = findTreeConfigIncludingExcluded(relPath, settings.faf);\n if (!config) {\n return {};\n }\n\n const currentDir = path.dirname(relPath);\n const isCurrentFileExcluded =\n config.excludes?.some(\n (exc) => relPath === exc || relPath.startsWith(exc + '/')\n ) ?? false;\n\n function checkImport(node: Rule.Node, importValue: string) {\n const resolvedRelPath = resolveImportPath(\n importValue,\n relPath,\n settings.faf!\n );\n if (!resolvedRelPath) {\n return; // External import\n }\n\n const isImportedFileExcluded =\n config?.excludes?.some(\n (exc) =>\n resolvedRelPath === exc || resolvedRelPath.startsWith(exc + '/')\n ) ?? false;\n\n // Case A (Logical Node ➔ Foreign Domain)\n if (!isCurrentFileExcluded && isImportedFileExcluded) {\n context.report({\n message: `Importing from Foreign Domain \"${resolvedRelPath}\" is forbidden for Logical Nodes.`,\n node,\n });\n return;\n }\n\n // Case B (Foreign Domain ➔ Logical Node)\n if (isCurrentFileExcluded && !isImportedFileExcluded) {\n context.report({\n message: `Foreign Domain files cannot import Logical Nodes from FAF tree (\"${resolvedRelPath}\").`,\n node,\n });\n return;\n }\n\n // If either is excluded, do not run further peer dependency checks\n if (isCurrentFileExcluded || isImportedFileExcluded) {\n return;\n }\n\n const importedDir = path.dirname(resolvedRelPath);\n\n // Scenario 1: Same directory (Fragment Nodes or direct siblings)\n if (currentDir === importedDir) {\n const fileA = path.basename(relPath);\n const fileB = path.basename(resolvedRelPath);\n\n const roleA = getFileRole(fileA, config!);\n const roleB = getFileRole(fileB, config!);\n\n if (roleA && roleB) {\n const idxA = getRoleHierarchyIndex(roleA, config!);\n const idxB = getRoleHierarchyIndex(roleB, config!);\n\n if (idxA !== -1 && idxB !== -1) {\n if (idxB >= idxA) {\n context.report({\n message: `Sibling import violation: \"${fileA}\" (role \"${roleA}\", level ${idxA}) cannot import from \"${fileB}\" (role \"${roleB}\", level ${idxB}). Imports must flow from lower to higher levels.`,\n node,\n });\n }\n }\n }\n return;\n }\n\n // Scenario 2: Different directories\n const lcaInfo = getLcaAndSubBranches(currentDir, importedDir);\n if (!lcaInfo) {\n return;\n }\n\n const { lca, subA, subB } = lcaInfo;\n\n // Exception: Fractal Branch\n if (subB.startsWith('_') && subB.includes('@shared')) {\n // Allowed to import from own Fractal Branch\n return;\n }\n\n // Exception: Private Category of the LCA\n if (isInsidePrivateCategoryOfLca(importedDir, lca, config!)) {\n return;\n }\n\n // A descendant reaching for the Fragment root has no privileged access to it\n if (subB === '' && classifyFolder(lca, config!) === 'fragment') {\n context.report({\n message: `Peer separation violation: \"${subA}\" cannot import directly from the root of Fragment \"${lca}\". A node nested inside a Private Category or Fractal Branch has no privileged access to its owning Fragment's other direct children; promote the shared resource to a Fractal Branch if the sharing need is genuine.`,\n node,\n });\n return;\n }\n\n // Check if LCA is a Root Fragment and we are importing between Root Nodes\n const rfConfig = getRootFragmentConfig(lca, config!);\n if (rfConfig) {\n const idxRootA = getRootNodeIndex(relPath, rfConfig, lca);\n const idxRootB = getRootNodeIndex(resolvedRelPath, rfConfig, lca);\n\n if (idxRootA !== -1 && idxRootB !== -1) {\n if (idxRootB >= idxRootA) {\n context.report({\n message: `Root Node import violation: \"${path.basename(relPath)}\" cannot import from \"${path.basename(resolvedRelPath)}\" under Root Fragment \"${lca}\".`,\n node,\n });\n }\n return;\n }\n }\n\n // Root Nodes are exempt from the Role naming convention, so relationships involving them\n // (including nested or sibling Root Fragments) can never fall back to the Role scale: they\n // must always be explicitly authorized by the architect via \"rootNodes\" at the common ancestor.\n const isSubARootFragment =\n classifyFolder(path.posix.join(lca, subA), config!) === 'root-fragment';\n const isSubBRootFragment =\n classifyFolder(path.posix.join(lca, subB), config!) === 'root-fragment';\n\n if (isSubARootFragment || isSubBRootFragment) {\n context.report({\n message: `Root Node import violation: \"${relPath}\" cannot import from \"${resolvedRelPath}\" because no \"rootNodes\" relationship is configured under Root Fragment \"${lca}\". Relationships between Root Nodes must always be explicitly authorized by the architect.`,\n node,\n });\n return;\n }\n\n // Determine if there is a defined horizontal hierarchy at LCA and whether the import is allowed\n const { allowed, defined: hasDefinedHierarchy } =\n resolveHorizontalHierarchy(lca, subA, subB, config!);\n\n if (hasDefinedHierarchy) {\n if (!allowed) {\n context.report({\n message: `Horizontal hierarchy violation: \"${subA}\" cannot import from \"${subB}\" under parent \"${lca}\".`,\n node,\n });\n }\n } else {\n context.report({\n message: `Peer separation violation: sibling directories \"${subA}\" and \"${subB}\" cannot import each other because no horizontal hierarchy is defined under parent \"${lca}\".`,\n node,\n });\n }\n }\n\n return {\n ExportAllDeclaration(node) {\n checkImport(node, node.source.value as string);\n },\n ExportNamedDeclaration(node) {\n if (node.source) {\n checkImport(node, node.source.value as string);\n }\n },\n ImportDeclaration(node) {\n checkImport(node, node.source.value as string);\n },\n };\n },\n meta: {\n docs: {\n description:\n 'Enforce the Law of Separation between Peers (no-peer-dependency)',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nexport default rule;\n","import { state } from '#_utils@shared/_stores/cache/index.js';\n\nimport type { TFafSettings, TTreeConfig } from '../../../_types/faf.type.js';\n\n/**\n * Finds the tree configuration that includes the given relative file path,\n * even if it is otherwise excluded (Foreign Domain). Uses `state.treeConfigIncludingExcludedCache`\n * for performance.\n *\n * @param relPath - Path relative to the project root.\n * @param settings - The global FAF settings containing trees configuration.\n * @returns The matching tree configuration or null if not found.\n */\nexport function findTreeConfigIncludingExcluded(\n relPath: string,\n settings: TFafSettings\n): null | TTreeConfig {\n if (!settings || !settings.trees) {\n return null;\n }\n\n const cached = state.treeConfigIncludingExcludedCache.get(relPath);\n if (cached !== undefined) {\n return cached;\n }\n\n let result: null | TTreeConfig = null;\n for (const tree of settings.trees) {\n const isIncluded = tree.includes.some(\n (inc) => relPath === inc || relPath.startsWith(inc + '/')\n );\n\n if (isIncluded) {\n result = tree;\n break;\n }\n }\n\n state.treeConfigIncludingExcludedCache.set(relPath, result);\n return result;\n}\n","/**\n * Finds the Lowest Common Ancestor (LCA) path of two given path strings,\n * as well as the immediate child segment of the LCA for each path.\n * Used to identify parent-child relationships and siblings.\n *\n * @param pathA - First path string.\n * @param pathB - Second path string.\n * @returns Object containing the LCA and immediate sub-branches, or null if no common ancestor.\n */\nexport function getLcaAndSubBranches(\n pathA: string,\n pathB: string\n): null | { lca: string; subA: string; subB: string } {\n const partsA = pathA.split('/');\n const partsB = pathB.split('/');\n\n let commonLength = 0;\n while (\n commonLength < partsA.length &&\n commonLength < partsB.length &&\n partsA[commonLength] === partsB[commonLength]\n ) {\n commonLength++;\n }\n\n if (commonLength === 0) {\n return null;\n }\n\n const lca = partsA.slice(0, commonLength).join('/');\n const subA = partsA[commonLength] || '';\n const subB = partsB[commonLength] || '';\n\n return { lca, subA, subB };\n}\n","import type { TTreeConfig } from '../../../_types/faf.type.js';\n\n/**\n * Returns the hierarchy level index of a given role.\n * Roles at lower indexes (earlier in the roles array) represent lower-level/primitive constructs,\n * while higher indexes represent higher-level/composed ones.\n *\n * @param role - Role string to look up.\n * @param config - Tree configuration containing the roles scale.\n * @returns The index of the role group or -1 if the role is not defined.\n */\nexport function getRoleHierarchyIndex(\n role: string,\n config: TTreeConfig\n): number {\n for (let i = 0; i < config.roles.length; i++) {\n const roleGroup = config.roles[i];\n if (roleGroup && roleGroup.includes(role)) {\n return i;\n }\n }\n return -1;\n}\n","import type { TTreeConfig } from '../../../_types/faf.type.js';\n\n/**\n * Resolves the horizontal hierarchy relationship between sub-directories subA and subB at a common ancestor lcaPath.\n * Checks local path-specific hierarchies before falling back to global hierarchies.\n * Returns both whether a hierarchy constraint is defined, and if defined, whether the import is allowed.\n *\n * @param lcaPath - Path of the common parent directory.\n * @param subA - Sibling directory segment of the importer.\n * @param subB - Sibling directory segment of the imported module.\n * @param config - Tree configuration.\n * @returns Object indicating if the hierarchy is defined and if the import is allowed.\n */\nexport function resolveHorizontalHierarchy(\n lcaPath: string,\n subA: string,\n subB: string,\n config: TTreeConfig\n): { allowed: boolean; defined: boolean } {\n // 1. Check local hierarchies first\n const local = config.localHorizontalHierarchies?.find((lh) =>\n lh.paths.includes(lcaPath)\n );\n if (local) {\n const idxA = local.hierarchies.findIndex((group) => group.includes(subA));\n const idxB = local.hierarchies.findIndex((group) => group.includes(subB));\n if (idxA !== -1 && idxB !== -1) {\n return { allowed: idxB < idxA, defined: true };\n }\n }\n\n // 2. Check global hierarchies\n const globalHierarchies = config.globalHorizontalHierarchies || [];\n for (const gh of globalHierarchies) {\n const idxA = gh.findIndex((group) => group.includes(subA));\n const idxB = gh.findIndex((group) => group.includes(subB));\n if (idxA !== -1 && idxB !== -1) {\n return { allowed: idxB < idxA, defined: true };\n }\n }\n\n // No hierarchy defined for this pair — sibling imports forbidden by default\n return { allowed: false, defined: false };\n}\n","import type { Rule } from 'eslint';\n\nimport path from 'path';\n\nimport type { TFafSettings } from '#_rules@shared/_types/faf.type.js';\n\nimport { resolveImportPath } from '#_rules@shared/_utils/_aggregates/resolve-import-path/index.js';\nimport { findTreeConfig } from '#_rules@shared/_utils/_primitives/find-tree-config/index.js';\nimport { getFractalBranchOwner } from '#_rules@shared/_utils/_primitives/get-fractal-branch-owner/index.js';\nimport { getImmediateSubDomain } from '#_rules@shared/_utils/_primitives/get-immediate-sub-domain/index.js';\nimport { toRelativePath } from '#_rules@shared/_utils/_primitives/to-relative-path/index.js';\nimport { getPrivateCategoryInfo } from '#_rules@shared/_utils/_systems/get-private-category-info/index.js';\n\n/**\n * @fileoverview Rule: faf/no-private-category-leak\n * Enforces the FAF Law of Private Category Encapsulation.\n *\n * FAF Law: Category folders prefixed with `_` nested directly inside a Fragment/Root Fragment\n * are Private Categories containing internal implementation details.\n * Their contents are private to the owning Fragment/Root Fragment subtree and cannot leak or be imported externally.\n *\n * Valid:\n * - Sibling nodes within the owner Fragment importing from the Private Category (e.g. `example/example.component.tsx`\n * importing from `example/_components/child/index.js`).\n *\n * Invalid:\n * - A rule inside `src/_rules/naming-conventions/` importing from `src/_rules/_rules@shared/_utils/_utils@shared/_stores/cache/` (leak).\n */\nconst rule: Rule.RuleModule = {\n create(context) {\n const absPath = context.filename;\n const relPath = toRelativePath(absPath);\n const settings = context.settings as { faf?: TFafSettings };\n\n if (!settings.faf) {\n return {};\n }\n\n const config = findTreeConfig(relPath, settings.faf);\n if (!config) {\n return {};\n }\n\n function checkImport(node: Rule.Node, importValue: string) {\n const resolvedRelPath = resolveImportPath(\n importValue,\n relPath,\n settings.faf!\n );\n if (!resolvedRelPath) {\n return; // External import or unresolved alias\n }\n\n const importedDir = path.dirname(resolvedRelPath);\n const info = getPrivateCategoryInfo(importedDir, config!);\n\n if (info) {\n const { owner, privateCategoryPath } = info;\n\n // A Fractal Branch nested inside the Private Category is a closer, more specific\n // encapsulation boundary: its own Law is the sole authority on access to it, and\n // the Private Category's direct-child/sub-domain grants do not apply (non-transitivity).\n let isFractalBranchInPrivateCategory = false;\n let isFractalBranchAllowed = false;\n const fbOwner = getFractalBranchOwner(importedDir);\n if (fbOwner) {\n const isFbInsidePrivateCategory =\n fbOwner === privateCategoryPath ||\n fbOwner.startsWith(privateCategoryPath + '/');\n if (isFbInsidePrivateCategory) {\n isFractalBranchInPrivateCategory = true;\n isFractalBranchAllowed =\n relPath === fbOwner || relPath.startsWith(fbOwner + '/');\n }\n }\n\n const isDirectChild = path.dirname(relPath) === owner;\n\n const importerSubDomain = getImmediateSubDomain(\n relPath,\n privateCategoryPath\n );\n const importedSubDomain = getImmediateSubDomain(\n resolvedRelPath,\n privateCategoryPath\n );\n const isInsideSameSubDomain =\n importerSubDomain !== '' && importerSubDomain === importedSubDomain;\n\n const isAllowed = isFractalBranchInPrivateCategory\n ? isFractalBranchAllowed\n : isDirectChild || isInsideSameSubDomain;\n\n if (!isAllowed) {\n context.report({\n message: `Importing from Private Category is forbidden. The imported resource is private to \"${owner}\".`,\n node,\n });\n }\n }\n }\n\n return {\n ExportAllDeclaration(node) {\n checkImport(node, node.source.value as string);\n },\n ExportNamedDeclaration(node) {\n if (node.source) {\n checkImport(node, node.source.value as string);\n }\n },\n ImportDeclaration(node) {\n checkImport(node, node.source.value as string);\n },\n };\n },\n meta: {\n docs: {\n description:\n 'Prevent leakage and unauthorized imports of Private Category internals',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nexport default rule;\n","import categoryMutuallyExclusive from './_rules/category-mutually-exclusive/index.js';\nimport enforceAccessNode from './_rules/enforce-access-node/index.js';\nimport namingConventions from './_rules/naming-conventions/index.js';\nimport noDirectFragmentImport from './_rules/no-direct-fragment-import/index.js';\nimport noFractalBranchLeak from './_rules/no-fractal-branch-leak/index.js';\nimport noPeerDependency from './_rules/no-peer-dependency/index.js';\nimport noPrivateCategoryLeak from './_rules/no-private-category-leak/index.js';\n\n/**\n * Mapping of FAF rule identifiers to their respective ESLint rule modules.\n * All rules are namespaced under 'faf/*' when consumed in configurations.\n */\nexport const rules = {\n 'category-mutually-exclusive': categoryMutuallyExclusive,\n 'enforce-access-node': enforceAccessNode,\n 'naming-conventions': namingConventions,\n 'no-direct-fragment-import': noDirectFragmentImport,\n 'no-fractal-branch-leak': noFractalBranchLeak,\n 'no-peer-dependency': noPeerDependency,\n 'no-private-category-leak': noPrivateCategoryLeak,\n} as const;\n","import type { TFafPlugin } from './types.js';\n\nimport { rules } from './rules.js';\n\n/**\n * Predefined configuration presets exposed by the FAF ESLint plugin.\n * Includes the recommended flat configuration preset that registers the plugin\n * and activates all taxonomy and dependency rules as blocking \"error\" diagnostics.\n */\nexport const configs: TFafPlugin['configs'] = {\n recommended: {\n plugins: {\n faf: {\n rules,\n },\n },\n rules: {\n 'faf/category-mutually-exclusive': 'error',\n 'faf/enforce-access-node': 'error',\n 'faf/naming-conventions': 'error',\n 'faf/no-direct-fragment-import': 'error',\n 'faf/no-fractal-branch-leak': 'error',\n 'faf/no-peer-dependency': 'error',\n 'faf/no-private-category-leak': 'error',\n },\n },\n};\n","import type { TFafPlugin } from './types.js';\n\nimport pkg from '../package.json' with { type: 'json' };\nimport { configs } from './configs.js';\nimport { rules } from './rules.js';\n\nexport { configs } from './configs.js';\nexport { rules } from './rules.js';\n\n/**\n * Default export representing the ESLint plugin for the Fractal Architecture Framework (FAF).\n * Assembles configs, rules, and package metadata.\n *\n * Exposes rules and configs both as named exports (for backward compatibility/direct consumption)\n * and within the default plugin export container.\n */\nconst plugin: TFafPlugin = {\n configs,\n meta: {\n name: '@morriconeluca/eslint-plugin-faf',\n version: pkg.version,\n },\n rules,\n};\n\nexport default plugin;\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,EACR,QAAU;AAAA,EACV,OAAS;AAAA,EACT,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,QAAU;AAAA,MACV,SAAW;AAAA,IACb;AAAA,EACF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AS,gBAAI;AAAA,EACf;AAAA,EACA;AACF;AAEA,IAAO,eAAQ;","names":["path","path","path","path","path","path","path","path","path","rule","path","path","rule","path","parentType","path","fs","path","path","fs","rule","path","path","path","path","path","rule","path","path","path","rule","path","rule","path"]}
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/_src@shared/_constants/faf.constant.ts","../src/_configs/recommended.config.ts","../src/_rules/conformity/_adapters/discover-config/discover-config.adapter.ts","../src/_rules/conformity/_conformity@shared/_constants/outcome-catalog.constant.ts","../src/_rules/conformity/_conformity@shared/_configs/outcome-catalog.config.ts","../src/_rules/conformity/_conformity@shared/_utils/create-outcome/_utils/build-outcome-record/build-outcome-record.util.ts","../src/_rules/conformity/_conformity@shared/_utils/create-outcome/_utils/format-outcome-message/format-outcome-message.util.ts","../src/_rules/conformity/_conformity@shared/_utils/create-outcome/create-outcome.util.ts","../src/_rules/conformity/_stores/session/session.store.ts","../src/_rules/conformity/_stores/session/_adapters/match-file-fingerprints/_adapters/has-matching-tree-origin/has-matching-tree-origin.adapter.ts","../src/_rules/conformity/_stores/session/_session@shared/_adapters/read-origin-dirents/read-origin-dirents.adapter.ts","../src/_rules/conformity/_stores/session/_adapters/match-file-fingerprints/_adapters/has-matching-tree-origin/_adapters/has-matching-origin-dirents/has-matching-origin-dirents.adapter.ts","../src/_rules/conformity/_stores/session/_adapters/match-file-fingerprints/_adapters/has-matching-tree-origin/_utils/count-origin-expected-entries/count-origin-expected-entries.util.ts","../src/_rules/conformity/_stores/session/_adapters/match-file-fingerprints/_adapters/has-matching-watched-files/has-matching-watched-files.adapter.ts","../src/_rules/conformity/_stores/session/_adapters/match-file-fingerprints/match-file-fingerprints.adapter.ts","../src/_rules/conformity/_stores/session/_adapters/read-file-fingerprints/read-file-fingerprints.adapter.ts","../src/_rules/conformity/_stores/session/_adapters/read-source-overlay/read-source-overlay.adapter.ts","../src/_rules/conformity/_stores/session/_session@shared/_adapters/read-file-snapshot/read-file-snapshot.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/verify-project.service.ts","../src/_rules/conformity/_stores/session/_session@shared/_utils/to-posix-path/to-posix-path.util.ts","../src/_rules/conformity/_stores/session/_session@shared/_stores/module-record-store/_utils/calculate-content-key/calculate-content-key.util.ts","../src/_rules/conformity/_stores/session/_session@shared/_constants/module-record-cache.constant.ts","../src/_rules/conformity/_stores/session/_session@shared/_stores/module-record-store/module-record-store.store.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/assert-invariant/assert-invariant.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/analyze-queued-module/_adapters/read-module-text/read-module-text.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/analyze-queued-module/_utils/analyze-module-source/_utils/collect-record-unverified-outcomes/collect-record-unverified-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/analyze-queued-module/_utils/analyze-module-source/_utils/is-tree-file-path/is-tree-file-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/analyze-queued-module/_utils/analyze-module-source/_utils/read-failure-outcome/read-failure-outcome.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/analyze-queued-module/_utils/analyze-module-source/analyze-module-source.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/analyze-queued-module/analyze-queued-module.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/resolve-specifiers/resolve-specifiers.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_collect-modules@shared/_adapters/canonicalize-directory/canonicalize-directory.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/resolve-specifiers/_resolve-specifiers@shared/_constants/resolve-specifiers.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/resolve-specifiers/_utils/classify-resolution-target/classify-resolution-target.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/resolve-specifiers/_utils/classify-resolution-target/_utils/extract-package-name/extract-package-name.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/resolve-specifiers/_utils/classify-resolution-target/_utils/is-alternative-match/is-alternative-match.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/resolve-specifiers/_utils/classify-resolution-target/_utils/is-in-node-modules/is-in-node-modules.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/resolve-specifiers/_utils/match-path-alias/_utils/apply-path-alias-suffix/apply-path-alias-suffix.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_adapters/resolve-specifiers/_utils/match-path-alias/match-path-alias.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/collect-unvisited-local-paths/collect-unvisited-local-paths.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compare-ordinal/compare-ordinal.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compare-source-locations/compare-source-locations.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/order-module-collection/_utils/compare-unverified-outcomes/compare-unverified-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/order-module-collection/order-module-collection.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/produce-module-record-by-extension.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/extract-script-module-record.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_extract-script-module-record@shared/_utils/create-source-locator/create-source-locator.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_extract-script-module-record@shared/_utils/create-source-locator/create-source-locator.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_extract-module-exports@shared/_constants/module-exports.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_extract-module-exports@shared/_utils/get-exported-name/get-exported-name.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-all-export/extract-all-export.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-declaration-exports/_utils/extract-class-exports/extract-class-exports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-declaration-exports/_utils/extract-function-exports/extract-function-exports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-declaration-exports/_utils/extract-namespace-exports/extract-namespace-exports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-declaration-exports/_utils/extract-type-exports/extract-type-exports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-declaration-exports/_utils/extract-variable-exports/_utils/collect-pattern-identifiers/collect-pattern-identifiers.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-declaration-exports/_utils/extract-variable-exports/extract-variable-exports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-declaration-exports/extract-declaration-exports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_extract-module-exports@shared/_utils/is-all-type-space/is-all-type-space.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-default-export/extract-default-export.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-named-specifiers-exports/_utils/extract-local-specifiers/extract-local-specifiers.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-named-specifiers-exports/_utils/extract-re-export-specifiers/extract-re-export-specifiers.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/_utils/extract-named-specifiers-exports/extract-named-specifiers-exports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-module-exports/extract-module-exports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-parse-errors/extract-parse-errors.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/collect-statement-symbols/_utils/collect-class-or-enum-symbols/collect-class-or-enum-symbols.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/collect-statement-symbols/_utils/collect-function-symbols/collect-function-symbols.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/collect-statement-symbols/_utils/collect-namespace-symbols/_utils/has-value-declaration/has-value-declaration.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/collect-statement-symbols/_utils/collect-namespace-symbols/collect-namespace-symbols.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/collect-statement-symbols/_utils/collect-type-symbols/collect-type-symbols.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/collect-statement-symbols/_utils/collect-variable-symbols/_utils/collect-pattern-bindings/collect-pattern-bindings.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/collect-statement-symbols/_utils/collect-variable-symbols/collect-variable-symbols.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/collect-statement-symbols/collect-statement-symbols.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/_utils/extract-default-declaration/extract-default-declaration.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-root-symbols/extract-root-symbols.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-static-imports/_utils/extract-import-equals/extract-import-equals.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-static-imports/_utils/extract-static-export/extract-static-export.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-static-imports/_utils/register-import-bindings/register-import-bindings.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-static-imports/_utils/resolve-import-kind/resolve-import-kind.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-static-imports/extract-static-imports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_traverse-ast@shared/_constants/traversal-entries.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/does-node-declare-require/_does-node-declare-require@shared/_utils/_primitives/does-pattern-bind-require/does-pattern-bind-require.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/does-node-declare-require/_does-node-declare-require@shared/_utils/_compounds/does-statement-declare-require/_utils/does-target-declare-require/does-target-declare-require.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/does-node-declare-require/_does-node-declare-require@shared/_utils/_compounds/does-statement-declare-require/does-statement-declare-require.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_traverse-ast@shared/_utils/is-ast-node/is-ast-node.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/does-node-declare-require/_does-node-declare-require@shared/_utils/_primitives/is-binding-pattern/is-binding-pattern.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/does-node-declare-require/_does-node-declare-require@shared/_utils/_primitives/is-statement/is-statement.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/does-node-declare-require/_utils/does-function-declare-require/does-function-declare-require.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/does-node-declare-require/does-node-declare-require.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/handle-specific-node/_handle-specific-node@shared/_utils/extract-static-specifier/_utils/extract-template-specifier/extract-template-specifier.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/handle-specific-node/_handle-specific-node@shared/_utils/extract-static-specifier/_utils/is-template-literal/is-template-literal.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/handle-specific-node/_handle-specific-node@shared/_utils/extract-static-specifier/extract-static-specifier.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/handle-specific-node/_utils/handle-import-expression/handle-import-expression.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/handle-specific-node/_utils/handle-require-call/handle-require-call.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/handle-specific-node/_utils/handle-ts-import-type/handle-ts-import-type.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/handle-specific-node/_utils/handle-unsupported-syntax/handle-unsupported-syntax.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/handle-specific-node/handle-specific-node.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/_utils/visit-children/visit-children.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/_utils/traverse-ast/traverse-ast.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/extract-traversal-entries/extract-traversal-entries.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/extract-script-module-record/_utils/sort-by-position/sort-by-position.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-binary-module-record/produce-binary-module-record.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-binary-module-record/produce-binary-module-record.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/advance-coordinates/advance-coordinates.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/classify-style-reference/classify-style-reference.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/classify-style-reference/classify-style-reference.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/read-at-import-specifier/_utils/read-bare-specifier/read-bare-specifier.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/read-at-import-specifier/_utils/read-bare-specifier/read-bare-specifier.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/read-at-import-specifier/_utils/read-quoted-specifier/read-quoted-specifier.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/read-at-import-specifier/_utils/read-url-specifier/_utils/read-quoted-url/read-quoted-url.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/read-at-import-specifier/_utils/read-url-specifier/_utils/read-unquoted-url/read-unquoted-url.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/read-at-import-specifier/_utils/read-url-specifier/read-url-specifier.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/read-at-import-specifier/_utils/read-url-specifier/read-url-specifier.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/read-at-import-specifier/read-at-import-specifier.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/skip-at-import-statement/skip-at-import-statement.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/_utils/skip-at-import-statement/skip-at-import-statement.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/scan-css-at-import.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-at-import/scan-css-at-import.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-url/_utils/read-quoted-url/read-quoted-url.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-url/_utils/read-unquoted-url/read-unquoted-url.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-url/scan-css-url.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/scan-css-url/scan-css-url.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/skip-css-block-comment/skip-css-block-comment.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/skip-css-line-comment/skip-css-line-comment.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/_utils/skip-css-string/skip-css-string.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/produce-style-module-record.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/_utils/produce-style-module-record/produce-style-module-record.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/produce-module-record-by-extension/produce-module-record-by-extension.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/_utils/select-tree-file-paths/select-tree-file-paths.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_adapters/collect-modules/collect-modules.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/access-node-contract/_utils/collect-source-outcomes/_utils/is-permitted-edge/is-permitted-edge.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/access-node-contract/_utils/collect-source-outcomes/collect-source-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/access-node-contract/_utils/collect-symbol-outcomes/_utils/check-master-export/_utils/is-master-re-exported/is-master-re-exported.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/access-node-contract/_utils/collect-symbol-outcomes/_utils/check-master-export/check-master-export.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/access-node-contract/_utils/collect-symbol-outcomes/_utils/index-masters-by-parent/index-masters-by-parent.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/access-node-contract/_utils/collect-symbol-outcomes/collect-symbol-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/access-node-contract/_utils/compare-access-node-outcomes/compare-access-node-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/access-node-contract/access-node-contract.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_acyclicity@shared/_utils/compute-sccs/_utils/build-transpose-graph/build-transpose-graph.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_acyclicity@shared/_utils/compute-sccs/_utils/collect-scc-component/collect-scc-component.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_acyclicity@shared/_utils/compute-sccs/_utils/compute-finish-stack/_utils/process-stack-top/process-stack-top.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_acyclicity@shared/_utils/compute-sccs/_utils/compute-finish-stack/compute-finish-stack.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_acyclicity@shared/_utils/compute-sccs/compute-sccs.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-root-authorizations/_utils/build-root-auth-graph/_utils/flatten-root-fragments/flatten-root-fragments.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-root-authorizations/_utils/build-root-auth-graph/_utils/populate-root-auth-adjacency/populate-root-auth-adjacency.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-root-authorizations/_utils/build-root-auth-graph/build-root-auth-graph.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-root-authorizations/_utils/is-root-cycle-exercised/is-root-cycle-exercised.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-root-authorizations/_utils/select-min-element/select-min-element.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-root-authorizations/check-root-authorizations.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-tree-authorizations/_utils/build-tree-auth-graph/_utils/is-auth-edge-valid/is-auth-edge-valid.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-tree-authorizations/_utils/build-tree-auth-graph/build-tree-auth-graph.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-tree-authorizations/_utils/is-tree-cycle-exercised/is-tree-cycle-exercised.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-tree-authorizations/_utils/select-min-element/select-min-element.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/_utils/check-tree-authorizations/check-tree-authorizations.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-cyclic-authorizations/check-cyclic-authorizations.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/_utils/build-dependency-graph-index/_utils/collect-logical-node-paths/collect-logical-node-paths.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/_utils/build-dependency-graph-index/_utils/deduplicate-neighbor-row/deduplicate-neighbor-row.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/_utils/build-dependency-graph-index/_utils/populate-adjacency-edges/populate-adjacency-edges.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/_utils/build-dependency-graph-index/build-dependency-graph-index.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/_utils/find-cycle-witness/_utils/build-witness-payload/build-witness-payload.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/_utils/find-cycle-witness/_utils/compare-paths/compare-paths.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/_utils/find-cycle-witness/_utils/find-self-loop-witness/find-self-loop-witness.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/_utils/find-cycle-witness/find-cycle-witness.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-dependency-cycles/check-dependency-cycles.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/build-quotient-graph/_utils/populate-tree-transitions/_utils/compare-segments/_utils/compare-segment-elements/compare-segment-elements.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/build-quotient-graph/_utils/populate-tree-transitions/_utils/compare-segments/compare-segments.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/build-quotient-graph/_utils/populate-tree-transitions/populate-tree-transitions.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/build-quotient-graph/build-quotient-graph.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/find-inter-tree-witness/_utils/build-tree-path-witness/build-tree-path-witness.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/find-inter-tree-witness/_utils/compare-tree-witnesses/_utils/compare-witness-segment/compare-witness-segment.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/find-inter-tree-witness/_utils/compare-tree-witnesses/compare-tree-witnesses.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/find-inter-tree-witness/_utils/reconstruct-tree-cycle/reconstruct-tree-cycle.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/_utils/find-inter-tree-witness/find-inter-tree-witness.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/_utils/check-inter-tree-cycles/check-inter-tree-cycles.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/acyclicity/acyclicity.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/category-role/_utils/is-violating-fragments-form/is-violating-fragments-form.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/category-role/_utils/is-violating-node-form/is-violating-node-form.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/category-role/category-role.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/classification-completeness/classification-completeness.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/containment-matrix/_configs/containment-matrix.config.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/containment-matrix/_utils/resolve-child-type/resolve-child-type.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/containment-matrix/containment-matrix.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/exclusive-forms/_utils/group-children-by-parent-id/group-children-by-parent-id.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/exclusive-forms/_utils/has-stratified-conflict/has-stratified-conflict.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/exclusive-forms/_utils/has-taxonomic-conflict/has-taxonomic-conflict.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/exclusive-forms/exclusive-forms.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/external-dependencies/_utils/check-edge-external-dependency/check-edge-external-dependency.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/external-dependencies/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/external-dependencies/external-dependencies.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/foreign-node-isolation/_utils/check-edge-isolation/check-edge-isolation.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/foreign-node-isolation/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/foreign-node-isolation/foreign-node-isolation.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/edge-geometry/_utils/collect-ancestors/collect-ancestors.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/edge-geometry/_utils/find-lowest-common-ancestor/find-lowest-common-ancestor.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/edge-geometry/edge-geometry.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fractal-branch-unidirectionality/_utils/collect-branch-outcomes/collect-branch-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fractal-branch-unidirectionality/_utils/compare-branch-outcomes/compare-branch-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fractal-branch-unidirectionality/fractal-branch-unidirectionality.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fractal-branch-visibility/_utils/check-branch-visibility/_utils/collect-crossed-branches/collect-crossed-branches.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fractal-branch-visibility/_utils/check-branch-visibility/_utils/is-branch-access-forbidden/is-branch-access-forbidden.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fractal-branch-visibility/_utils/check-branch-visibility/check-branch-visibility.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fractal-branch-visibility/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fractal-branch-visibility/fractal-branch-visibility.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fragment-anatomy/_utils/collect-fragment-items/collect-fragment-items.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fragment-anatomy/_fragment-anatomy@shared/_constants/fragment-anatomy.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fragment-anatomy/_utils/inspect-fragment-domain/inspect-fragment-domain.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fragment-anatomy/_utils/inspect-fragment-nodes/inspect-fragment-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fragment-anatomy/fragment-anatomy.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fragment-encapsulation/_utils/check-edge-encapsulation/check-edge-encapsulation.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fragment-encapsulation/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/fragment-encapsulation/fragment-encapsulation.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/horizontal-hierarchies/_utils/collect-member-outcomes/collect-member-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/horizontal-hierarchies/_utils/collect-overlap-outcomes/collect-overlap-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/horizontal-hierarchies/horizontal-hierarchies.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/nomenclature/_utils/is-violating-coordinate-name/is-violating-coordinate-name.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/nomenclature/_utils/is-violating-domain-name/is-violating-domain-name.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/nomenclature/_utils/is-violating-unit-name/_utils/is-violating-path-fragment-name/is-violating-path-fragment-name.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/nomenclature/_utils/is-violating-unit-name/is-violating-unit-name.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/nomenclature/nomenclature.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/path-alias-anchoring/_utils/check-edge-alias-anchoring/check-edge-alias-anchoring.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/path-alias-anchoring/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/path-alias-anchoring/path-alias-anchoring.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/peer-separation/_utils/check-edge-peer-separation/_utils/is-ordered-downward/is-ordered-downward.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/peer-separation/_utils/check-edge-peer-separation/_utils/is-peer-pair/_utils/is-peer-domain/is-peer-domain.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/peer-separation/_utils/check-edge-peer-separation/_utils/is-peer-pair/_utils/is-peer-node/is-peer-node.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/peer-separation/_utils/check-edge-peer-separation/_utils/is-peer-pair/is-peer-pair.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/peer-separation/_utils/check-edge-peer-separation/check-edge-peer-separation.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/peer-separation/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/peer-separation/peer-separation.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/private-category-visibility/_utils/check-private-category-unidirectionality/check-private-category-unidirectionality.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/private-category-visibility/_utils/check-private-category-visibility/check-private-category-visibility.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/private-category-visibility/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/private-category-visibility/private-category-visibility.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-entry-prohibition/_utils/compare-re-entry-outcomes/compare-re-entry-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-entry-prohibition/_utils/find-re-entry-paths/find-re-entry-paths.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-entry-prohibition/re-entry-prohibition.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-export-prohibition/_utils/collect-re-export-positions/_utils/dedupe-source-locations/dedupe-source-locations.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-export-prohibition/_utils/collect-re-export-positions/_utils/has-matching-direct-re-export/has-matching-direct-re-export.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-export-prohibition/_utils/collect-re-export-positions/collect-re-export-positions.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-export-prohibition/_utils/collect-re-export-positions/collect-re-export-positions.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-export-prohibition/_utils/compare-symbol-outcomes/compare-symbol-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/re-export-prohibition/re-export-prohibition.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/root-node-discipline/_utils/check-edge-root-discipline/_utils/is-root-edge-authorized/_utils/is-authorized-root-dependency/is-authorized-root-dependency.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/root-node-discipline/_utils/check-edge-root-discipline/_utils/is-root-edge-authorized/_utils/is-strictly-descending-root/is-strictly-descending-root.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/root-node-discipline/_utils/check-edge-root-discipline/_utils/is-root-edge-authorized/is-root-edge-authorized.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/root-node-discipline/_utils/check-edge-root-discipline/_utils/resolve-root-edge/resolve-root-edge.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/root-node-discipline/_utils/check-edge-root-discipline/check-edge-root-discipline.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/root-node-discipline/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/root-node-discipline/root-node-discipline.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/sub-graph-node-isolation/_utils/check-edge-sub-graph-isolation/check-edge-sub-graph-isolation.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/sub-graph-node-isolation/_utils/compare-edge-outcomes/compare-edge-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/sub-graph-node-isolation/sub-graph-node-isolation.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/symbol-uniqueness/_utils/is-violating-master-symbol/is-violating-master-symbol.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/symbol-uniqueness/_utils/is-violating-symbol-uniqueness/is-violating-symbol-uniqueness.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/symbol-uniqueness/symbol-uniqueness.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/tree-frontier/_utils/check-crossing-tree-authorization/check-crossing-tree-authorization.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/tree-frontier/_utils/check-edge-tree-frontier/check-edge-tree-frontier.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/tree-frontier/_utils/compare-tree-frontier-outcomes/compare-tree-frontier-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_norms/tree-frontier/tree-frontier.norm.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/prepare-project.service.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_adapters/read-package-json/read-package-json.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/include-external-targets/include-external-targets.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/list-entries/list-entries.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/list-entries/_adapters/scan-tree-origin/scan-tree-origin.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/list-entries/_adapters/scan-tree-origin/_adapters/inspect-origin/inspect-origin.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/list-entries/_adapters/scan-tree-origin/_scan-tree-origin@shared/_utils/to-relative-real-path/to-relative-real-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/list-entries/_adapters/scan-tree-origin/_adapters/process-dirent/process-dirent.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/load-config/load-config.adapter.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/load-config/_utils/classify-worker-outcome/classify-worker-outcome.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_adapters/load-config/_utils/classify-worker-outcome/_schemas/worker-message-schema/worker-message-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_acquire-path-aliases@shared/_constants/acquire-path-aliases.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_utils/convert-common-aliases/convert-common-aliases.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_utils/parse-package-json-imports/_schemas/imports-object-schema/imports-object-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_utils/parse-package-json-imports/_utils/collect-subpath-targets/_schemas/import-target-node-schema/import-target-node-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_utils/parse-package-json-imports/_utils/collect-subpath-targets/_utils/resolve-local-subpath-target/_utils/clean-base-path/clean-base-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_utils/parse-package-json-imports/_utils/collect-subpath-targets/_utils/resolve-local-subpath-target/resolve-local-subpath-target.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_utils/parse-package-json-imports/_utils/collect-subpath-targets/collect-subpath-targets.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_utils/parse-package-json-imports/_utils/validate-subpath-key/validate-subpath-key.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/_utils/parse-package-json-imports/parse-package-json-imports.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/acquire-path-aliases/acquire-path-aliases.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/build-inventory/_utils/collect-symlink-outcomes/collect-symlink-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/build-inventory/_utils/group-tree-nodes/group-tree-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/build-inventory/_utils/normalize-origins/normalize-origins.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/build-inventory/_utils/populate-entry-map/populate-entry-map.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/build-inventory/_utils/resolve-tree-origin/resolve-tree-origin.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/build-inventory/_utils/traverse-inventory-tree/traverse-inventory-tree.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/build-inventory/build-inventory.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/compose-declarations/_utils/compose-catalog/compose-catalog.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/compose-declarations/_utils/compose-root-fragments/compose-root-fragments.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/compose-declarations/_utils/filter-by-tree-containment/filter-by-tree-containment.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/compose-declarations/_utils/validate-origins/validate-origins.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/compose-declarations/compose-declarations.util.ts","../src/_rules/conformity/_stores/session/_session@shared/_utils/is-plain-record/is-plain-record.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_schemas/form-fields/form-fields.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_constants/config-diagnostic.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_schemas/form-fields/_utils/is-literal-config-path/is-literal-config-path.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_schemas/form-fields/_utils/is-literal-config-path/is-literal-config-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_schemas/config-format-schema/_schemas/config-shape/config-shape.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_schemas/config-format-schema/config-format-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/check-catalog-invariants/check-catalog-invariants.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/check-catalog-invariants/check-catalog-invariants.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/is-faf-config/is-faf-config.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/_schemas/read-config-value/read-config-value.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/_utils/choose-absent-diagnostic/choose-absent-diagnostic.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/_utils/decode-config-diagnostic/_utils/is-config-diagnostic/is-config-diagnostic.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/_utils/decode-config-diagnostic/decode-config-diagnostic.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/_utils/format-issue-path/format-issue-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/_utils/has-explicit-property/has-explicit-property.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/_utils/join-property-path/join-property-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/_utils/to-fixed-outcome/to-fixed-outcome.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/translate-config-issues/translate-config-issues.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-aliases/_schemas/aliases-schema/aliases-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-aliases/_schemas/aliases-schema/aliases-schema.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-aliases/validate-aliases.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_validate-config-format@shared/_utils/collect-string-duplicates/collect-string-duplicates.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-dependencies/_schemas/dependencies-schema/dependencies-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-dependencies/validate-dependencies.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compile-foreign-pattern/_utils/create-foreign-file-name-matcher/create-foreign-file-name-matcher.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compile-foreign-pattern/_utils/create-foreign-file-name-matcher/create-foreign-file-name-matcher.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compile-foreign-pattern/_utils/create-foreign-path-matcher/create-foreign-path-matcher.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compile-foreign-pattern/_utils/create-foreign-path-matcher/create-foreign-path-matcher.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compile-foreign-pattern/_utils/validate-foreign-pattern/validate-foreign-pattern.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compile-foreign-pattern/_utils/validate-foreign-pattern/validate-foreign-pattern.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compile-foreign-pattern/compile-foreign-pattern.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_verify-project@shared/_utils/compile-foreign-pattern/compile-foreign-pattern.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-foreign-nodes/_schemas/foreign-nodes-schema/foreign-nodes-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-foreign-nodes/validate-foreign-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-hierarchies/_schemas/hierarchies-schema/hierarchies-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-hierarchies/validate-hierarchies.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-mimetic-structures/validate-mimetic-structures.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-mimetic-structures/_schemas/mimetic-structures-schema/mimetic-structures-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-mimetic-structures/_utils/is-kebab-case/is-kebab-case.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-mimetic-structures/_utils/is-kebab-case/is-kebab-case.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-roles/_schemas/roles-schema/roles-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-roles/validate-roles.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-roles/validate-roles.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-root-fragments/_schemas/root-fragments-schema/root-fragments-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-root-fragments/validate-root-fragments.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-root-layers/_schemas/root-layers-schema/root-layers-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-root-layers/_schemas/root-layers-schema/root-layers-schema.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-root-layers/validate-root-layers.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-sub-graph-roles/_schemas/sub-graph-roles-schema/sub-graph-roles-schema.schema.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/_utils/validate-sub-graph-roles/validate-sub-graph-roles.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/validate-config-format.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-format/validate-config-format.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/reject-directory-in-scope/_utils/reject-directory-scope/reject-directory-scope.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/reject-directory-in-scope/reject-directory-in-scope.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-foreign-references/_utils/validate-foreign-section/_utils/reject-foreign-domain/reject-foreign-domain.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/reject-file-in-scope/_utils/reject-file-scope/reject-file-scope.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/reject-file-in-scope/reject-file-in-scope.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-foreign-references/_utils/validate-foreign-section/_utils/reject-foreign-node-entry/reject-foreign-node-entry.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-foreign-references/_utils/validate-foreign-section/validate-foreign-section.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-foreign-references/validate-foreign-references.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-external-dependencies/_utils/reject-external-source/reject-external-source.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-external-dependencies/_utils/reject-external-target/_utils/is-alias-reference/is-alias-reference.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-external-dependencies/_utils/reject-external-target/_utils/is-library-path/is-library-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-external-dependencies/_utils/reject-external-target/reject-external-target.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-external-dependencies/reject-external-dependencies.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_constants/reference-constraints.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_validate-frontier-references@shared/_utils/reject-public-root-node/reject-public-root-node.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-local-public-root-nodes/_utils/has-only-root-layers/has-only-root-layers.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-local-public-root-nodes/reject-local-public-root-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-public-root-node-list/reject-public-root-node-list.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-tree-dependencies/_utils/reject-one-tree-dependency/_utils/reject-tree-dependency-end/_utils/reject-tree-dependency-source/reject-tree-dependency-source.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-tree-dependencies/_utils/reject-one-tree-dependency/_utils/reject-tree-dependency-end/reject-tree-dependency-end.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-tree-dependencies/_utils/reject-one-tree-dependency/reject-one-tree-dependency.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/_utils/reject-tree-dependencies/reject-tree-dependencies.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-frontier-references/validate-frontier-references.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_validate-local-roots@shared/_utils/reject-origin-directory/reject-origin-directory.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_utils/reject-dependency-edges/_utils/reject-dependency-from/reject-dependency-from.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_utils/reject-dependency-edges/_utils/reject-dependency-to/reject-dependency-to.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_utils/reject-dependency-edges/reject-dependency-edges.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_validate-root-fragment-tree@shared/_utils/is-direct-child-directory/_utils/is-physical-direct-child/is-physical-direct-child.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_validate-root-fragment-tree@shared/_utils/is-direct-child-directory/_utils/is-string-direct-child/is-string-direct-child.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_validate-root-fragment-tree@shared/_utils/is-direct-child-directory/is-direct-child-directory.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_utils/reject-nested-root-fragment/reject-nested-root-fragment.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_utils/reject-root-nodes/_utils/reject-one-root-node/reject-one-root-node.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/_utils/reject-root-nodes/reject-root-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/_utils/validate-root-fragment-tree/validate-root-fragment-tree.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/_utils/validate-local-roots/validate-local-roots.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-root-references/validate-root-references.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-structural-references/_utils/validate-structural-section/_utils/reject-hierarchy-paths/reject-hierarchy-paths.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-structural-references/_utils/validate-structural-section/_utils/reject-mimetic-structures/reject-mimetic-structures.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-structural-references/_utils/validate-structural-section/validate-structural-section.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_utils/validate-structural-references/validate-structural-references.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/create-reference-context/_utils/collect-enumerated-root-nodes/_utils/collect-fragment-root-nodes/collect-fragment-root-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/create-reference-context/_utils/collect-enumerated-root-nodes/collect-enumerated-root-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/create-reference-context/_utils/collect-owned-origins/collect-owned-origins.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/create-reference-context/create-reference-context.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/_validate-config-references@shared/_utils/sort-config-outcomes/sort-config-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_services/prepare-project/_utils/validate-config-references/validate-config-references.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/anchor-outcomes/anchor-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/anchor-outcomes/_utils/compare-anchored-outcomes/compare-anchored-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/anchor-outcomes/_utils/select-anchor-path/select-anchor-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/anchor-outcomes/_utils/select-anchor-path/_select-anchor-path@shared/_utils/is-lintable-path/is-lintable-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/anchor-outcomes/_utils/select-anchor-path/_utils/anchor-domain-path/_utils/lintable-children/lintable-children.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/anchor-outcomes/_utils/select-anchor-path/_utils/anchor-domain-path/anchor-domain-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/anchor-outcomes/_utils/select-anchor-path/_utils/find-inventory-item/find-inventory-item.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/build-dependency-graph/_utils/assemble-dependency-graph/assemble-dependency-graph.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/build-dependency-graph/_utils/collect-graph-vertices/collect-graph-vertices.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/build-dependency-graph/_utils/collect-resolved-arcs/collect-resolved-arcs.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/build-dependency-graph/build-dependency-graph.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_classify-taxonomy@shared/_constants/classification-constraints.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_classify-taxonomy@shared/_utils/compare-config-outcomes/compare-config-outcomes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_classify-taxonomy@shared/_utils/read-path-name/read-path-name.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/build-tree-context/_utils/join-posix-path/join-posix-path.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/build-tree-context/_utils/path-is-inside/path-is-inside.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/build-tree-context/build-tree-context.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/_classify-directory@shared/_utils/create-directory-base/create-directory-base.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/_utils/resolve-declared-directory/resolve-declared-directory.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/_utils/resolve-structural-directory/_utils/resolve-catalog-category/resolve-catalog-category.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/_utils/resolve-structural-directory/_utils/resolve-fragment-child/resolve-fragment-child.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/_utils/resolve-structural-directory/_utils/resolve-layer-child/resolve-layer-child.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/_utils/resolve-structural-directory/_utils/resolve-mimetic-child/resolve-mimetic-child.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/_utils/resolve-structural-directory/_utils/resolve-sub-category-child/resolve-sub-category-child.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/_utils/resolve-structural-directory/resolve-structural-directory.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-directory/classify-directory.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-file/_classify-file@shared/_utils/blank-file-fields/blank-file-fields.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-file/_utils/classify-category-file/classify-category-file.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-file/_utils/classify-designated-file/classify-designated-file.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-file/_utils/classify-fragment-file/_utils/file-stem/file-stem.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-file/_utils/classify-fragment-file/classify-fragment-file.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-file/_utils/classify-root-fragment-file/classify-root-fragment-file.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/classify-file/classify-file.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/finalize-classifications/_utils/collect-master-ids/collect-master-ids.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/finalize-classifications/_utils/collect-parent-category-ids/collect-parent-category-ids.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/finalize-classifications/finalize-classifications.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/get-role-from-name/get-role-from-name.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/get-role-from-name/get-role-from-name.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/_select-foreign-nodes@shared/_utils/is-descendant-or-self/is-descendant-or-self.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/_utils/collect-foreign-domains/_utils/append-domain-items/append-domain-items.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/_utils/collect-foreign-domains/collect-foreign-domains.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/_utils/collect-foreign-families/_utils/collect-family-matches/_utils/record-scope-matches/record-scope-matches.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/_utils/collect-foreign-families/_utils/collect-family-matches/collect-family-matches.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/_utils/collect-foreign-families/_utils/compile-family-matchers/compile-family-matchers.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/_utils/collect-foreign-families/collect-foreign-families.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/_utils/collect-individual-foreign-nodes/collect-individual-foreign-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/select-foreign-nodes.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/select-foreign-nodes/select-foreign-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/verify-classification-references/_utils/verify-external-sources/verify-external-sources.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/verify-classification-references/_utils/verify-mimetic-paths/verify-mimetic-paths.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/verify-classification-references/_utils/verify-public-root-nodes/verify-public-root-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/_utils/verify-classification-references/verify-classification-references.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/classify-taxonomy/classify-taxonomy.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/collect-external-files/collect-external-files.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-external-crossings/_utils/find-destination-crossings/find-destination-crossings.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-external-crossings/_utils/index-external-subgraph/index-external-subgraph.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-external-crossings/derive-external-crossings.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-horizontal-hierarchies/_utils/derive-domain-hierarchies/_utils/is-orderable-sibling-set/is-orderable-sibling-set.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-horizontal-hierarchies/_utils/derive-domain-hierarchies/derive-domain-hierarchies.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-horizontal-hierarchies/_utils/derive-node-hierarchies/derive-node-hierarchies.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-horizontal-hierarchies/derive-horizontal-hierarchies.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-public-surface/_utils/collect-layer-surface/_utils/is-exposed-layer-node/is-exposed-layer-node.constant.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-public-surface/_utils/collect-layer-surface/_utils/is-exposed-layer-node/is-exposed-layer-node.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-public-surface/_utils/collect-layer-surface/collect-layer-surface.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-public-surface/_utils/select-designated-root-nodes/select-designated-root-nodes.util.ts","../src/_rules/conformity/_stores/session/_services/verify-project/_utils/derive-public-surface/derive-public-surface.util.ts","../src/_rules/conformity/_stores/session/_session@shared/_adapters/read-module-record-cache/read-module-record-cache.adapter.ts","../src/_rules/conformity/_stores/session/_session@shared/_adapters/read-module-record-cache/_utils/parse-module-record-cache/_utils/is-valid-module-record/is-valid-module-record.util.ts","../src/_rules/conformity/_stores/session/_session@shared/_adapters/read-module-record-cache/_utils/parse-module-record-cache/parse-module-record-cache.util.ts","../src/_rules/conformity/_stores/session/_session@shared/_adapters/write-module-record-cache/write-module-record-cache.adapter.ts","../src/_rules/conformity/_utils/read-config-file-setting/_utils/is-record/is-record.util.ts","../src/_rules/conformity/_utils/read-config-file-setting/read-config-file-setting.util.ts","../src/_rules/conformity/conformity.rule.ts","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@morriconeluca/eslint-plugin-faf\",\n \"version\": \"0.6.0\",\n \"description\": \"An ESLint plugin for FAF projects.\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/morriconeluca/eslint-plugin-faf.git\"\n },\n \"main\": \"./dist/main.cjs\",\n \"module\": \"./dist/main.js\",\n \"types\": \"./dist/main.d.cts\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/main.d.ts\",\n \"default\": \"./dist/main.js\"\n },\n \"require\": {\n \"types\": \"./dist/main.d.cts\",\n \"default\": \"./dist/main.cjs\"\n }\n }\n },\n \"publishConfig\": {\n \"access\": \"public\",\n \"provenance\": true\n },\n \"sideEffects\": false,\n \"engines\": {\n \"node\": \">=24\"\n },\n \"type\": \"module\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"check\": \"node --import ./scripts/register-script-typescript.ts scripts/check.ts\",\n \"ci\": \"npm run gate:1 && npm run gate:2 && npm run gate:3 && npm run gate:4:diff && npm run gate:5\",\n \"dev\": \"vitest\",\n \"gate:1\": \"prettier --check --cache --cache-location .cache/prettier/.prettiercache . && tsc --noEmit\",\n \"gate:2\": \"eslint .\",\n \"gate:3\": \"vitest run --coverage\",\n \"gate:4:diff\": \"node --import ./scripts/register-script-typescript.ts scripts/mutate-diff.ts --mode=diff\",\n \"gate:4:force\": \"node --import ./scripts/register-script-typescript.ts scripts/mutate-diff.ts --mode=force\",\n \"gate:4:incremental\": \"node --import ./scripts/register-script-typescript.ts scripts/mutate-diff.ts --mode=incremental\",\n \"gate:5\": \"tsup && publint --strict && attw -q --pack .\",\n \"gate:all:force\": \"npm run gate:1 && npm run gate:2 && npm run gate:3 && npm run gate:4:force && npm run gate:5\",\n \"gate:fast\": \"npm run gate:1 && npm run gate:2\",\n \"local-release\": \"changeset version && changeset publish\",\n \"prepare\": \"husky\",\n \"prepublishOnly\": \"npm run build\",\n \"sanitize\": \"eslint --fix . && prettier --write --cache --cache-location .cache/prettier/.prettiercache .\"\n },\n \"keywords\": [\n \"eslint\",\n \"eslintplugin\",\n \"faf\"\n ],\n \"author\": \"Luca Morricone\",\n \"license\": \"MIT\",\n \"peerDependencies\": {\n \"eslint\": \"^9.0.0 || ^10.0.0\"\n },\n \"dependencies\": {\n \"oxc-parser\": \"^0.156.0\",\n \"oxc-resolver\": \"^11.24.2\",\n \"zod\": \"^4.6.7\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.5\",\n \"@changesets/cli\": \"^2.31.0\",\n \"@commitlint/cli\": \"^21.0.2\",\n \"@commitlint/config-conventional\": \"^21.0.2\",\n \"@commitlint/types\": \"^21.2.3\",\n \"@eslint-community/eslint-plugin-eslint-comments\": \"^4.8.1\",\n \"@eslint/js\": \"^10.0.1\",\n \"@stryker-mutator/core\": \"^10.1.1\",\n \"@stryker-mutator/vitest-runner\": \"^10.1.1\",\n \"@types/node\": \"^25.9.3\",\n \"@typescript-eslint/utils\": \"^8.24.1\",\n \"@vitest/coverage-v8\": \"^4.1.12\",\n \"dependency-cruiser\": \"^17.4.3\",\n \"eslint\": \"^10.14.0\",\n \"eslint-import-resolver-typescript\": \"^4.4.5\",\n \"eslint-plugin-import-x\": \"^4.16.2\",\n \"eslint-plugin-jsdoc\": \"^65.4.2\",\n \"eslint-plugin-perfectionist\": \"^5.9.0\",\n \"eslint-plugin-sonarjs\": \"^4.2.2\",\n \"eslint-plugin-unicorn\": \"^79.0.0\",\n \"fs-fixture\": \"^2.16.0\",\n \"husky\": \"^9.1.7\",\n \"lint-staged\": \"^17.0.7\",\n \"prettier\": \"^3.8.4\",\n \"publint\": \"^0.3.25\",\n \"tsup\": \"^8.3.6\",\n \"typescript\": \"^6.0.3\",\n \"typescript-eslint\": \"^8.61.0\",\n \"vitest\": \"^4.1.9\"\n },\n \"lint-staged\": {\n \"*\": \"prettier --write --ignore-unknown\",\n \"src/**/*.ts\": \"eslint --fix\"\n }\n}\n","export const CONFIG_FILE_NAME = 'fafconfig.ts';\n\nexport const LINTABLE_EXTENSIONS = [\n '.cjs',\n '.cts',\n '.js',\n '.jsx',\n '.mjs',\n '.mts',\n '.ts',\n '.tsx',\n] as const;\n","import type { Linter } from 'eslint';\n\nimport { LINTABLE_EXTENSIONS } from '../_src@shared/_constants/faf.constant.js';\n\nexport const recommended: Linter.Config = {\n files: LINTABLE_EXTENSIONS.map((extension) => `**/*${extension}`),\n rules: {\n 'faf/conformity': 'error',\n },\n};\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\n\nimport type {\n TDiscoverConfigInput,\n TDiscoverConfigResult,\n} from './discover-config.type.js';\n\nimport { CONFIG_FILE_NAME } from '../../../../_src@shared/_constants/faf.constant.js';\nimport { createOutcome } from '../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function discoverConfig(\n input: TDiscoverConfigInput\n): TDiscoverConfigResult {\n const missingConfigFile = 'configuration/missing-config-file';\n if (input.configFile !== undefined) {\n const configProperty = 'settings.faf.configFile';\n const candidatePath = nodePath.isAbsolute(input.configFile)\n ? nodePath.normalize(input.configFile)\n : nodePath.resolve(input.workingDirectory, input.configFile);\n\n const stats = nodeFs.statSync(candidatePath, { throwIfNoEntry: false });\n if (stats === undefined || !stats.isFile()) {\n return {\n ok: false,\n outcomes: [\n createOutcome(missingConfigFile, {\n element: candidatePath,\n propertyPath: configProperty,\n }),\n ],\n };\n }\n\n return {\n ok: true,\n value: {\n configDirectory: nodePath.dirname(candidatePath),\n configPath: candidatePath,\n },\n };\n }\n\n let currentDirectory = nodePath.resolve(input.workingDirectory);\n let isReachedRoot = false;\n\n while (!isReachedRoot) {\n const candidatePath = nodePath.join(currentDirectory, CONFIG_FILE_NAME);\n const stats = nodeFs.statSync(candidatePath, { throwIfNoEntry: false });\n\n if (stats !== undefined && stats.isFile()) {\n return {\n ok: true,\n value: {\n configDirectory: currentDirectory,\n configPath: candidatePath,\n },\n };\n }\n\n const parentDirectory = nodePath.dirname(currentDirectory);\n if (parentDirectory === currentDirectory) {\n isReachedRoot = true;\n } else {\n currentDirectory = parentDirectory;\n }\n }\n\n const resolvedWorkingDirectory = nodePath.resolve(input.workingDirectory);\n\n return {\n ok: false,\n outcomes: [\n createOutcome(missingConfigFile, {\n element: resolvedWorkingDirectory,\n propertyPath: 'faf',\n }),\n ],\n };\n}\n","export const REFERENCE_D_03 = 'D-03';\nexport const REFERENCE_D_04 = 'D-04';\nexport const REFERENCE_D_05 = 'D-05';\nexport const REFERENCE_D_06 = 'D-06';\nexport const REFERENCE_D_07 = 'D-07';\nexport const REFERENCE_D_08 = 'D-08';\nexport const REFERENCE_D_09 = 'D-09';\nexport const REFERENCE_D_14 = 'D-14';\n\nexport const REFERENCE_FAF_4 = 'FAF §4';\nexport const REFERENCE_FAF_4_6_3_5_6_6 = 'FAF §4, §6.3.5, §6.6';\nexport const REFERENCE_FAF_4_6_7 = 'FAF §4, §6.7';\nexport const REFERENCE_FAF_5 = 'FAF §5';\nexport const REFERENCE_FAF_6 = 'FAF §6';\nexport const REFERENCE_FAF_6_1_1 = 'FAF §6.1.1';\nexport const REFERENCE_FAF_6_1_3 = 'FAF §6.1.3';\nexport const REFERENCE_FAF_6_2_2 = 'FAF §6.2.2';\nexport const REFERENCE_FAF_6_3_1 = 'FAF §6.3.1';\nexport const REFERENCE_FAF_6_3_2_MULTIPLE =\n 'FAF §6.3.2, §6.4.1, §6.5.1, §6.6.1';\nexport const REFERENCE_FAF_6_3_3 = 'FAF §6.3.3';\nexport const REFERENCE_FAF_6_3_5 = 'FAF §6.3.5';\nexport const REFERENCE_FAF_6_6_2 = 'FAF §6.6.2';\nexport const REFERENCE_FAF_6_7 = 'FAF §6.7';\nexport const REFERENCE_FAF_6_8 = 'FAF §6.8';\nexport const REFERENCE_FAF_6_9 = 'FAF §6.9';\nexport const REFERENCE_FAF_7_1 = 'FAF §7.1';\nexport const REFERENCE_FAF_7_2 = 'FAF §7.2';\nexport const REFERENCE_FAF_7_2_7_3 = 'FAF §7.2, §7.3';\nexport const REFERENCE_FAF_7_3 = 'FAF §7.3';\nexport const REFERENCE_FAF_7_4 = 'FAF §7.4';\n","import type { TCatalogEntry, TConstraint } from '../_types/outcome.type.js';\n\nimport {\n REFERENCE_D_03,\n REFERENCE_D_04,\n REFERENCE_D_05,\n REFERENCE_D_06,\n REFERENCE_D_07,\n REFERENCE_D_08,\n REFERENCE_D_09,\n REFERENCE_D_14,\n REFERENCE_FAF_4,\n REFERENCE_FAF_4_6_3_5_6_6,\n REFERENCE_FAF_4_6_7,\n REFERENCE_FAF_5,\n REFERENCE_FAF_6,\n REFERENCE_FAF_6_1_1,\n REFERENCE_FAF_6_1_3,\n REFERENCE_FAF_6_2_2,\n REFERENCE_FAF_6_3_1,\n REFERENCE_FAF_6_3_2_MULTIPLE,\n REFERENCE_FAF_6_3_3,\n REFERENCE_FAF_6_3_5,\n REFERENCE_FAF_6_6_2,\n REFERENCE_FAF_6_7,\n REFERENCE_FAF_6_8,\n REFERENCE_FAF_6_9,\n REFERENCE_FAF_7_1,\n REFERENCE_FAF_7_2,\n REFERENCE_FAF_7_2_7_3,\n REFERENCE_FAF_7_3,\n REFERENCE_FAF_7_4,\n} from '../_constants/outcome-catalog.constant.js';\n\nexport const OUTCOME_CATALOG = {\n 'acyclicity/dependency-cycle': {\n family: 'acyclicity',\n form: 'cycle',\n normativeReference: REFERENCE_FAF_5,\n predicate: 'is part of a dependency cycle',\n },\n 'acyclicity/inter-tree-cycle': {\n family: 'acyclicity',\n form: 'cycle',\n normativeReference: REFERENCE_FAF_7_2,\n predicate: 'is part of a dependency cycle between Fractal Trees',\n },\n 'classification/category-role': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'does not have the form or the Role imposed by its Category',\n },\n 'classification/containment-matrix': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_8,\n predicate: 'is a child type that its parent Logical Domain does not admit',\n },\n 'classification/duplicate-fragment-role': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate:\n 'has more than one direct Logical Node with the same explicit Role',\n },\n 'classification/exclusive-forms': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_2_MULTIPLE,\n predicate: 'mixes mutually exclusive forms among its direct children',\n },\n 'classification/fragment-node-anatomy': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate:\n 'is not a Fragment Node, Access Node or Sub-Graph Node named after its Fragment',\n },\n 'classification/fragment-node-rank': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_1_3,\n predicate:\n 'has a Rank not strictly lower than the Master Node of its Fragment',\n },\n 'classification/horizontal-hierarchy-members': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_9,\n predicate:\n 'has a Horizontal Hierarchy over children that FAF does not allow to be ordered',\n },\n 'classification/horizontal-hierarchy-overlap': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_4,\n predicate: 'is selected by more than one Horizontal Hierarchy',\n },\n 'classification/missing-access-node': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate: 'has no index.ts Access Node',\n },\n 'classification/missing-master-node': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate:\n 'has no direct Fragment Node with the Role imposed by its Category',\n },\n 'classification/nomenclature': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_4_6_3_5_6_6,\n predicate: 'does not follow the naming contract of its classification',\n },\n 'classification/unclassifiable-directory': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_9,\n predicate: 'has no unique Logical Domain classification',\n },\n 'classification/unclassifiable-file': {\n family: 'classification',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_9,\n predicate:\n 'is neither a uniquely classified Logical Node nor a Foreign Node',\n },\n 'configuration/commonjs-package-type': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate:\n 'requires nearest package.json not to declare \"type\": \"commonjs\"',\n },\n 'configuration/config-load-failure': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'failed to load configuration',\n },\n 'configuration/conflicting-origin-kind': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'cannot be declared as both a Root Layer and a Root Fragment',\n },\n 'configuration/contradictory-root-foreign': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_7,\n predicate: 'cannot be declared as both a Root Node and a Foreign Node',\n },\n 'configuration/duplicate-alias-source': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_4,\n predicate:\n 'cannot declare path aliases when package.json imports are present',\n },\n 'configuration/duplicate-category': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'is declared more than once in the role catalog',\n },\n 'configuration/duplicate-element': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'is a duplicate element',\n },\n 'configuration/duplicate-implicit-extension': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'is declared more than once across roles',\n },\n 'configuration/duplicate-mimetic-path': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_5,\n predicate: 'is designated more than once as a mimetic path',\n },\n 'configuration/duplicate-origin': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'is declared more than once as a tree origin',\n },\n 'configuration/duplicate-role-name': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'is declared more than once in the role catalog',\n },\n 'configuration/empty-list': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'cannot be an empty list',\n },\n 'configuration/empty-string': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'cannot be an empty string',\n },\n 'configuration/empty-tier': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'cannot be an empty tier',\n },\n 'configuration/expected-directory': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'must be a directory',\n },\n 'configuration/expected-file': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'must be a file',\n },\n 'configuration/explicit-undefined': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'cannot be explicitly undefined',\n },\n 'configuration/external-dependency-to-alias': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_3,\n predicate:\n 'cannot be targeted as an external dependency because it is a path alias',\n },\n 'configuration/external-dependency-to-inside-tree': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_3,\n predicate:\n 'must be outside all Fractal Trees as an external dependency target',\n },\n 'configuration/external-dependency-to-library': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_3,\n predicate:\n 'cannot be targeted as an external dependency because it is a node_modules library',\n },\n 'configuration/implicit-extension-category-node-mismatch': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'must be true for a role with implicit extensions',\n },\n 'configuration/implicit-extension-role-name-prefix': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'cannot start with a segment matching a role name',\n },\n 'configuration/incompatible-foreign-origin': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_7,\n predicate: 'cannot be designated as a foreign domain',\n },\n 'configuration/incompatible-mimetic-designation': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_5,\n predicate: 'must identify a Category of Fragments',\n },\n 'configuration/incompatible-root-in-foreign-domain': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_7,\n predicate: 'cannot be designated inside a foreign domain',\n },\n 'configuration/invalid-action-name': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_5,\n predicate: 'must adhere to kebab-case grammar',\n },\n 'configuration/invalid-alias-key': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_4,\n predicate: 'must begin with an allowed prefix and follow valid syntax',\n },\n 'configuration/invalid-alias-source': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_4,\n predicate: 'must declare valid imports with subpath keys',\n },\n 'configuration/invalid-default-export-function': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'cannot export a function as its default export',\n },\n 'configuration/invalid-default-export-promise': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'cannot export a Promise as its default export',\n },\n 'configuration/invalid-external-dependency-source': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_3,\n predicate: 'must be an authorized logical node in externalDependencies',\n },\n 'configuration/invalid-file-name': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_4,\n predicate: 'must adhere to kebab-case grammar',\n },\n 'configuration/invalid-foreign-pattern': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_05,\n predicate: 'must adhere to allowed glob pattern grammar',\n },\n 'configuration/invalid-implicit-extension': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'must start with a dot and contain only lowercase letters',\n },\n 'configuration/invalid-literal-path': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_05,\n predicate: 'must be a POSIX relative path without empty or parent segments',\n },\n 'configuration/invalid-origin': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'must be a directory',\n },\n 'configuration/invalid-package-json': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'is invalid or unreadable',\n },\n 'configuration/invalid-public-root-node': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_1,\n predicate: 'must identify an enumerated Root Node in publicRootNodes',\n },\n 'configuration/invalid-root-dependency-from': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate: 'must be an enumerated root node as a root dependency source',\n },\n 'configuration/invalid-root-dependency-to': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate: 'must be an enumerated root node as a root dependency target',\n },\n 'configuration/invalid-type': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'has an invalid type',\n },\n 'configuration/missing-config-file': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'was not found',\n },\n 'configuration/missing-default-export': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'must declare a default export',\n },\n 'configuration/missing-origin': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'must be an existing tree origin directory',\n },\n 'configuration/missing-property': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'is required and missing',\n },\n 'configuration/missing-roles': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'must declare a roles catalog in local or common configuration',\n },\n 'configuration/nested-root-fragment-not-direct-child': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate: 'must be a direct child directory of the root fragment',\n },\n 'configuration/non-existent-path': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'does not exist',\n },\n 'configuration/null-forbidden': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'cannot be null',\n },\n 'configuration/origin-contained-in-other-tree': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'cannot be contained within another tree',\n },\n 'configuration/origin-designated-foreign-domain': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_7,\n predicate: 'cannot be designated as a foreign domain',\n },\n 'configuration/overlapping-origins': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'overlaps with another declared tree origin',\n },\n 'configuration/public-root-node-not-enumerated': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_1,\n predicate: 'must be an enumerated root node of its tree in publicRootNodes',\n },\n 'configuration/public-root-nodes-in-root-layer-tree': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_1,\n predicate:\n 'cannot be declared as a public root node in a tree with only Root Layers',\n },\n 'configuration/reference-outside-local-scope': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6,\n predicate: 'must belong to a tree within this local configuration',\n },\n 'configuration/reference-outside-trees': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6,\n predicate: 'must be inside a Fractal Tree of this configuration',\n },\n 'configuration/role-name-conflict': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_3_1,\n predicate: 'conflicts with a standard role name',\n },\n 'configuration/root-dependency-different-tree': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate: 'must belong to the same tree as the root dependency source',\n },\n 'configuration/root-dependency-same-fragment': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate: 'cannot belong to the same root fragment as its source',\n },\n 'configuration/root-node-not-direct-child': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate: 'must be a direct child root node of the root fragment',\n },\n 'configuration/scope-mismatch': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'cannot be declared in this configuration scope',\n },\n 'configuration/tree-dependency-from-outside-scope': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_2,\n predicate:\n 'must belong to this local configuration as a tree dependency source',\n },\n 'configuration/tree-dependency-not-tree-origin': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_2,\n predicate: 'must identify a declared tree origin as a tree dependency',\n },\n 'configuration/tree-dependency-self': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_2,\n predicate: 'cannot declare a tree dependency on itself',\n },\n 'configuration/unclonable-config-value': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'exports a default value that cannot be cloned',\n },\n 'configuration/undeclared-sub-root-fragment': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate: 'must be declared in subRootFragments',\n },\n 'configuration/unenumerated-root-file': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate:\n 'must be either enumerated as a Root Node or designated as a Foreign Node',\n },\n 'configuration/unknown-property': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_14,\n predicate: 'is not a recognized property',\n },\n 'configuration/unresolvable-alias-base': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_FAF_7_4,\n predicate: 'defines a path alias whose base path cannot be resolved',\n },\n 'configuration/unresolved-relative-import': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'requires relative imports to include explicit file extensions',\n },\n 'configuration/unsupported-typescript-syntax': {\n family: 'configuration',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'contains unsupported non-strippable TypeScript syntax',\n },\n 'dependency/access-node-sources': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate:\n 'an Access Node imports only direct Fragment Nodes of its own Fragment',\n },\n 'dependency/external-dependencies': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_7_3,\n predicate:\n 'a local file outside all Fractal Trees is importable only with an externalDependencies authorization of this source',\n },\n 'dependency/foreign-node-isolation': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_4_6_7,\n predicate: 'a Foreign Node has no import relation with codebase files',\n },\n 'dependency/fractal-branch-unidirectionality': {\n family: 'dependency',\n form: 'edge-or-path',\n normativeReference: REFERENCE_FAF_6_6_2,\n predicate:\n 'a Fractal Branch must not depend on the other subtrees of its parent',\n },\n 'dependency/fractal-branch-visibility': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_6_6_2,\n predicate:\n 'a Fractal Branch is importable only from the subtree of its parent, except the parent Access Node',\n },\n 'dependency/fragment-encapsulation': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate:\n 'a Fragment is importable from outside only through its index.ts',\n },\n 'dependency/path-alias-anchoring': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_7_4,\n predicate:\n 'a Path Alias importing its own Fractal Tree must have a Fractal Branch of that Tree as base in every alternative',\n },\n 'dependency/peer-separation': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_5,\n predicate:\n 'sibling subtrees may depend on each other only downward along a Horizontal Hierarchy',\n },\n 'dependency/private-category-unidirectionality': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_6_3_3,\n predicate:\n 'a Private Category must not import the direct Logical Nodes of its parent',\n },\n 'dependency/private-category-visibility': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_6_3_3,\n predicate:\n 'a Private Category is importable from outside only by the enabled direct Logical Nodes of its parent',\n },\n 'dependency/re-entry-prohibition': {\n family: 'dependency',\n form: 'path',\n normativeReference: REFERENCE_FAF_7_3,\n predicate:\n 'a path through local files outside all Fractal Trees must not re-enter its Fractal Tree',\n },\n 'dependency/root-node-discipline': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_6_2_2,\n predicate:\n 'a Root Node is importable only by Root Nodes authorized by rootNodes or dependencyEdges',\n },\n 'dependency/sub-graph-node-isolation': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_4,\n predicate: 'a Sub-Graph Node is not importable',\n },\n 'dependency/tree-authorization': {\n family: 'dependency',\n form: 'edge-or-path',\n normativeReference: REFERENCE_FAF_7_2_7_3,\n predicate:\n 'a dependency between Fractal Trees requires an oriented treeDependencies authorization',\n },\n 'dependency/tree-opacity': {\n family: 'dependency',\n form: 'edge',\n normativeReference: REFERENCE_FAF_7_1,\n predicate:\n 'only the Public Surface of a Fractal Tree is importable from outside the Tree',\n },\n 'symbol/access-node-master-export': {\n family: 'symbol',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate: 'does not re-export the Symbol of its Master Node',\n },\n 'symbol/access-node-own-symbols': {\n family: 'symbol',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate: 'defines its own Symbols as Access Node',\n },\n 'symbol/master-symbol': {\n family: 'symbol',\n form: 'element',\n normativeReference: REFERENCE_FAF_6_1_1,\n predicate: 'does not define and export exactly one Symbol as Master Node',\n },\n 'symbol/re-export-prohibition': {\n family: 'symbol',\n form: 'element',\n normativeReference: REFERENCE_FAF_5,\n predicate: 're-exports an imported Symbol',\n },\n 'symbol/symbol-uniqueness': {\n family: 'symbol',\n form: 'element',\n normativeReference: REFERENCE_FAF_5,\n predicate: 'defines more than one Symbol in its root scope',\n },\n 'unverified/config-loading-timeout': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_09,\n predicate: 'timed out during configuration loading',\n },\n 'unverified/cyclic-root-authorization': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_04,\n predicate:\n 'declares reciprocal root dependency authorizations without physical code cycle',\n },\n 'unverified/cyclic-tree-authorization': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_04,\n predicate:\n 'declares reciprocal tree dependencies without physical code cycle',\n },\n 'unverified/non-literal-dynamic-import': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_07,\n predicate:\n 'contains a non-literal dynamic import that cannot be resolved statically',\n },\n 'unverified/symbolic-link': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'is a symbolic link within a tree',\n },\n 'unverified/unreadable-entry': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'could not be inspected',\n },\n 'unverified/unreadable-external-file': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_03,\n predicate: 'could not be read',\n },\n 'unverified/unreadable-origin': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_06,\n predicate: 'could not be accessed',\n },\n 'unverified/unresolved-import': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_08,\n predicate: 'contains an import that could not be resolved',\n },\n 'unverified/unsupported-syntax': {\n family: 'unverified',\n form: 'element',\n normativeReference: REFERENCE_D_07,\n predicate: 'contains unsupported syntax',\n },\n} as const satisfies Record<TConstraint, TCatalogEntry>;\n","import type {\n TAcyclicityConstraint,\n TCatalogEntry,\n TClassificationConstraint,\n TConfigConstraint,\n TConfigFacts,\n TConstraint,\n TCycleFacts,\n TDependencyConstraint,\n TEdgeFacts,\n TOutcome,\n TOutcomeFacts,\n TPathFacts,\n TSymbolConstraint,\n TUnverifiedConstraint,\n TUnverifiedFacts,\n} from '../../../../_types/outcome.type.js';\n\nexport const buildOutcomeRecord = (() => {\n type TPositionSpread =\n | Record<string, never>\n | { readonly position: { readonly column: number; readonly line: number } };\n\n const isAcyclicity = (c: TConstraint): c is TAcyclicityConstraint =>\n c.startsWith('acyclicity/');\n const isClassification = (c: TConstraint): c is TClassificationConstraint =>\n c.startsWith('classification/');\n const isConfig = (c: TConstraint): c is TConfigConstraint =>\n c.startsWith('configuration/');\n const isDependency = (c: TConstraint): c is TDependencyConstraint =>\n c.startsWith('dependency/');\n const isSymbol = (c: TConstraint): c is TSymbolConstraint =>\n c.startsWith('symbol/');\n const isUnverified = (c: TConstraint): c is TUnverifiedConstraint =>\n c.startsWith('unverified/');\n\n const isCycleFacts = (f: TOutcomeFacts): f is TCycleFacts => 'cycle' in f;\n const isConfigFacts = (f: TOutcomeFacts): f is TConfigFacts =>\n 'propertyPath' in f;\n const isDependencyFacts = (f: TOutcomeFacts): f is TEdgeFacts | TPathFacts =>\n 'from' in f;\n const isUnverifiedFacts = (f: TOutcomeFacts): f is TUnverifiedFacts =>\n 'reason' in f;\n const hasElement = (\n f: TOutcomeFacts\n ): f is TOutcomeFacts & { readonly element: string } =>\n 'element' in f && typeof f.element === 'string';\n\n function buildCoreOutcome(\n code: TConstraint,\n entry: TCatalogEntry,\n message: string,\n facts: TOutcomeFacts,\n positionSpread: TPositionSpread\n ): TOutcome | undefined {\n if (isAcyclicity(code) && isCycleFacts(facts)) {\n return {\n ...positionSpread,\n constraint: code,\n cycle: facts.cycle,\n element: facts.element,\n family: 'acyclicity',\n message,\n normativeReference: entry.normativeReference,\n };\n }\n if (isClassification(code) && hasElement(facts)) {\n return {\n ...positionSpread,\n constraint: code,\n element: facts.element,\n family: 'classification',\n message,\n normativeReference: entry.normativeReference,\n };\n }\n if (isConfig(code) && isConfigFacts(facts)) {\n return {\n ...positionSpread,\n constraint: code,\n element: facts.element ?? facts.propertyPath,\n family: 'configuration',\n message,\n normativeReference: entry.normativeReference,\n propertyPath: facts.propertyPath,\n };\n }\n return undefined;\n }\n\n function buildDependencyOutcome(\n code: TConstraint,\n entry: TCatalogEntry,\n message: string,\n facts: TOutcomeFacts,\n positionSpread: TPositionSpread\n ): TOutcome | undefined {\n if (isDependency(code) && isDependencyFacts(facts)) {\n return {\n ...('chain' in facts && { chain: facts.chain }),\n ...positionSpread,\n ...('specifier' in facts && { specifier: facts.specifier }),\n constraint: code,\n element: facts.element ?? facts.from,\n family: 'dependency',\n from: facts.from,\n importIndex: facts.importIndex,\n message,\n normativeReference: entry.normativeReference,\n to: facts.to,\n };\n }\n return undefined;\n }\n\n function buildSymbolOrUnverified(\n code: TConstraint,\n entry: TCatalogEntry,\n message: string,\n facts: TOutcomeFacts,\n positionSpread: TPositionSpread\n ): TOutcome {\n if (isSymbol(code) && hasElement(facts)) {\n return {\n ...('symbolCount' in facts && { symbolCount: facts.symbolCount }),\n ...('symbolName' in facts && { symbolName: facts.symbolName }),\n ...positionSpread,\n constraint: code,\n element: facts.element,\n family: 'symbol',\n message,\n normativeReference: entry.normativeReference,\n };\n }\n const unverifiedConstraint: TUnverifiedConstraint = isUnverified(code)\n ? code\n : 'unverified/unsupported-syntax';\n return {\n ...positionSpread,\n constraint: unverifiedConstraint,\n element: hasElement(facts) ? facts.element : '',\n family: 'unverified',\n message,\n normativeReference: entry.normativeReference,\n reason: isUnverifiedFacts(facts) ? facts.reason : 'unsupported-syntax',\n };\n }\n\n return function buildOutcomeRecord(\n code: TConstraint,\n entry: TCatalogEntry,\n message: string,\n facts: TOutcomeFacts\n ): TOutcome {\n const positionSpread: TPositionSpread =\n facts.position === undefined ? {} : { position: facts.position };\n\n return (\n buildCoreOutcome(code, entry, message, facts, positionSpread) ??\n buildDependencyOutcome(code, entry, message, facts, positionSpread) ??\n buildSymbolOrUnverified(code, entry, message, facts, positionSpread)\n );\n };\n})();\n","import type { TFormatFacts } from './format-outcome-message.type.js';\n\nexport function formatOutcomeMessage(\n predicate: string,\n facts: TFormatFacts\n): string {\n if (facts.cycle !== undefined) {\n const segments = facts.cycle.map((s) => s.join(' -> ')).join('; ');\n return `'${facts.element}' ${predicate}: ${segments}`;\n }\n if (facts.chain !== undefined) {\n const chainText = facts.chain.join(' -> ');\n return `'${facts.from}' reaches '${facts.to}' through ${chainText}: ${predicate}`;\n }\n if (facts.specifier !== undefined) {\n return `'${facts.from}' imports '${facts.to}' through '${facts.specifier}': ${predicate}`;\n }\n const element = facts.element ?? facts.propertyPath;\n if (\n facts.detail !== undefined &&\n facts.detail !== null &&\n facts.detail !== ''\n ) {\n const cleaned = facts.detail.replace(/\\.$/, '');\n return `'${element}' ${predicate}: ${cleaned}`;\n }\n return `'${element}' ${predicate}`;\n}\n","import type {\n TAcyclicityConstraint,\n TAcyclicityOutcome,\n TClassificationConstraint,\n TClassificationOutcome,\n TConfigConstraint,\n TConfigFacts,\n TConfigOutcome,\n TConstraint,\n TCycleFacts,\n TDependencyOutcome,\n TEdgeFacts,\n TEdgeOnlyDependencyConstraint,\n TEdgeOrPathDependencyConstraint,\n TElementFacts,\n TOutcome,\n TOutcomeFacts,\n TOutcomeFactsFor,\n TOutcomeFor,\n TPathFacts,\n TPathOnlyDependencyConstraint,\n TSymbolConstraint,\n TSymbolFacts,\n TSymbolOutcome,\n TUnverifiedConstraint,\n TUnverifiedFacts,\n TUnverifiedOutcome,\n} from '../../_types/outcome.type.js';\n\nimport { OUTCOME_CATALOG } from '../../_configs/outcome-catalog.config.js';\nimport { buildOutcomeRecord } from './_utils/build-outcome-record/index.js';\nimport { formatOutcomeMessage } from './_utils/format-outcome-message/index.js';\n\nexport function createOutcome(\n code: TAcyclicityConstraint,\n facts: TCycleFacts\n): TAcyclicityOutcome;\nexport function createOutcome(\n code: TClassificationConstraint,\n facts: TElementFacts\n): TClassificationOutcome;\nexport function createOutcome(\n code: TConfigConstraint,\n facts: TConfigFacts\n): TConfigOutcome;\nexport function createOutcome(\n code: TPathOnlyDependencyConstraint,\n facts: TPathFacts\n): TDependencyOutcome;\nexport function createOutcome(\n code: TEdgeOrPathDependencyConstraint,\n facts: TEdgeFacts | TPathFacts\n): TDependencyOutcome;\nexport function createOutcome(\n code: TEdgeOnlyDependencyConstraint,\n facts: TEdgeFacts\n): TDependencyOutcome;\nexport function createOutcome(\n code: TSymbolConstraint,\n facts: TSymbolFacts\n): TSymbolOutcome;\nexport function createOutcome(\n code: TUnverifiedConstraint,\n facts: TUnverifiedFacts\n): TUnverifiedOutcome;\nexport function createOutcome<K extends TConstraint>(\n code: K,\n facts: TOutcomeFactsFor<K>\n): TOutcomeFor<K>;\nexport function createOutcome(\n code: TConstraint,\n facts: TOutcomeFacts\n): TOutcome {\n const entry = OUTCOME_CATALOG[code];\n const message = formatOutcomeMessage(entry.predicate, facts);\n return buildOutcomeRecord(code, entry, message, facts);\n}\n","import nodePath from 'node:path';\n\nimport type { TAnchoredOutcome } from './_session@shared/_types/anchored-outcome.type.js';\nimport type { TSessionMemo, TSessionQuery } from './session.type.js';\n\nimport { hasMatchingFileFingerprints } from './_adapters/match-file-fingerprints/index.js';\nimport { readFileFingerprints } from './_adapters/read-file-fingerprints/index.js';\nimport { readSourceOverlay } from './_adapters/read-source-overlay/index.js';\nimport { verifyProject } from './_services/verify-project/index.js';\nimport { readModuleRecordCache } from './_session@shared/_adapters/read-module-record-cache/index.js';\nimport { writeModuleRecordCache } from './_session@shared/_adapters/write-module-record-cache/index.js';\nimport { moduleRecordStore } from './_session@shared/_stores/module-record-store/index.js';\n\nexport const session = (() => {\n const memos = new Map<string, TSessionMemo>();\n let activeConfigPath: null | string = null;\n\n const outcomesForFile = (\n byFile: ReadonlyMap<string, readonly TAnchoredOutcome[]>,\n filename: string\n ): readonly TAnchoredOutcome[] =>\n byFile.get(nodePath.resolve(filename)) ?? [];\n\n const loadRecordCache = (\n configPath: string,\n packageVersion: string\n ): void => {\n if (activeConfigPath !== configPath) {\n moduleRecordStore.clear();\n moduleRecordStore.setPersistentEntries(\n readModuleRecordCache({\n baseDirectory: nodePath.dirname(configPath),\n packageVersion,\n })\n );\n activeConfigPath = configPath;\n return;\n }\n moduleRecordStore.setPersistentEntries(\n readModuleRecordCache({\n baseDirectory: nodePath.dirname(configPath),\n packageVersion,\n })\n );\n };\n\n const verifyFresh = (\n query: TSessionQuery,\n configPath: string,\n overlayKey: string,\n overlayText: null | string\n ): readonly TAnchoredOutcome[] => {\n loadRecordCache(configPath, query.packageVersion);\n const fileOverlays = new Map<string, string>();\n if (overlayText !== null) {\n fileOverlays.set(nodePath.resolve(query.filename), overlayText);\n }\n const result = verifyProject({\n configPath,\n fileOverlays,\n workingDirectory: query.workingDirectory,\n });\n writeModuleRecordCache({\n baseDirectory: nodePath.dirname(configPath),\n entries: moduleRecordStore.getAllEntries(),\n packageVersion: query.packageVersion,\n });\n const watchedFiles = [\n configPath,\n ...result.loadedFiles,\n nodePath.resolve(result.baseDirectory, 'package.json'),\n ...result.externalFiles,\n ];\n const memo: TSessionMemo = {\n byFile: result.byFile,\n fingerprints: readFileFingerprints({\n treeOrigins: result.treeOrigins,\n watchedFiles,\n }),\n overrideKey: overlayKey,\n treeOrigins: result.treeOrigins,\n watchedFiles,\n };\n memos.set(configPath, memo);\n return outcomesForFile(memo.byFile, query.filename);\n };\n\n return {\n clearModuleRecords(): void {\n moduleRecordStore.clear();\n memos.clear();\n activeConfigPath = null;\n },\n\n outcomesFor(query: TSessionQuery): readonly TAnchoredOutcome[] {\n const configPath = nodePath.isAbsolute(query.configPath)\n ? query.configPath\n : nodePath.resolve(query.workingDirectory, query.configPath);\n const overlay = readSourceOverlay(query.filename, query.sourceText);\n const previous = memos.get(configPath);\n if (previous === undefined) {\n return verifyFresh(query, configPath, overlay.key, overlay.text);\n }\n const isUnchanged =\n previous.overrideKey === overlay.key &&\n hasMatchingFileFingerprints(previous.fingerprints, {\n treeOrigins: previous.treeOrigins,\n watchedFiles: previous.watchedFiles,\n });\n return isUnchanged\n ? outcomesForFile(previous.byFile, query.filename)\n : verifyFresh(query, configPath, overlay.key, overlay.text);\n },\n };\n})();\n","import nodeFs from 'node:fs';\n\nimport type { TFileFingerprint } from '../../../../_session@shared/_types/file-fingerprint.type.js';\n\nimport { readOriginDirents } from '../../../../_session@shared/_adapters/read-origin-dirents/index.js';\nimport { hasMatchingOriginDirents } from './_adapters/has-matching-origin-dirents/index.js';\nimport { countOriginExpectedEntries } from './_utils/count-origin-expected-entries/index.js';\n\nexport function hasMatchingTreeOrigin(\n expected: ReadonlyMap<string, TFileFingerprint>,\n origin: string\n): boolean {\n const originStat = nodeFs.statSync(origin, { throwIfNoEntry: false });\n const expectedOrigin = expected.get(origin);\n if (originStat === undefined) {\n return expectedOrigin !== undefined && expectedOrigin.mtimeMs === -1;\n }\n if (\n expectedOrigin === undefined ||\n expectedOrigin.mtimeMs !== originStat.mtimeMs ||\n expectedOrigin.size !== originStat.size\n ) {\n return false;\n }\n\n const dirents = readOriginDirents(origin);\n return (\n dirents.length === countOriginExpectedEntries(expected, origin) &&\n hasMatchingOriginDirents(expected, dirents)\n );\n}\n","import nodeFs from 'node:fs';\n\nexport function readOriginDirents(origin: string): readonly nodeFs.Dirent[] {\n try {\n return nodeFs.readdirSync(origin, {\n recursive: true,\n withFileTypes: true,\n });\n } catch {\n return [];\n }\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\n\nimport type { TFileFingerprint } from '../../../../../../_session@shared/_types/file-fingerprint.type.js';\n\nexport function hasMatchingOriginDirents(\n expected: ReadonlyMap<string, TFileFingerprint>,\n dirents: readonly nodeFs.Dirent[]\n): boolean {\n for (const dirent of dirents) {\n const entryPath = nodePath.join(dirent.parentPath, dirent.name);\n const stat = nodeFs.statSync(entryPath, { throwIfNoEntry: false });\n const expectedItem = expected.get(entryPath);\n if (expectedItem === undefined) {\n return false;\n }\n if (stat === undefined) {\n if (expectedItem.mtimeMs !== -1) {\n return false;\n }\n continue;\n }\n if (\n expectedItem.mtimeMs !== stat.mtimeMs ||\n expectedItem.size !== stat.size\n ) {\n return false;\n }\n }\n return true;\n}\n","import nodePath from 'node:path';\n\nimport type { TFileFingerprint } from '../../../../../../_session@shared/_types/file-fingerprint.type.js';\n\nexport function countOriginExpectedEntries(\n expected: ReadonlyMap<string, TFileFingerprint>,\n origin: string\n): number {\n const prefix = origin.endsWith(nodePath.sep)\n ? origin\n : `${origin}${nodePath.sep}`;\n let count = 0;\n for (const key of expected.keys()) {\n if (key.startsWith(prefix)) {\n count += 1;\n }\n }\n return count;\n}\n","import nodeFs from 'node:fs';\n\nimport type { TFileFingerprint } from '../../../../_session@shared/_types/file-fingerprint.type.js';\n\nexport function hasMatchingWatchedFiles(\n expected: ReadonlyMap<string, TFileFingerprint>,\n watchedFiles: readonly string[]\n): boolean {\n for (const filePath of watchedFiles) {\n const stat = nodeFs.statSync(filePath, { throwIfNoEntry: false });\n const expectedItem = expected.get(filePath);\n const mtimeMs = stat?.mtimeMs ?? -1;\n const size = stat?.size ?? -1;\n if (\n expectedItem === undefined ||\n expectedItem.mtimeMs !== mtimeMs ||\n expectedItem.size !== size\n ) {\n return false;\n }\n }\n return true;\n}\n","import type { TFileFingerprint } from '../../_session@shared/_types/file-fingerprint.type.js';\nimport type { TMatchFileFingerprintsInput } from './match-file-fingerprints.type.js';\n\nimport { hasMatchingTreeOrigin } from './_adapters/has-matching-tree-origin/index.js';\nimport { hasMatchingWatchedFiles } from './_adapters/has-matching-watched-files/index.js';\n\nexport function hasMatchingFileFingerprints(\n expected: ReadonlyMap<string, TFileFingerprint>,\n input: TMatchFileFingerprintsInput\n): boolean {\n if (!hasMatchingWatchedFiles(expected, input.watchedFiles ?? [])) {\n return false;\n }\n const treeOrigins = input.treeOrigins ?? [];\n for (const origin of treeOrigins) {\n if (!hasMatchingTreeOrigin(expected, origin)) {\n return false;\n }\n }\n return true;\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\n\nimport type { TFileFingerprint } from '../../_session@shared/_types/file-fingerprint.type.js';\nimport type { TReadFileFingerprintsInput } from './read-file-fingerprints.type.js';\n\nimport { readOriginDirents } from '../../_session@shared/_adapters/read-origin-dirents/index.js';\n\nexport function readFileFingerprints(\n input: TReadFileFingerprintsInput\n): ReadonlyMap<string, TFileFingerprint> {\n const fingerprints = new Map<string, TFileFingerprint>();\n const watchedFiles = input.watchedFiles ?? [];\n\n for (const filePath of watchedFiles) {\n const stat = nodeFs.statSync(filePath, { throwIfNoEntry: false });\n fingerprints.set(\n filePath,\n stat === undefined\n ? { mtimeMs: -1, path: filePath, size: -1 }\n : { mtimeMs: stat.mtimeMs, path: filePath, size: stat.size }\n );\n }\n\n const treeOrigins = input.treeOrigins ?? [];\n for (const origin of treeOrigins) {\n const originStat = nodeFs.statSync(origin, { throwIfNoEntry: false });\n if (originStat === undefined) {\n fingerprints.set(origin, { mtimeMs: -1, path: origin, size: -1 });\n continue;\n }\n fingerprints.set(origin, {\n mtimeMs: originStat.mtimeMs,\n path: origin,\n size: originStat.size,\n });\n for (const dirent of readOriginDirents(origin)) {\n const entryPath = nodePath.join(dirent.parentPath, dirent.name);\n const stat = nodeFs.statSync(entryPath, { throwIfNoEntry: false });\n if (stat !== undefined) {\n fingerprints.set(entryPath, {\n mtimeMs: stat.mtimeMs,\n path: entryPath,\n size: stat.size,\n });\n }\n }\n }\n\n return fingerprints;\n}\n","import nodePath from 'node:path';\n\nimport type { TSourceOverlay } from './read-source-overlay.type.js';\n\nimport { readFileSnapshot } from '../../_session@shared/_adapters/read-file-snapshot/index.js';\n\nexport function readSourceOverlay(\n filename: string,\n sourceText: string\n): TSourceOverlay {\n const absolute = nodePath.resolve(filename);\n const snapshot = readFileSnapshot(absolute);\n return snapshot.present && snapshot.text === sourceText\n ? { key: '', text: null }\n : { key: `${absolute}\\0${sourceText}`, text: sourceText };\n}\n","import nodeFs from 'node:fs';\n\nimport type { TFileSnapshot } from './read-file-snapshot.type.js';\n\nexport function readFileSnapshot(filePath: string): TFileSnapshot {\n try {\n const text = nodeFs.readFileSync(filePath, 'utf8');\n const stats = nodeFs.statSync(filePath);\n return {\n mtimeMs: stats.mtimeMs,\n present: true,\n size: stats.size,\n text,\n };\n } catch {\n return { present: false };\n }\n}\n","import nodePath from 'node:path';\n\nimport type { TVerificationModel } from './_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type {\n TVerifyProjectInput,\n TVerifyProjectResult,\n} from './verify-project.type.js';\n\nimport { toPosixPath } from '../../_session@shared/_utils/to-posix-path/index.js';\nimport { collectModules } from './_adapters/collect-modules/index.js';\nimport { verifyAccessNodeContract } from './_norms/access-node-contract/index.js';\nimport { verifyAcyclicity } from './_norms/acyclicity/index.js';\nimport { verifyCategoryRole } from './_norms/category-role/index.js';\nimport { verifyClassificationCompleteness } from './_norms/classification-completeness/index.js';\nimport { verifyContainmentMatrix } from './_norms/containment-matrix/index.js';\nimport { verifyExclusiveForms } from './_norms/exclusive-forms/index.js';\nimport { verifyExternalDependencies } from './_norms/external-dependencies/index.js';\nimport { verifyForeignNodeIsolation } from './_norms/foreign-node-isolation/index.js';\nimport { verifyFractalBranchUnidirectionality } from './_norms/fractal-branch-unidirectionality/index.js';\nimport { verifyFractalBranchVisibility } from './_norms/fractal-branch-visibility/index.js';\nimport { verifyFragmentAnatomy } from './_norms/fragment-anatomy/index.js';\nimport { verifyFragmentEncapsulation } from './_norms/fragment-encapsulation/index.js';\nimport { verifyHorizontalHierarchies } from './_norms/horizontal-hierarchies/index.js';\nimport { verifyNomenclature } from './_norms/nomenclature/index.js';\nimport { verifyPathAliasAnchoring } from './_norms/path-alias-anchoring/index.js';\nimport { verifyPeerSeparation } from './_norms/peer-separation/index.js';\nimport { verifyPrivateCategoryVisibility } from './_norms/private-category-visibility/index.js';\nimport { verifyReEntryProhibition } from './_norms/re-entry-prohibition/index.js';\nimport { verifyReExportProhibition } from './_norms/re-export-prohibition/index.js';\nimport { verifyRootNodeDiscipline } from './_norms/root-node-discipline/index.js';\nimport { verifySubGraphNodeIsolation } from './_norms/sub-graph-node-isolation/index.js';\nimport { verifySymbolUniqueness } from './_norms/symbol-uniqueness/index.js';\nimport { verifyTreeFrontier } from './_norms/tree-frontier/index.js';\nimport { prepareProject } from './_services/prepare-project/index.js';\nimport { anchorOutcomes } from './_utils/anchor-outcomes/index.js';\nimport { buildDependencyGraph } from './_utils/build-dependency-graph/index.js';\nimport { classifyTaxonomy } from './_utils/classify-taxonomy/index.js';\nimport { collectExternalFiles } from './_utils/collect-external-files/index.js';\nimport { deriveExternalCrossings } from './_utils/derive-external-crossings/index.js';\nimport { deriveHorizontalHierarchies } from './_utils/derive-horizontal-hierarchies/index.js';\nimport { derivePublicSurface } from './_utils/derive-public-surface/index.js';\n\nexport function verifyProject(\n input: TVerifyProjectInput\n): TVerifyProjectResult {\n const configPath = nodePath.isAbsolute(input.configPath)\n ? input.configPath\n : nodePath.resolve(input.workingDirectory, input.configPath);\n const prepared = prepareProject(configPath);\n if (prepared.kind === 'blocked') {\n const anchored = anchorOutcomes({\n baseDirectory: prepared.baseDirectory,\n configPath: prepared.configPath,\n outcomes: prepared.outcomes,\n });\n return {\n ...anchored,\n baseDirectory: prepared.baseDirectory,\n collectedModules: false,\n externalFiles: [],\n loadedFiles: prepared.loadedFiles,\n treeOrigins: [],\n };\n }\n const taxonomy = classifyTaxonomy({\n declarations: prepared.declarations,\n inventory: prepared.inventory,\n });\n const hierarchies = deriveHorizontalHierarchies(prepared, taxonomy.model);\n const surface = derivePublicSurface(prepared, taxonomy.model);\n const textOverrides = new Map<string, string>();\n if (input.fileOverlays !== undefined) {\n for (const [filePath, text] of input.fileOverlays) {\n const absolute = nodePath.isAbsolute(filePath)\n ? filePath\n : nodePath.resolve(prepared.baseDirectory, filePath);\n const relative = toPosixPath(\n nodePath.relative(prepared.baseDirectory, absolute)\n );\n textOverrides.set(relative, text);\n }\n }\n const modules = collectModules({\n aliases: prepared.aliases,\n baseDirectory: prepared.baseDirectory,\n inventory: prepared.inventory,\n textOverrides,\n });\n const graph = buildDependencyGraph(prepared, taxonomy.model, modules);\n const crossings = deriveExternalCrossings(graph.graph);\n const model: TVerificationModel = {\n basis: prepared,\n crossings,\n graph: graph.graph,\n hierarchies: hierarchies.hierarchies,\n modules,\n surface: surface.surface,\n taxonomy: taxonomy.model,\n };\n const anchored = anchorOutcomes({\n baseDirectory: prepared.baseDirectory,\n configPath: prepared.configPath,\n inventory: prepared.inventory,\n model: taxonomy.model,\n outcomes: [\n ...prepared.inventoryOutcomes,\n ...taxonomy.outcomes,\n ...hierarchies.outcomes,\n ...surface.outcomes,\n ...modules.unverifiedOutcomes,\n ...graph.outcomes,\n ...verifyClassificationCompleteness(model),\n ...verifyContainmentMatrix(model),\n ...verifyExclusiveForms(model),\n ...verifyFragmentAnatomy(model),\n ...verifyCategoryRole(model),\n ...verifyNomenclature(model),\n ...verifyHorizontalHierarchies(model),\n ...verifyPeerSeparation(model),\n ...verifyFragmentEncapsulation(model),\n ...verifyPrivateCategoryVisibility(model),\n ...verifyFractalBranchVisibility(model),\n ...verifyRootNodeDiscipline(model),\n ...verifySubGraphNodeIsolation(model),\n ...verifyForeignNodeIsolation(model),\n ...verifyAccessNodeContract(model),\n ...verifyTreeFrontier(model),\n ...verifyExternalDependencies(model),\n ...verifyPathAliasAnchoring(model),\n ...verifySymbolUniqueness(model),\n ...verifyReExportProhibition(model),\n ...verifyAcyclicity(model),\n ...verifyFractalBranchUnidirectionality(model),\n ...verifyReEntryProhibition(model),\n ],\n });\n const treeOrigins = prepared.declarations.trees.map((tree) =>\n nodePath.resolve(prepared.baseDirectory, tree.originPath)\n );\n const externalFiles = collectExternalFiles({\n baseDirectory: prepared.baseDirectory,\n inventory: prepared.inventory,\n modules,\n treeOrigins,\n });\n return {\n ...anchored,\n baseDirectory: prepared.baseDirectory,\n collectedModules: true,\n externalFiles,\n loadedFiles: prepared.loadedFiles,\n treeOrigins,\n };\n}\n","export function toPosixPath(rawPath: string): string {\n return rawPath.replaceAll('\\\\', '/');\n}\n","import nodeCrypto from 'node:crypto';\n\nimport { MODULE_RECORD_CACHE_SCHEMA_VERSION } from '../../../../_constants/module-record-cache.constant.js';\nimport { toPosixPath } from '../../../../_utils/to-posix-path/index.js';\n\nexport function calculateContentKey(path: string, text: string): string {\n return nodeCrypto\n .createHash('sha256')\n .update(String(MODULE_RECORD_CACHE_SCHEMA_VERSION))\n .update('\\0')\n .update(toPosixPath(path))\n .update('\\0')\n .update(text)\n .digest('hex');\n}\n","export const MODULE_RECORD_CACHE_SCHEMA_VERSION = 1;\n","import type {\n TModuleRecord,\n TModuleRecordProducer,\n} from '../../_types/module-record.type.js';\nimport type {\n TModuleRecordStore,\n TWrapProducerOptions,\n} from './module-record-store.type.js';\n\nimport { calculateContentKey } from './_utils/calculate-content-key/index.js';\n\nexport const moduleRecordStore: TModuleRecordStore = (() => {\n const inMemoryCache = new Map<string, TModuleRecord>();\n const persistentCache = new Map<string, TModuleRecord>();\n const usedSinceLoad = new Map<string, TModuleRecord>();\n\n const clear = (): void => {\n inMemoryCache.clear();\n persistentCache.clear();\n usedSinceLoad.clear();\n };\n\n const getAllEntries = (): ReadonlyMap<string, TModuleRecord> =>\n new Map(usedSinceLoad);\n\n const setPersistentEntries = (\n entries: ReadonlyMap<string, TModuleRecord>\n ): void => {\n persistentCache.clear();\n usedSinceLoad.clear();\n for (const [key, record] of entries) {\n persistentCache.set(key, record);\n }\n };\n\n const wrapProducer = (\n producer: TModuleRecordProducer,\n options?: TWrapProducerOptions\n ): TModuleRecordProducer => {\n if (options?.persistentEntries !== undefined) {\n setPersistentEntries(options.persistentEntries);\n }\n\n return (path: string, text: string): TModuleRecord => {\n const key = calculateContentKey(path, text);\n const inMemoryMatch = inMemoryCache.get(key);\n if (inMemoryMatch !== undefined) {\n usedSinceLoad.set(key, inMemoryMatch);\n return inMemoryMatch;\n }\n\n const persistentMatch = persistentCache.get(key);\n if (persistentMatch !== undefined) {\n inMemoryCache.set(key, persistentMatch);\n usedSinceLoad.set(key, persistentMatch);\n return persistentMatch;\n }\n\n const freshRecord = producer(path, text);\n inMemoryCache.set(key, freshRecord);\n usedSinceLoad.set(key, freshRecord);\n return freshRecord;\n };\n };\n\n return {\n clear,\n getAllEntries,\n setPersistentEntries,\n wrapProducer,\n };\n})();\n","export function assertInvariant(\n isCondition: boolean,\n message: string\n): asserts isCondition {\n if (!isCondition) {\n throw new Error(message);\n }\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\n\nimport type { TReadModuleTextResult } from '../../../../_collect-modules@shared/_types/_aggregates/collect-modules.type.js';\n\nexport function readModuleText(\n baseDirectory: string,\n relativePath: string\n): TReadModuleTextResult {\n const decodeModuleBytes = (bytes: Uint8Array): TReadModuleTextResult => {\n try {\n return {\n status: 'text',\n text: new TextDecoder('utf-8', { fatal: true }).decode(bytes),\n };\n } catch (error: unknown) {\n return {\n reason: `Text is not valid UTF-8: ${String(error)}`,\n status: 'undecodable',\n };\n }\n };\n\n const absolutePath = nodePath.join(baseDirectory, relativePath);\n try {\n const stats = nodeFs.statSync(absolutePath, { throwIfNoEntry: false });\n if (stats === undefined) {\n return { reason: 'File is missing', status: 'missing' };\n }\n if (stats.isDirectory()) {\n return { reason: 'Path is a directory', status: 'directory' };\n }\n if (!stats.isFile()) {\n return { reason: 'Path is not a regular file', status: 'unreadable' };\n }\n return decodeModuleBytes(nodeFs.readFileSync(absolutePath));\n } catch (error: unknown) {\n return {\n reason: String(error),\n status: 'unreadable',\n };\n }\n}\n","import type { TUnverifiedOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TModuleImport,\n TModuleRecord,\n TUnsupportedSyntax,\n} from '../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TImportResolution } from '../../../../../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function collectRecordUnverifiedOutcomes(\n relativePath: string,\n record: TModuleRecord,\n resolutions: readonly TImportResolution[]\n): readonly TUnverifiedOutcome[] {\n const unresolvedImportOutcome = (\n reason: string,\n importItem: TModuleImport | undefined\n ): TUnverifiedOutcome => {\n const isNonLiteral = importItem?.kind === 'non-literal-dynamic-import';\n const position = importItem?.position;\n return isNonLiteral\n ? createOutcome('unverified/non-literal-dynamic-import', {\n element: relativePath,\n ...(position !== undefined && { position }),\n reason,\n })\n : createOutcome('unverified/unresolved-import', {\n detail: reason,\n element: relativePath,\n ...(position !== undefined && { position }),\n reason,\n });\n };\n\n const unsupportedSyntaxOutcome = (\n syntax: TUnsupportedSyntax\n ): TUnverifiedOutcome =>\n createOutcome('unverified/unsupported-syntax', {\n detail: syntax.description,\n element: relativePath,\n position: syntax.position,\n reason: syntax.description,\n });\n\n const outcomes: TUnverifiedOutcome[] = [];\n for (const resolution of resolutions) {\n if (resolution.target.type !== 'unresolved') {\n continue;\n }\n outcomes.push(\n unresolvedImportOutcome(\n resolution.target.reason,\n record.imports[resolution.importIndex]\n )\n );\n }\n for (const syntax of record.unsupportedSyntaxes) {\n outcomes.push(unsupportedSyntaxOutcome(syntax));\n }\n return outcomes;\n}\n","import type { TInventory } from '../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function isTreeFilePath(inventory: TInventory, path: string): boolean {\n const id = inventory.pathToId.get(path);\n if (id === undefined) {\n return false;\n }\n const item = inventory.items[id];\n return item !== undefined && item.kind === 'file' && item.treeOrigin !== null;\n}\n","import type { TUnverifiedOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReadFailureInput } from './read-failure-outcome.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function readFailureOutcome(\n input: TReadFailureInput\n): TUnverifiedOutcome {\n const constraint:\n | 'unverified/unreadable-entry'\n | 'unverified/unreadable-external-file' = input.isTreeFile\n ? 'unverified/unreadable-entry'\n : 'unverified/unreadable-external-file';\n\n return createOutcome(constraint, {\n detail: input.reason,\n element: input.relativePath,\n reason: input.reason,\n });\n}\n","import type {\n TAnalyzeModuleSourceInput,\n TModuleAnalysis,\n TModuleReadFailureKind,\n} from '../../../../_collect-modules@shared/_types/_aggregates/collect-modules.type.js';\n\nimport { collectRecordUnverifiedOutcomes } from './_utils/collect-record-unverified-outcomes/index.js';\nimport { isTreeFilePath } from './_utils/is-tree-file-path/index.js';\nimport { readFailureOutcome } from './_utils/read-failure-outcome/index.js';\n\nexport function analyzeModuleSource(\n input: TAnalyzeModuleSourceInput\n): TModuleAnalysis {\n const readFailure = (kind: TModuleReadFailureKind, reason: string) =>\n readFailureOutcome({\n isTreeFile: isTreeFilePath(input.inventory, input.relativePath),\n kind,\n reason,\n relativePath: input.relativePath,\n });\n\n if (\n input.readResult.status !== 'text' &&\n input.readResult.status !== 'undecodable'\n ) {\n return {\n outcomes: [readFailure(input.readResult.status, input.readResult.reason)],\n record: null,\n resolutions: [],\n };\n }\n\n const text = input.readResult.status === 'text' ? input.readResult.text : '';\n const record = input.producer(input.relativePath, text);\n if (\n input.readResult.status === 'undecodable' &&\n record.language !== 'binary'\n ) {\n return {\n outcomes: [readFailure('undecodable', input.readResult.reason)],\n record: null,\n resolutions: [],\n };\n }\n\n const resolutions = input.resolver(input.relativePath, record.imports);\n return {\n outcomes: collectRecordUnverifiedOutcomes(\n input.relativePath,\n record,\n resolutions\n ),\n record,\n resolutions,\n };\n}\n","import type {\n TAnalyzeQueuedModuleInput,\n TModuleAnalysis,\n} from '../../_collect-modules@shared/_types/_aggregates/collect-modules.type.js';\n\nimport { readModuleText } from './_adapters/read-module-text/index.js';\nimport { analyzeModuleSource } from './_utils/analyze-module-source/index.js';\n\nexport function analyzeQueuedModule(\n input: TAnalyzeQueuedModuleInput\n): TModuleAnalysis {\n const override = input.textOverrides.get(input.relativePath);\n const readResult =\n override === undefined\n ? readModuleText(input.baseDirectory, input.relativePath)\n : { status: 'text' as const, text: override };\n return analyzeModuleSource({\n inventory: input.inventory,\n producer: input.producer,\n readResult,\n relativePath: input.relativePath,\n resolver: input.resolver,\n });\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\nimport { ResolverFactory } from 'oxc-resolver';\n\nimport type { TModuleImport } from '../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TImportResolution } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TEffectivePathAlias } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TSpecifierResolver } from '../../_collect-modules@shared/_types/_compounds/specifier-resolver.type.js';\nimport type { TCachedResolution } from './resolve-specifiers.type.js';\n\nimport { toPosixPath } from '../../../../../../_session@shared/_utils/to-posix-path/index.js';\nimport { assertInvariant } from '../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { canonicalizeDirectory } from '../../_collect-modules@shared/_adapters/canonicalize-directory/index.js';\nimport { NON_LITERAL_DYNAMIC_IMPORT_REASON } from './_resolve-specifiers@shared/_constants/resolve-specifiers.constant.js';\nimport { classifyResolutionTarget } from './_utils/classify-resolution-target/index.js';\nimport { matchPathAlias } from './_utils/match-path-alias/index.js';\n\nexport function resolveSpecifiers(\n baseDirectory: string,\n aliases: readonly TEffectivePathAlias[]\n): TSpecifierResolver {\n const resolvedBase = nodePath.resolve(baseDirectory);\n const canonicalBase = toPosixPath(canonicalizeDirectory(baseDirectory));\n\n const tsconfigCandidate = nodePath.join(resolvedBase, 'tsconfig.json');\n const hasTsconfig = nodeFs.existsSync(tsconfigCandidate);\n const tsconfig = hasTsconfig\n ? { configFile: tsconfigCandidate, references: 'auto' as const }\n : undefined;\n\n const resolver = new ResolverFactory({\n builtinModules: true,\n conditionNames: ['import', 'require', 'node', 'types', 'style', 'default'],\n extensionAlias: {\n '.cjs': ['.cts', '.cjs'],\n '.js': ['.ts', '.tsx', '.js'],\n '.jsx': ['.tsx', '.jsx'],\n '.mjs': ['.mts', '.mjs'],\n },\n extensions: [\n '.ts',\n '.tsx',\n '.mts',\n '.cts',\n '.js',\n '.jsx',\n '.mjs',\n '.cjs',\n '.json',\n '.css',\n ],\n importsFields: [['imports']],\n tsconfig,\n });\n\n const resolutionCache = new Map<string, TCachedResolution>();\n\n const toCanonicalPath = (filePath: string): string => {\n try {\n return nodeFs.realpathSync(filePath);\n } catch {\n return filePath;\n }\n };\n\n const resolveSingle = (\n directory: string,\n specifier: string,\n canFallbackToBare: boolean\n ): TCachedResolution => {\n const cleanSpecifier = specifier.split('?', 1)[0] ?? specifier;\n const matchedAlias = matchPathAlias(cleanSpecifier, aliases);\n const aliasUsed = matchedAlias?.alias.prefix ?? null;\n const aliasAlternatives = matchedAlias?.targets ?? [];\n\n let resolveResult;\n try {\n resolveResult = resolver.sync(directory, specifier);\n if (\n canFallbackToBare &&\n resolveResult.path === undefined &&\n specifier.startsWith('./')\n ) {\n resolveResult = resolver.sync(directory, specifier.slice(2));\n }\n } catch (error: unknown) {\n assertInvariant(error instanceof Error, 'Expected resolver error');\n return {\n aliasAlternatives,\n aliasUsed,\n target: {\n reason: error.message,\n type: 'unresolved',\n },\n };\n }\n\n let acquiredResolveResult = resolveResult;\n if (resolveResult.path !== undefined) {\n const cleanResolvedPath =\n resolveResult.path.split('?', 1)[0] ?? resolveResult.path;\n acquiredResolveResult = {\n ...resolveResult,\n path: toCanonicalPath(cleanResolvedPath),\n };\n }\n\n const target = classifyResolutionTarget({\n aliasAlternatives,\n aliasUsed,\n canonicalBase,\n resolveResult: acquiredResolveResult,\n specifier,\n });\n\n return {\n aliasAlternatives,\n aliasUsed,\n target,\n };\n };\n\n return (\n sourcePath: string,\n imports: readonly TModuleImport[]\n ): readonly TImportResolution[] => {\n const posixInputSource = toPosixPath(sourcePath);\n const resolvedSourceFile = nodePath.resolve(resolvedBase, posixInputSource);\n const directory = nodePath.dirname(resolvedSourceFile);\n const relativeSource = nodePath.relative(resolvedBase, resolvedSourceFile);\n const posixSourcePath = toPosixPath(relativeSource);\n\n const resolutions: TImportResolution[] = [];\n\n for (const [index, importItem] of imports.entries()) {\n if (importItem.specifier === null) {\n resolutions.push({\n aliasAlternatives: [],\n aliasUsed: null,\n importIndex: index,\n sourcePath: posixSourcePath,\n target: {\n reason: NON_LITERAL_DYNAMIC_IMPORT_REASON,\n type: 'unresolved',\n },\n });\n } else {\n const canFallbackToBare =\n importItem.kind === 'css-at-import' || importItem.kind === 'css-url';\n const cacheKey = `${directory}\\0${importItem.specifier}\\0${String(canFallbackToBare)}`;\n let cached = resolutionCache.get(cacheKey);\n\n if (cached === undefined) {\n cached = resolveSingle(\n directory,\n importItem.specifier,\n canFallbackToBare\n );\n resolutionCache.set(cacheKey, cached);\n }\n\n resolutions.push({\n aliasAlternatives: cached.aliasAlternatives,\n aliasUsed: cached.aliasUsed,\n importIndex: index,\n sourcePath: posixSourcePath,\n target: cached.target,\n });\n }\n }\n\n return resolutions;\n };\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\n\nexport function canonicalizeDirectory(directory: string): string {\n const resolved = nodePath.resolve(directory);\n return nodeFs.existsSync(resolved) ? nodeFs.realpathSync(resolved) : resolved;\n}\n","export const DISCORDANCE_REASON =\n 'Path alias resolution falls outside the declared alias targets';\n\nexport const NON_LITERAL_DYNAMIC_IMPORT_REASON =\n 'Non-literal dynamic import cannot be resolved statically';\n\nexport const NODE_MODULES_MARKER = '/node_modules/';\n\nexport const NODE_MODULES_PREFIX = 'node_modules/';\n","import nodePath from 'node:path';\n\nimport type { TResolvedTarget } from '../../../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TClassifyResolutionInput } from './classify-resolution-target.type.js';\n\nimport { toPosixPath } from '../../../../../../../../_session@shared/_utils/to-posix-path/index.js';\nimport { DISCORDANCE_REASON } from '../../_resolve-specifiers@shared/_constants/resolve-specifiers.constant.js';\nimport { extractPackageName } from './_utils/extract-package-name/index.js';\nimport { isAlternativeMatch } from './_utils/is-alternative-match/index.js';\nimport { isInNodeModules } from './_utils/is-in-node-modules/index.js';\n\nexport function classifyResolutionTarget(\n input: TClassifyResolutionInput\n): TResolvedTarget {\n const {\n aliasAlternatives,\n aliasUsed,\n canonicalBase,\n resolveResult,\n specifier,\n } = input;\n\n if (resolveResult.builtin !== undefined || specifier.startsWith('node:')) {\n if (aliasUsed !== null) {\n return {\n reason: DISCORDANCE_REASON,\n type: 'unresolved',\n };\n }\n return {\n packageName: resolveResult.builtin?.resolved ?? specifier,\n type: 'external-library',\n };\n }\n\n const classifyLocalFile = (realResolvedPath: string): TResolvedTarget => {\n const relativeToCanonical = toPosixPath(\n nodePath.relative(canonicalBase, realResolvedPath)\n );\n const posixRelative = relativeToCanonical;\n\n if (aliasUsed !== null) {\n const isMatched = aliasAlternatives.some((alt) =>\n isAlternativeMatch(posixRelative, alt)\n );\n if (!isMatched) {\n return {\n reason: DISCORDANCE_REASON,\n type: 'unresolved',\n };\n }\n }\n\n return {\n path: posixRelative,\n type: 'local-file',\n };\n };\n\n if (resolveResult.path !== undefined) {\n const posixReal = toPosixPath(resolveResult.path);\n\n if (isInNodeModules(posixReal)) {\n if (aliasUsed !== null) {\n return {\n reason: DISCORDANCE_REASON,\n type: 'unresolved',\n };\n }\n return {\n packageName: extractPackageName(posixReal),\n type: 'external-library',\n };\n }\n\n return classifyLocalFile(resolveResult.path);\n }\n\n return {\n reason: resolveResult.error ?? `Cannot resolve module '${specifier}'`,\n type: 'unresolved',\n };\n}\n","import { assertInvariant } from '../../../../../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport {\n NODE_MODULES_MARKER,\n NODE_MODULES_PREFIX,\n} from '../../../../_resolve-specifiers@shared/_constants/resolve-specifiers.constant.js';\n\nexport function extractPackageName(posixPath: string): string {\n const index = posixPath.lastIndexOf(NODE_MODULES_MARKER);\n let remainder: string;\n\n if (index !== -1) {\n remainder = posixPath.slice(index + NODE_MODULES_MARKER.length);\n } else if (posixPath.startsWith(NODE_MODULES_PREFIX)) {\n remainder = posixPath.slice(NODE_MODULES_PREFIX.length);\n } else {\n remainder = posixPath;\n }\n\n const segments = remainder.split('/');\n const first = segments[0];\n assertInvariant(first !== undefined, 'Expected segment');\n const second = segments[1];\n return second !== undefined && first.startsWith('@')\n ? `${first}/${second}`\n : first;\n}\n","import nodePath from 'node:path';\n\nimport { toPosixPath } from '../../../../../../../../../../_session@shared/_utils/to-posix-path/index.js';\n\nexport function isAlternativeMatch(\n resolvedPath: string,\n alternative: string\n): boolean {\n const normResolved = toPosixPath(nodePath.posix.normalize(resolvedPath));\n const normAlt = toPosixPath(nodePath.posix.normalize(alternative));\n\n if (normAlt === '.' || normAlt === './') {\n return !normResolved.startsWith('../');\n }\n\n if (\n normResolved === normAlt ||\n normResolved.startsWith(`${normAlt}/`) ||\n normResolved.startsWith(`${normAlt}.`)\n ) {\n return true;\n }\n\n const altExtension = nodePath.posix.extname(normAlt);\n if (altExtension !== '') {\n const altWithoutExtension = normAlt.slice(0, -altExtension.length);\n const resolvedExtension = nodePath.posix.extname(normResolved);\n if (\n resolvedExtension !== '' &&\n normResolved.slice(0, -resolvedExtension.length) === altWithoutExtension\n ) {\n return true;\n }\n }\n\n return false;\n}\n","import {\n NODE_MODULES_MARKER,\n NODE_MODULES_PREFIX,\n} from '../../../../_resolve-specifiers@shared/_constants/resolve-specifiers.constant.js';\n\nexport function isInNodeModules(posixPath: string): boolean {\n return (\n posixPath.includes(NODE_MODULES_MARKER) ||\n posixPath.startsWith(NODE_MODULES_PREFIX) ||\n posixPath.endsWith('/node_modules')\n );\n}\n","export function applyPathAliasSuffix(target: string, suffix: string): string {\n if (suffix === '') {\n return target;\n }\n\n if (target === '' || target === '.') {\n return suffix;\n }\n\n const cleanTarget = target.endsWith('/') ? target.slice(0, -1) : target;\n return `${cleanTarget}/${suffix}`;\n}\n","import type { TEffectivePathAlias } from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type {\n TCandidateMatch,\n TMatchedPathAlias,\n} from './match-path-alias.type.js';\n\nimport { applyPathAliasSuffix } from './_utils/apply-path-alias-suffix/index.js';\n\nexport function matchPathAlias(\n specifier: string,\n aliases: readonly TEffectivePathAlias[]\n): null | TMatchedPathAlias {\n let bestMatch: null | TCandidateMatch = null;\n\n for (const alias of aliases) {\n const isExactMatch = specifier === alias.prefix;\n const isPrefixMatch = specifier.startsWith(`${alias.prefix}/`);\n\n if (!isExactMatch && !isPrefixMatch) {\n continue;\n }\n\n const currentSuffix = isExactMatch\n ? ''\n : specifier.slice(alias.prefix.length + 1);\n\n const isLongerThanBest =\n bestMatch === null || alias.prefix.length > bestMatch.alias.prefix.length;\n\n if (isLongerThanBest) {\n bestMatch = {\n alias,\n suffix: currentSuffix,\n };\n }\n }\n\n if (bestMatch === null) {\n return null;\n }\n\n const resolvedTargets = bestMatch.alias.targets.map((target) =>\n applyPathAliasSuffix(target, bestMatch.suffix)\n );\n\n return {\n alias: bestMatch.alias,\n suffix: bestMatch.suffix,\n targets: resolvedTargets,\n };\n}\n","import type { TImportResolution } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\n\nimport { toPosixPath } from '../../../../../../_session@shared/_utils/to-posix-path/index.js';\n\nexport function collectUnvisitedLocalPaths(\n resolutions: readonly TImportResolution[],\n visited: ReadonlySet<string>\n): readonly string[] {\n const reachable: string[] = [];\n for (const resolution of resolutions) {\n if (resolution.target.type !== 'local-file') {\n continue;\n }\n\n const path = toPosixPath(resolution.target.path);\n if (!visited.has(path) && !reachable.includes(path)) {\n reachable.push(path);\n }\n }\n return reachable;\n}\n","export function compareOrdinal(left: string, right: string): number {\n if (left < right) {\n return -1;\n }\n\n if (left > right) {\n return 1;\n }\n\n return 0;\n}\n","import type { TSourceLocation } from '../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nexport function compareSourceLocations(\n left: TSourceLocation,\n right: TSourceLocation\n): number {\n return left.line === right.line\n ? left.column - right.column\n : left.line - right.line;\n}\n","import type {\n TSourceLocation,\n TUnverifiedOutcome,\n} from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareUnverifiedOutcomes(\n left: TUnverifiedOutcome,\n right: TUnverifiedOutcome\n): number {\n const absentPosition: TSourceLocation = { column: 0, line: 0 };\n const elementOrder = compareOrdinal(left.element, right.element);\n if (elementOrder !== 0) {\n return elementOrder;\n }\n const constraintOrder = compareOrdinal(left.constraint, right.constraint);\n if (constraintOrder !== 0) {\n return constraintOrder;\n }\n const reasonOrder = compareOrdinal(left.reason, right.reason);\n return reasonOrder === 0\n ? compareSourceLocations(\n left.position ?? absentPosition,\n right.position ?? absentPosition\n )\n : reasonOrder;\n}\n","import type { TModuleRecord } from '../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TModuleCollection } from '../../../../_verify-project@shared/_types/_aggregates/module-collection.type.js';\nimport type { TImportResolution } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TUnorderedModuleCollection } from '../../_collect-modules@shared/_types/_aggregates/collect-modules.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareUnverifiedOutcomes } from './_utils/compare-unverified-outcomes/index.js';\n\nexport function orderModuleCollection(\n input: TUnorderedModuleCollection\n): TModuleCollection {\n const recordEntries: [string, TModuleRecord][] = [];\n input.records.forEach((record, key) => {\n recordEntries.push([key, record]);\n });\n recordEntries.sort((left, right) => compareOrdinal(left[0], right[0]));\n\n const resolutionEntries: [string, readonly TImportResolution[]][] = [];\n input.resolutions.forEach((resolution, key) => {\n resolutionEntries.push([key, resolution]);\n });\n resolutionEntries.sort((left, right) => compareOrdinal(left[0], right[0]));\n\n const unverifiedOutcomes = [];\n for (const outcome of input.unverifiedOutcomes) {\n unverifiedOutcomes.push(outcome);\n }\n unverifiedOutcomes.sort(compareUnverifiedOutcomes);\n\n return {\n records: new Map(recordEntries),\n resolutions: new Map(resolutionEntries),\n unverifiedOutcomes,\n };\n}\n","import nodePathPosix from 'node:path/posix';\n\nimport type { TModuleRecordProducer } from '../../../../../../_session@shared/_types/module-record.type.js';\n\nimport { extractScriptModuleRecord } from './_utils/extract-script-module-record/index.js';\nimport { produceBinaryModuleRecord } from './_utils/produce-binary-module-record/index.js';\nimport { produceStyleModuleRecord } from './_utils/produce-style-module-record/index.js';\nimport {\n SCRIPT_EXTENSIONS,\n STYLE_EXTENSIONS,\n} from './produce-module-record-by-extension.constant.js';\n\nexport const produceModuleRecordByExtension: TModuleRecordProducer = (\n path,\n text\n) => {\n const extension = nodePathPosix.extname(path);\n if (SCRIPT_EXTENSIONS.some((candidate) => candidate === extension)) {\n return extractScriptModuleRecord(path, text);\n }\n if (STYLE_EXTENSIONS.some((candidate) => candidate === extension)) {\n return produceStyleModuleRecord(path, text);\n }\n return produceBinaryModuleRecord(path, text);\n};\n","import { parseSync } from 'oxc-parser';\n\nimport type {\n TModuleImport,\n TModuleRecord,\n TUnsupportedSyntax,\n} from '../../../../../../../../_session@shared/_types/module-record.type.js';\n\nimport { createSourceLocator } from './_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport { extractModuleExports } from './_utils/extract-module-exports/index.js';\nimport { extractParseErrors } from './_utils/extract-parse-errors/index.js';\nimport { extractRootSymbols } from './_utils/extract-root-symbols/index.js';\nimport { extractStaticImports } from './_utils/extract-static-imports/index.js';\nimport { extractTraversalEntries } from './_utils/extract-traversal-entries/index.js';\nimport { sortByPosition } from './_utils/sort-by-position/index.js';\n\nexport function extractScriptModuleRecord(\n path: string,\n text: string\n): TModuleRecord {\n const lang = path.includes('.') ? undefined : 'ts';\n const parseResult = parseSync(path, text, {\n lang,\n sourceType: 'module',\n });\n const locator = createSourceLocator(text);\n\n const parseErrors = extractParseErrors(parseResult.errors, locator);\n\n const { bindingMap, staticImports } = extractStaticImports(\n parseResult.program.body,\n locator\n );\n\n const importedNames = new Set(bindingMap.keys());\n const symbols = extractRootSymbols(\n parseResult.program.body,\n locator,\n importedNames\n );\n\n const exports = extractModuleExports(\n parseResult.program.body,\n symbols,\n bindingMap,\n locator\n );\n\n const traversal = extractTraversalEntries(parseResult.program, locator);\n\n const allImports: readonly TModuleImport[] = sortByPosition([\n ...staticImports,\n ...traversal.inlineImports,\n ]);\n\n const allUnsupported: readonly TUnsupportedSyntax[] = sortByPosition([\n ...parseErrors,\n ...traversal.unsupportedSyntaxes,\n ]);\n\n return {\n exports: sortByPosition(exports),\n imports: allImports,\n language: 'script',\n symbols: sortByPosition(symbols),\n unsupportedSyntaxes: allUnsupported,\n };\n}\n","export const NEWLINE_CODE_POINT = 10;\n","import type { TSourceLocation } from '../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TSourceLocator } from './create-source-locator.type.js';\n\nimport { NEWLINE_CODE_POINT } from './create-source-locator.constant.js';\n\nexport function createSourceLocator(text: string): TSourceLocator {\n const lineStarts: number[] = [0];\n const length = text.length;\n\n for (let index = 0; index < length; index += 1) {\n if (text.codePointAt(index) === NEWLINE_CODE_POINT) {\n lineStarts.push(index + 1);\n }\n }\n\n const getLineStart = (index: number): number => lineStarts[index] ?? 0;\n\n return (offset: number): TSourceLocation => {\n let low = 0;\n let high = lineStarts.length - 1;\n\n while (low <= high) {\n const mid = (low + high) >> 1;\n const start = getLineStart(mid);\n if (start <= offset) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n\n const lineIndex = low - 1;\n const lineStart = getLineStart(lineIndex);\n const line = Math.max(1, lineIndex + 1);\n const column = Math.max(1, offset - lineStart + 1);\n\n return { column, line };\n };\n}\n","export const DEFAULT_NAME = 'default';\nexport const IMPORTED_BINDING_ORIGIN = 'imported-binding' as const;\nexport const LOCAL_SYMBOL_ORIGIN = 'local-symbol' as const;\nexport const NAMESPACE_ORIGIN = 'namespace' as const;\n","import type { ExportSpecifier } from 'oxc-parser';\n\nexport function getExportedName(node: ExportSpecifier['exported']): string {\n return node.type === 'Literal' ? node.value : node.name;\n}\n","import type { ExportAllDeclaration } from 'oxc-parser';\n\nimport type { TModuleExport } from '../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { NAMESPACE_ORIGIN } from '../../_extract-module-exports@shared/_constants/module-exports.constant.js';\nimport { getExportedName } from '../../_extract-module-exports@shared/_utils/get-exported-name/index.js';\n\nexport function extractAllExport(\n statement: ExportAllDeclaration,\n locator: TSourceLocator\n): TModuleExport {\n const isTypeOnly = statement.exportKind === 'type';\n const position = locator(statement.start);\n const specifier = statement.source.value;\n\n if (statement.exported !== null) {\n const exportedName = getExportedName(statement.exported);\n return {\n exportedName,\n isTypeOnly,\n origin: { specifier, type: NAMESPACE_ORIGIN },\n position,\n };\n }\n\n return {\n exportedName: '*',\n isTypeOnly,\n origin: { specifier, type: 'export-all' },\n position,\n };\n}\n","import type { Class, TSEnumDeclaration } from 'oxc-parser';\n\nimport type { TModuleExport } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport {\n DEFAULT_NAME,\n LOCAL_SYMBOL_ORIGIN,\n} from '../../../../_extract-module-exports@shared/_constants/module-exports.constant.js';\n\nexport function extractClassExports(\n declaration: Class | TSEnumDeclaration,\n locator: TSourceLocator,\n exports: TModuleExport[],\n seenExportNames: Set<string>\n): void {\n const name = declaration.id?.name ?? DEFAULT_NAME;\n seenExportNames.add(name);\n exports.push({\n exportedName: name,\n isTypeOnly: false,\n origin: { symbolName: name, type: LOCAL_SYMBOL_ORIGIN },\n position: locator(declaration.start),\n });\n}\n","import type { TModuleExport } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TFunctionDeclaration } from './extract-function-exports.type.js';\n\nimport {\n DEFAULT_NAME,\n LOCAL_SYMBOL_ORIGIN,\n} from '../../../../_extract-module-exports@shared/_constants/module-exports.constant.js';\n\nexport function extractFunctionExports(\n declaration: TFunctionDeclaration,\n locator: TSourceLocator,\n exports: TModuleExport[],\n seenExportNames: Set<string>\n): void {\n const name = declaration.id?.name ?? DEFAULT_NAME;\n if (seenExportNames.has(name)) {\n return;\n }\n seenExportNames.add(name);\n exports.push({\n exportedName: name,\n isTypeOnly: false,\n origin: { symbolName: name, type: LOCAL_SYMBOL_ORIGIN },\n position: locator(declaration.start),\n });\n}\n","import type { TSGlobalDeclaration, TSModuleDeclaration } from 'oxc-parser';\n\nimport type { TModuleExport } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { LOCAL_SYMBOL_ORIGIN } from '../../../../_extract-module-exports@shared/_constants/module-exports.constant.js';\n\nexport function extractNamespaceExports(\n declaration: TSGlobalDeclaration | TSModuleDeclaration,\n locator: TSourceLocator,\n exports: TModuleExport[],\n seenExportNames: Set<string>\n): void {\n if (\n declaration.kind !== 'namespace' ||\n declaration.id.type !== 'Identifier'\n ) {\n return;\n }\n seenExportNames.add(declaration.id.name);\n exports.push({\n exportedName: declaration.id.name,\n isTypeOnly: false,\n origin: { symbolName: declaration.id.name, type: LOCAL_SYMBOL_ORIGIN },\n position: locator(declaration.id.start),\n });\n}\n","import type {\n TSInterfaceDeclaration,\n TSTypeAliasDeclaration,\n} from 'oxc-parser';\n\nimport type { TModuleExport } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { LOCAL_SYMBOL_ORIGIN } from '../../../../_extract-module-exports@shared/_constants/module-exports.constant.js';\n\nexport function extractTypeExports(\n declaration: TSInterfaceDeclaration | TSTypeAliasDeclaration,\n locator: TSourceLocator,\n exports: TModuleExport[],\n seenExportNames: Set<string>\n): void {\n seenExportNames.add(declaration.id.name);\n exports.push({\n exportedName: declaration.id.name,\n isTypeOnly: true,\n origin: { symbolName: declaration.id.name, type: LOCAL_SYMBOL_ORIGIN },\n position: locator(declaration.id.start),\n });\n}\n","import type { BindingPattern, BindingRestElement } from 'oxc-parser';\n\nimport type { TPatternIdentifier } from './collect-pattern-identifiers.type.js';\n\nexport function collectPatternIdentifiers(\n pattern: BindingPattern | BindingRestElement,\n results: TPatternIdentifier[]\n): void {\n switch (pattern.type) {\n case 'ArrayPattern': {\n for (const element of pattern.elements) {\n if (element !== null) {\n collectPatternIdentifiers(element, results);\n }\n }\n return;\n }\n case 'AssignmentPattern': {\n collectPatternIdentifiers(pattern.left, results);\n return;\n }\n case 'Identifier': {\n results.push({ name: pattern.name, start: pattern.start });\n return;\n }\n case 'ObjectPattern': {\n for (const property of pattern.properties) {\n const next =\n property.type === 'Property' ? property.value : property.argument;\n collectPatternIdentifiers(next, results);\n }\n return;\n }\n case 'RestElement': {\n collectPatternIdentifiers(pattern.argument, results);\n return;\n }\n }\n}\n","import type { VariableDeclaration } from 'oxc-parser';\n\nimport type { TModuleExport } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TPatternIdentifier } from './_utils/collect-pattern-identifiers/index.js';\n\nimport { LOCAL_SYMBOL_ORIGIN } from '../../../../_extract-module-exports@shared/_constants/module-exports.constant.js';\nimport { collectPatternIdentifiers } from './_utils/collect-pattern-identifiers/index.js';\n\nexport function extractVariableExports(\n declaration: VariableDeclaration,\n locator: TSourceLocator,\n exports: TModuleExport[],\n seenExportNames: Set<string>\n): void {\n const identifiers: TPatternIdentifier[] = [];\n for (const declarator of declaration.declarations) {\n collectPatternIdentifiers(declarator.id, identifiers);\n }\n for (const item of identifiers) {\n seenExportNames.add(item.name);\n exports.push({\n exportedName: item.name,\n isTypeOnly: false,\n origin: { symbolName: item.name, type: LOCAL_SYMBOL_ORIGIN },\n position: locator(item.start),\n });\n }\n}\n","import type { Statement } from 'oxc-parser';\n\nimport type { TModuleExport } from '../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { extractClassExports } from './_utils/extract-class-exports/index.js';\nimport { extractFunctionExports } from './_utils/extract-function-exports/index.js';\nimport { extractNamespaceExports } from './_utils/extract-namespace-exports/index.js';\nimport { extractTypeExports } from './_utils/extract-type-exports/index.js';\nimport { extractVariableExports } from './_utils/extract-variable-exports/index.js';\n\nexport function extractDeclarationExports(\n declaration: Statement,\n locator: TSourceLocator,\n exports: TModuleExport[],\n seenExportNames: Set<string>\n): void {\n if (declaration.type === 'VariableDeclaration') {\n extractVariableExports(declaration, locator, exports, seenExportNames);\n return;\n }\n\n if (\n declaration.type === 'TSInterfaceDeclaration' ||\n declaration.type === 'TSTypeAliasDeclaration'\n ) {\n extractTypeExports(declaration, locator, exports, seenExportNames);\n return;\n }\n\n if (\n declaration.type === 'FunctionDeclaration' ||\n declaration.type === 'TSDeclareFunction'\n ) {\n extractFunctionExports(declaration, locator, exports, seenExportNames);\n return;\n }\n\n if (\n declaration.type === 'ClassDeclaration' ||\n declaration.type === 'TSEnumDeclaration'\n ) {\n extractClassExports(declaration, locator, exports, seenExportNames);\n return;\n }\n\n if (declaration.type === 'TSModuleDeclaration') {\n extractNamespaceExports(declaration, locator, exports, seenExportNames);\n }\n}\n","import type { TRootSymbol } from '../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\n\nexport function isAllTypeSpace(\n name: string,\n rootSymbols: readonly TRootSymbol[]\n): boolean {\n const matching = rootSymbols.filter((symbol) => symbol.name === name);\n return (\n matching.length > 0 && matching.every((symbol) => symbol.space === 'type')\n );\n}\n","import type { ExportDefaultDeclaration } from 'oxc-parser';\n\nimport type {\n TModuleExport,\n TRootSymbol,\n} from '../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TImportedBinding } from '../../../../_extract-script-module-record@shared/_types/imported-binding.type.js';\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport {\n DEFAULT_NAME,\n IMPORTED_BINDING_ORIGIN,\n LOCAL_SYMBOL_ORIGIN,\n NAMESPACE_ORIGIN,\n} from '../../_extract-module-exports@shared/_constants/module-exports.constant.js';\nimport { isAllTypeSpace } from '../../_extract-module-exports@shared/_utils/is-all-type-space/index.js';\n\nexport function extractDefaultExport(\n statement: ExportDefaultDeclaration,\n rootSymbols: readonly TRootSymbol[],\n importedBindings: ReadonlyMap<string, TImportedBinding>,\n locator: TSourceLocator\n): TModuleExport {\n const declaration = statement.declaration;\n const position = locator(statement.start);\n\n if (declaration.type === 'ClassDeclaration') {\n const symbolName = declaration.id?.name ?? DEFAULT_NAME;\n return {\n exportedName: DEFAULT_NAME,\n isTypeOnly: false,\n origin: { symbolName, type: LOCAL_SYMBOL_ORIGIN },\n position,\n };\n }\n\n if (declaration.type === 'FunctionDeclaration') {\n const symbolName = declaration.id?.name ?? DEFAULT_NAME;\n return {\n exportedName: DEFAULT_NAME,\n isTypeOnly: false,\n origin: { symbolName, type: LOCAL_SYMBOL_ORIGIN },\n position,\n };\n }\n\n if (declaration.type === 'Identifier') {\n const name = declaration.name;\n const binding = importedBindings.get(name);\n if (binding !== undefined) {\n if (binding.isNamespace) {\n return {\n exportedName: DEFAULT_NAME,\n isTypeOnly: binding.isTypeOnly,\n origin: { specifier: binding.specifier, type: NAMESPACE_ORIGIN },\n position,\n };\n }\n return {\n exportedName: DEFAULT_NAME,\n isTypeOnly: binding.isTypeOnly,\n origin: {\n importedName: binding.importedName,\n specifier: binding.specifier,\n type: IMPORTED_BINDING_ORIGIN,\n },\n position,\n };\n }\n const isTypeOnly = isAllTypeSpace(name, rootSymbols);\n return {\n exportedName: DEFAULT_NAME,\n isTypeOnly,\n origin: { symbolName: name, type: LOCAL_SYMBOL_ORIGIN },\n position,\n };\n }\n\n return {\n exportedName: DEFAULT_NAME,\n isTypeOnly: false,\n origin: { symbolName: DEFAULT_NAME, type: LOCAL_SYMBOL_ORIGIN },\n position,\n };\n}\n","import type { ExportNamedDeclaration } from 'oxc-parser';\n\nimport type {\n TModuleExport,\n TRootSymbol,\n} from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TImportedBinding } from '../../../../../../_extract-script-module-record@shared/_types/imported-binding.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport {\n IMPORTED_BINDING_ORIGIN,\n LOCAL_SYMBOL_ORIGIN,\n NAMESPACE_ORIGIN,\n} from '../../../../_extract-module-exports@shared/_constants/module-exports.constant.js';\nimport { getExportedName } from '../../../../_extract-module-exports@shared/_utils/get-exported-name/index.js';\nimport { isAllTypeSpace } from '../../../../_extract-module-exports@shared/_utils/is-all-type-space/index.js';\n\nexport function extractLocalSpecifiers(\n statement: ExportNamedDeclaration,\n rootSymbols: readonly TRootSymbol[],\n importedBindings: ReadonlyMap<string, TImportedBinding>,\n locator: TSourceLocator,\n exports: TModuleExport[]\n): void {\n const isDeclarationTypeOnly = statement.exportKind === 'type';\n\n for (const specifier of statement.specifiers) {\n const exportedName = getExportedName(specifier.exported);\n const localName = getExportedName(specifier.local);\n const position = locator(specifier.start);\n const binding = importedBindings.get(localName);\n\n if (binding === undefined) {\n const isTypeOnly =\n isDeclarationTypeOnly ||\n specifier.exportKind === 'type' ||\n isAllTypeSpace(localName, rootSymbols);\n\n exports.push({\n exportedName,\n isTypeOnly,\n origin: { symbolName: localName, type: LOCAL_SYMBOL_ORIGIN },\n position,\n });\n } else {\n const isTypeOnly =\n isDeclarationTypeOnly ||\n specifier.exportKind === 'type' ||\n binding.isTypeOnly;\n\n const origin = binding.isNamespace\n ? { specifier: binding.specifier, type: NAMESPACE_ORIGIN }\n : {\n importedName: binding.importedName,\n specifier: binding.specifier,\n type: IMPORTED_BINDING_ORIGIN,\n };\n\n exports.push({ exportedName, isTypeOnly, origin, position });\n }\n }\n}\n","import type { ExportNamedDeclaration } from 'oxc-parser';\n\nimport type { TModuleExport } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { IMPORTED_BINDING_ORIGIN } from '../../../../_extract-module-exports@shared/_constants/module-exports.constant.js';\nimport { getExportedName } from '../../../../_extract-module-exports@shared/_utils/get-exported-name/index.js';\n\nexport function extractReExportSpecifiers(\n statement: ExportNamedDeclaration,\n locator: TSourceLocator,\n exports: TModuleExport[]\n): void {\n if (statement.source === null) {\n return;\n }\n const sourceSpecifier = statement.source.value;\n const isDeclarationTypeOnly = statement.exportKind === 'type';\n for (const specifier of statement.specifiers) {\n const exportedName = getExportedName(specifier.exported);\n const importedName = getExportedName(specifier.local);\n const isTypeOnly = isDeclarationTypeOnly || specifier.exportKind === 'type';\n exports.push({\n exportedName,\n isTypeOnly,\n origin: {\n importedName,\n specifier: sourceSpecifier,\n type: IMPORTED_BINDING_ORIGIN,\n },\n position: locator(specifier.start),\n });\n }\n}\n","import type { ExportNamedDeclaration } from 'oxc-parser';\n\nimport type {\n TModuleExport,\n TRootSymbol,\n} from '../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TImportedBinding } from '../../../../_extract-script-module-record@shared/_types/imported-binding.type.js';\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { extractLocalSpecifiers } from './_utils/extract-local-specifiers/index.js';\nimport { extractReExportSpecifiers } from './_utils/extract-re-export-specifiers/index.js';\n\nexport function extractNamedSpecifiersExports(\n statement: ExportNamedDeclaration,\n rootSymbols: readonly TRootSymbol[],\n importedBindings: ReadonlyMap<string, TImportedBinding>,\n locator: TSourceLocator,\n exports: TModuleExport[]\n): void {\n if (statement.source !== null) {\n extractReExportSpecifiers(statement, locator, exports);\n return;\n }\n\n extractLocalSpecifiers(\n statement,\n rootSymbols,\n importedBindings,\n locator,\n exports\n );\n}\n","import type { Statement } from 'oxc-parser';\n\nimport type {\n TModuleExport,\n TRootSymbol,\n} from '../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TImportedBinding } from '../../_extract-script-module-record@shared/_types/imported-binding.type.js';\nimport type { TSourceLocator } from '../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { extractAllExport } from './_utils/extract-all-export/index.js';\nimport { extractDeclarationExports } from './_utils/extract-declaration-exports/index.js';\nimport { extractDefaultExport } from './_utils/extract-default-export/index.js';\nimport { extractNamedSpecifiersExports } from './_utils/extract-named-specifiers-exports/index.js';\n\nexport function extractModuleExports(\n body: readonly Statement[],\n rootSymbols: readonly TRootSymbol[],\n importedBindings: ReadonlyMap<string, TImportedBinding>,\n locator: TSourceLocator\n): readonly TModuleExport[] {\n const exports: TModuleExport[] = [];\n const seenExportNames = new Set<string>();\n\n const processStatement = (statement: Statement): void => {\n if (statement.type === 'ExportNamedDeclaration') {\n if (statement.declaration === null) {\n extractNamedSpecifiersExports(\n statement,\n rootSymbols,\n importedBindings,\n locator,\n exports\n );\n } else {\n extractDeclarationExports(\n statement.declaration,\n locator,\n exports,\n seenExportNames\n );\n }\n return;\n }\n\n if (statement.type === 'ExportAllDeclaration') {\n exports.push(extractAllExport(statement, locator));\n return;\n }\n\n if (statement.type === 'ExportDefaultDeclaration') {\n exports.push(\n extractDefaultExport(statement, rootSymbols, importedBindings, locator)\n );\n }\n };\n\n for (const statement of body) {\n processStatement(statement);\n }\n\n return exports;\n}\n","import type { OxcError } from 'oxc-parser';\n\nimport type { TUnsupportedSyntax } from '../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nexport function extractParseErrors(\n errors: readonly OxcError[],\n locator: TSourceLocator\n): readonly TUnsupportedSyntax[] {\n return errors.map((error) => {\n const firstLabel = error.labels[0];\n const start = firstLabel === undefined ? 0 : firstLabel.start;\n return {\n description: error.message,\n position: locator(start),\n };\n });\n}\n","import type { Class, TSEnumDeclaration } from 'oxc-parser';\n\nimport type { TRootSymbol } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nexport function collectClassOrEnumSymbols(\n statement: Class | TSEnumDeclaration,\n locator: TSourceLocator,\n symbols: TRootSymbol[]\n): void {\n if (statement.id === null) {\n symbols.push({\n name: 'default',\n position: locator(statement.start),\n space: 'value',\n });\n return;\n }\n symbols.push({\n name: statement.id.name,\n position: locator(statement.id.start),\n space: 'value',\n });\n}\n","import type { TRootSymbol } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TFunctionDeclaration } from './collect-function-symbols.type.js';\n\nexport function collectFunctionSymbols(\n statement: TFunctionDeclaration,\n locator: TSourceLocator,\n symbols: TRootSymbol[],\n seenFunctions: Set<string>\n): void {\n if (statement.id === null) {\n symbols.push({\n name: 'default',\n position: locator(statement.start),\n space: 'value',\n });\n return;\n }\n const name = statement.id.name;\n if (seenFunctions.has(name)) {\n return;\n }\n seenFunctions.add(name);\n symbols.push({\n name,\n position: locator(statement.id.start),\n space: 'value',\n });\n}\n","import type { Statement, TSModuleDeclaration } from 'oxc-parser';\n\nexport function hasValueDeclaration(\n body: TSModuleDeclaration['body']\n): boolean {\n if (body === null) {\n return false;\n }\n\n const isValueStatement = (statement: Statement): boolean => {\n const target =\n statement.type === 'ExportNamedDeclaration' &&\n statement.declaration !== null\n ? statement.declaration\n : statement;\n\n if (\n target.type === 'ClassDeclaration' ||\n target.type === 'FunctionDeclaration' ||\n target.type === 'TSEnumDeclaration' ||\n target.type === 'VariableDeclaration'\n ) {\n return true;\n }\n if (target.type === 'TSModuleDeclaration') {\n return hasValueDeclaration(target.body);\n }\n return false;\n };\n\n return body.body.some((statement) => isValueStatement(statement));\n}\n","import type { TSGlobalDeclaration, TSModuleDeclaration } from 'oxc-parser';\n\nimport type { TRootSymbol } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { hasValueDeclaration } from './_utils/has-value-declaration/index.js';\n\nexport function collectNamespaceSymbols(\n statement: TSGlobalDeclaration | TSModuleDeclaration,\n locator: TSourceLocator,\n symbols: TRootSymbol[]\n): void {\n if (statement.kind !== 'namespace' || statement.id.type !== 'Identifier') {\n return;\n }\n const space = hasValueDeclaration(statement.body) ? 'value' : 'type';\n symbols.push({\n name: statement.id.name,\n position: locator(statement.id.start),\n space,\n });\n}\n","import type {\n TSInterfaceDeclaration,\n TSTypeAliasDeclaration,\n} from 'oxc-parser';\n\nimport type { TRootSymbol } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nexport function collectTypeSymbols(\n statement: TSInterfaceDeclaration | TSTypeAliasDeclaration,\n locator: TSourceLocator,\n symbols: TRootSymbol[]\n): void {\n symbols.push({\n name: statement.id.name,\n position: locator(statement.id.start),\n space: 'type',\n });\n}\n","import type { BindingPattern, BindingRestElement } from 'oxc-parser';\n\nimport type { TRootSymbol } from '../../../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nexport function collectPatternBindings(\n pattern: BindingPattern | BindingRestElement,\n locator: TSourceLocator,\n symbols: TRootSymbol[]\n): void {\n switch (pattern.type) {\n case 'ArrayPattern': {\n for (const element of pattern.elements) {\n if (element !== null) {\n collectPatternBindings(element, locator, symbols);\n }\n }\n return;\n }\n case 'AssignmentPattern': {\n collectPatternBindings(pattern.left, locator, symbols);\n return;\n }\n case 'Identifier': {\n symbols.push({\n name: pattern.name,\n position: locator(pattern.start),\n space: 'value',\n });\n return;\n }\n case 'ObjectPattern': {\n for (const property of pattern.properties) {\n const next =\n property.type === 'Property' ? property.value : property.argument;\n collectPatternBindings(next, locator, symbols);\n }\n return;\n }\n case 'RestElement': {\n collectPatternBindings(pattern.argument, locator, symbols);\n return;\n }\n }\n}\n","import type { VariableDeclaration } from 'oxc-parser';\n\nimport type { TRootSymbol } from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { collectPatternBindings } from './_utils/collect-pattern-bindings/index.js';\n\nexport function collectVariableSymbols(\n statement: VariableDeclaration,\n locator: TSourceLocator,\n symbols: TRootSymbol[]\n): void {\n for (const declarator of statement.declarations) {\n collectPatternBindings(declarator.id, locator, symbols);\n }\n}\n","import type { Statement } from 'oxc-parser';\n\nimport type { TRootSymbol } from '../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { collectClassOrEnumSymbols } from './_utils/collect-class-or-enum-symbols/index.js';\nimport { collectFunctionSymbols } from './_utils/collect-function-symbols/index.js';\nimport { collectNamespaceSymbols } from './_utils/collect-namespace-symbols/index.js';\nimport { collectTypeSymbols } from './_utils/collect-type-symbols/index.js';\nimport { collectVariableSymbols } from './_utils/collect-variable-symbols/index.js';\n\nexport function collectStatementSymbols(\n target: Statement,\n locator: TSourceLocator,\n symbols: TRootSymbol[],\n seenFunctions: Set<string>\n): void {\n if (target.type === 'VariableDeclaration') {\n collectVariableSymbols(target, locator, symbols);\n return;\n }\n if (target.type === 'TSModuleDeclaration') {\n collectNamespaceSymbols(target, locator, symbols);\n return;\n }\n if (\n target.type === 'FunctionDeclaration' ||\n target.type === 'TSDeclareFunction'\n ) {\n collectFunctionSymbols(target, locator, symbols, seenFunctions);\n return;\n }\n if (\n target.type === 'ClassDeclaration' ||\n target.type === 'TSEnumDeclaration'\n ) {\n collectClassOrEnumSymbols(target, locator, symbols);\n return;\n }\n if (\n target.type === 'TSInterfaceDeclaration' ||\n target.type === 'TSTypeAliasDeclaration'\n ) {\n collectTypeSymbols(target, locator, symbols);\n }\n}\n","import type { ExportDefaultDeclaration } from 'oxc-parser';\n\nimport type { TRootSymbol } from '../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nexport function extractDefaultDeclaration(\n statement: ExportDefaultDeclaration,\n locator: TSourceLocator,\n symbols: TRootSymbol[],\n seenFunctions: Set<string>,\n importedNames: ReadonlySet<string>\n): void {\n const declaration = statement.declaration;\n if (declaration.type === 'ClassDeclaration') {\n const name = declaration.id?.name ?? 'default';\n symbols.push({\n name,\n position: locator(statement.start),\n space: 'value',\n });\n return;\n }\n if (declaration.type === 'FunctionDeclaration') {\n if (declaration.id === null) {\n symbols.push({\n name: 'default',\n position: locator(statement.start),\n space: 'value',\n });\n return;\n }\n const name = declaration.id.name;\n if (seenFunctions.has(name)) {\n return;\n }\n seenFunctions.add(name);\n symbols.push({\n name,\n position: locator(declaration.id.start),\n space: 'value',\n });\n return;\n }\n if (declaration.type === 'Identifier') {\n const name = declaration.name;\n const isKnown =\n symbols.some((symbol) => symbol.name === name) || importedNames.has(name);\n if (!isKnown) {\n symbols.push({\n name: 'default',\n position: locator(declaration.start),\n space: 'value',\n });\n }\n return;\n }\n symbols.push({\n name: 'default',\n position: locator(declaration.start),\n space: 'value',\n });\n}\n","import type { Statement } from 'oxc-parser';\n\nimport type { TRootSymbol } from '../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nimport { collectStatementSymbols } from './_utils/collect-statement-symbols/index.js';\nimport { extractDefaultDeclaration } from './_utils/extract-default-declaration/index.js';\n\nexport function extractRootSymbols(\n body: readonly Statement[],\n locator: TSourceLocator,\n importedNames: ReadonlySet<string>\n): readonly TRootSymbol[] {\n const symbols: TRootSymbol[] = [];\n const seenFunctions = new Set<string>();\n\n for (const statement of body) {\n if (statement.type === 'ExportDefaultDeclaration') {\n continue;\n }\n\n const target =\n statement.type === 'ExportNamedDeclaration' &&\n statement.declaration !== null\n ? statement.declaration\n : statement;\n\n collectStatementSymbols(target, locator, symbols, seenFunctions);\n }\n\n for (const statement of body) {\n if (statement.type !== 'ExportDefaultDeclaration') {\n continue;\n }\n extractDefaultDeclaration(\n statement,\n locator,\n symbols,\n seenFunctions,\n importedNames\n );\n }\n\n return symbols;\n}\n","import type { TSImportEqualsDeclaration } from 'oxc-parser';\n\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TExtractedImportEquals } from './extract-import-equals.type.js';\n\nexport function extractImportEquals(\n statement: TSImportEqualsDeclaration,\n locator: TSourceLocator\n): null | TExtractedImportEquals {\n if (statement.moduleReference.type !== 'TSExternalModuleReference') {\n return null;\n }\n\n const specifier = statement.moduleReference.expression.value;\n const isTypeOnly = statement.importKind === 'type';\n\n return {\n binding: {\n importedName: 'default',\n isNamespace: false,\n isTypeOnly,\n localName: statement.id.name,\n specifier,\n },\n staticImport: {\n isTypeOnly,\n kind: 'typescript-require-import',\n position: locator(statement.start),\n specifier,\n },\n };\n}\n","import type { ExportAllDeclaration, ExportNamedDeclaration } from 'oxc-parser';\n\nimport type { TModuleImport } from '../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\n\nexport function extractStaticExport(\n statement: ExportAllDeclaration | ExportNamedDeclaration,\n locator: TSourceLocator\n): null | TModuleImport {\n if (statement.type === 'ExportAllDeclaration') {\n const isTypeOnly = statement.exportKind === 'type';\n const kind = isTypeOnly ? 'export-type-from' : 'export-all-from';\n return {\n isTypeOnly,\n kind,\n position: locator(statement.start),\n specifier: statement.source.value,\n };\n }\n\n if (statement.source === null) {\n return null;\n }\n\n const isTypeOnly =\n statement.exportKind === 'type' ||\n (statement.specifiers.length > 0 &&\n statement.specifiers.every(\n (specifierItem) => specifierItem.exportKind === 'type'\n ));\n const kind = isTypeOnly ? 'export-type-from' : 'export-named-from';\n\n return {\n isTypeOnly,\n kind,\n position: locator(statement.start),\n specifier: statement.source.value,\n };\n}\n","import type { ImportDeclaration } from 'oxc-parser';\n\nimport type { TImportedBinding } from '../../../../_extract-script-module-record@shared/_types/imported-binding.type.js';\n\nexport function registerImportBindings(\n statement: ImportDeclaration,\n specifier: string,\n bindingMap: Map<string, TImportedBinding>\n): void {\n const isStatementType = statement.importKind === 'type';\n const registerSpecifier = (\n item: ImportDeclaration['specifiers'][number]\n ): void => {\n switch (item.type) {\n case 'ImportDefaultSpecifier': {\n bindingMap.set(item.local.name, {\n importedName: 'default',\n isNamespace: false,\n isTypeOnly: isStatementType,\n localName: item.local.name,\n specifier,\n });\n return;\n }\n case 'ImportNamespaceSpecifier': {\n bindingMap.set(item.local.name, {\n importedName: '*',\n isNamespace: true,\n isTypeOnly: isStatementType,\n localName: item.local.name,\n specifier,\n });\n return;\n }\n case 'ImportSpecifier': {\n const importedName =\n item.imported.type === 'Literal'\n ? item.imported.value\n : item.imported.name;\n const isType = isStatementType || item.importKind === 'type';\n bindingMap.set(item.local.name, {\n importedName,\n isNamespace: false,\n isTypeOnly: isType,\n localName: item.local.name,\n specifier,\n });\n return;\n }\n }\n };\n\n for (const item of statement.specifiers) {\n registerSpecifier(item);\n }\n}\n","import type { ImportDeclaration } from 'oxc-parser';\n\nimport type { TResolvedImportKind } from './resolve-import-kind.type.js';\n\nexport function resolveImportKind(\n statement: ImportDeclaration\n): TResolvedImportKind {\n if (statement.importKind === 'type') {\n return { isTypeOnly: true, kind: 'type-only-import' };\n }\n\n const specifiers = statement.specifiers;\n if (specifiers.length === 0) {\n return { isTypeOnly: false, kind: 'side-effect-import' };\n }\n\n const hasTypeSpecifier = specifiers.some(\n (specifier) =>\n specifier.type === 'ImportSpecifier' && specifier.importKind === 'type'\n );\n\n if (hasTypeSpecifier) {\n const hasValueBinding = specifiers.some(\n (specifier) =>\n specifier.type !== 'ImportSpecifier' || specifier.importKind !== 'type'\n );\n return {\n isTypeOnly: !hasValueBinding,\n kind: 'mixed-type-specifier-import',\n };\n }\n\n if (\n specifiers.length === 1 &&\n specifiers[0]?.type === 'ImportDefaultSpecifier'\n ) {\n return { isTypeOnly: false, kind: 'default-import' };\n }\n\n if (\n specifiers.length === 1 &&\n specifiers[0]?.type === 'ImportNamespaceSpecifier'\n ) {\n return { isTypeOnly: false, kind: 'namespace-import' };\n }\n\n return { isTypeOnly: false, kind: 'named-import' };\n}\n","import type { Statement } from 'oxc-parser';\n\nimport type { TModuleImport } from '../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TImportedBinding } from '../../_extract-script-module-record@shared/_types/imported-binding.type.js';\nimport type { TSourceLocator } from '../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TStaticImportsResult } from './extract-static-imports.type.js';\n\nimport { extractImportEquals } from './_utils/extract-import-equals/index.js';\nimport { extractStaticExport } from './_utils/extract-static-export/index.js';\nimport { registerImportBindings } from './_utils/register-import-bindings/index.js';\nimport { resolveImportKind } from './_utils/resolve-import-kind/index.js';\n\nexport function extractStaticImports(\n body: readonly Statement[],\n locator: TSourceLocator\n): TStaticImportsResult {\n const staticImports: TModuleImport[] = [];\n const bindingMap = new Map<string, TImportedBinding>();\n\n const processStatement = (statement: Statement): void => {\n if (statement.type === 'ImportDeclaration') {\n const specifier = statement.source.value;\n const { isTypeOnly, kind } = resolveImportKind(statement);\n staticImports.push({\n isTypeOnly,\n kind,\n position: locator(statement.start),\n specifier,\n });\n registerImportBindings(statement, specifier, bindingMap);\n return;\n }\n\n if (\n statement.type === 'ExportAllDeclaration' ||\n statement.type === 'ExportNamedDeclaration'\n ) {\n const exported = extractStaticExport(statement, locator);\n if (exported !== null) {\n staticImports.push(exported);\n }\n return;\n }\n\n if (statement.type !== 'TSImportEqualsDeclaration') {\n return;\n }\n\n const result = extractImportEquals(statement, locator);\n if (result === null) {\n return;\n }\n staticImports.push(result.staticImport);\n bindingMap.set(result.binding.localName, result.binding);\n };\n\n for (const statement of body) {\n processStatement(statement);\n }\n\n return { bindingMap, staticImports };\n}\n","export const BINDING_PATTERN_TYPES = new Set([\n 'ArrayPattern',\n 'AssignmentPattern',\n 'Identifier',\n 'ObjectPattern',\n 'RestElement',\n]);\n\nexport const FUNCTION_AST_TYPES = new Set([\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n]);\n\nexport const REQUIRE_NAME = 'require';\n\nexport const UNSUPPORTED_REQUIRE_MESSAGE =\n 'Unsupported non-literal require call';\n","import type { BindingPattern, BindingRestElement } from 'oxc-parser';\n\nimport { REQUIRE_NAME } from '../../../../../../_traverse-ast@shared/_constants/traversal-entries.constant.js';\n\nexport function doesPatternBindRequire(\n pattern: BindingPattern | BindingRestElement\n): boolean {\n let current: BindingPattern | BindingRestElement = pattern;\n while (\n current.type === 'AssignmentPattern' ||\n current.type === 'RestElement'\n ) {\n current =\n current.type === 'AssignmentPattern' ? current.left : current.argument;\n }\n\n if (current.type === 'Identifier') {\n return current.name === REQUIRE_NAME;\n }\n\n if (current.type === 'ArrayPattern') {\n return current.elements.some(\n (element) => element !== null && doesPatternBindRequire(element)\n );\n }\n\n return current.properties.some((property) => {\n const next =\n property.type === 'Property' ? property.value : property.argument;\n return doesPatternBindRequire(next);\n });\n}\n","import type { Statement } from 'oxc-parser';\n\nimport { REQUIRE_NAME } from '../../../../../../../../_traverse-ast@shared/_constants/traversal-entries.constant.js';\n\nexport function doesTargetDeclareRequire(statement: Statement): boolean {\n if (statement.type === 'TSModuleDeclaration') {\n return 'name' in statement.id && statement.id.name === REQUIRE_NAME;\n }\n if (\n statement.type === 'ClassDeclaration' ||\n statement.type === 'FunctionDeclaration' ||\n statement.type === 'TSEnumDeclaration'\n ) {\n return statement.id?.name === REQUIRE_NAME;\n }\n return false;\n}\n","import type { Statement } from 'oxc-parser';\n\nimport { REQUIRE_NAME } from '../../../../../../_traverse-ast@shared/_constants/traversal-entries.constant.js';\nimport { doesPatternBindRequire } from '../../_primitives/does-pattern-bind-require/index.js';\nimport { doesTargetDeclareRequire } from './_utils/does-target-declare-require/index.js';\n\nexport function doesStatementDeclareRequire(statement: Statement): boolean {\n if (statement.type === 'ExportNamedDeclaration') {\n return (\n statement.declaration !== null &&\n doesStatementDeclareRequire(statement.declaration)\n );\n }\n if (statement.type === 'VariableDeclaration') {\n return statement.declarations.some((declarator) =>\n doesPatternBindRequire(declarator.id)\n );\n }\n if (statement.type === 'ImportDeclaration') {\n return statement.specifiers.some(\n (specifier) => specifier.local.name === REQUIRE_NAME\n );\n }\n if (statement.type === 'TSImportEqualsDeclaration') {\n return statement.id.name === REQUIRE_NAME;\n }\n return doesTargetDeclareRequire(statement);\n}\n","import type { TAstNode } from '../../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nexport function isAstNode(value: unknown): value is TAstNode {\n const isObject =\n typeof value === 'object' && value !== null && !Array.isArray(value);\n return isObject && 'type' in value && typeof value.type === 'string';\n}\n","import type { BindingPattern, BindingRestElement } from 'oxc-parser';\n\nimport { BINDING_PATTERN_TYPES } from '../../../../../../_traverse-ast@shared/_constants/traversal-entries.constant.js';\nimport { isAstNode } from '../../../../../../_traverse-ast@shared/_utils/is-ast-node/index.js';\n\nexport function isBindingPattern(\n value: unknown\n): value is BindingPattern | BindingRestElement {\n return isAstNode(value) && BINDING_PATTERN_TYPES.has(value.type);\n}\n","import type { Statement } from 'oxc-parser';\n\nimport { isAstNode } from '../../../../../../_traverse-ast@shared/_utils/is-ast-node/index.js';\n\nexport function isStatement(value: unknown): value is Statement {\n return isAstNode(value);\n}\n","import type { TAstNode } from '../../../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nimport { REQUIRE_NAME } from '../../../../_traverse-ast@shared/_constants/traversal-entries.constant.js';\nimport { isAstNode } from '../../../../_traverse-ast@shared/_utils/is-ast-node/index.js';\nimport { doesStatementDeclareRequire } from '../../_does-node-declare-require@shared/_utils/_compounds/does-statement-declare-require/index.js';\nimport { doesPatternBindRequire } from '../../_does-node-declare-require@shared/_utils/_primitives/does-pattern-bind-require/index.js';\nimport { isBindingPattern } from '../../_does-node-declare-require@shared/_utils/_primitives/is-binding-pattern/index.js';\nimport { isStatement } from '../../_does-node-declare-require@shared/_utils/_primitives/is-statement/index.js';\n\nexport function doesFunctionDeclareRequire(node: TAstNode): boolean {\n const id = node['id'];\n if (isAstNode(id) && id['name'] === REQUIRE_NAME) {\n return true;\n }\n const parameters = node['params'];\n if (\n Array.isArray(parameters) &&\n parameters.some(\n (parameter) =>\n isBindingPattern(parameter) && doesPatternBindRequire(parameter)\n )\n ) {\n return true;\n }\n const body = node['body'];\n if (isAstNode(body)) {\n const inner = body['body'];\n if (Array.isArray(inner)) {\n return inner\n .filter(isStatement)\n .some((statement) => doesStatementDeclareRequire(statement));\n }\n }\n return false;\n}\n","import type { TAstNode } from '../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nimport { FUNCTION_AST_TYPES } from '../../_traverse-ast@shared/_constants/traversal-entries.constant.js';\nimport { doesStatementDeclareRequire } from './_does-node-declare-require@shared/_utils/_compounds/does-statement-declare-require/index.js';\nimport { doesPatternBindRequire } from './_does-node-declare-require@shared/_utils/_primitives/does-pattern-bind-require/index.js';\nimport { isBindingPattern } from './_does-node-declare-require@shared/_utils/_primitives/is-binding-pattern/index.js';\nimport { isStatement } from './_does-node-declare-require@shared/_utils/_primitives/is-statement/index.js';\nimport { doesFunctionDeclareRequire } from './_utils/does-function-declare-require/index.js';\n\nexport function doesNodeDeclareRequire(node: TAstNode): boolean {\n if (node.type === 'Program' || node.type === 'BlockStatement') {\n const body = node['body'];\n return (\n Array.isArray(body) &&\n body\n .filter(isStatement)\n .some((statement) => doesStatementDeclareRequire(statement))\n );\n }\n\n if (FUNCTION_AST_TYPES.has(node.type)) {\n return doesFunctionDeclareRequire(node);\n }\n\n if (node.type === 'CatchClause') {\n const parameter = node['param'];\n return isBindingPattern(parameter) && doesPatternBindRequire(parameter);\n }\n\n return false;\n}\n","import type { TemplateLiteral } from 'oxc-parser';\n\nexport function extractTemplateSpecifier(node: TemplateLiteral): null | string {\n if (node.expressions.length > 0) {\n return null;\n }\n const quasi = node.quasis[0];\n return quasi === undefined ? null : (quasi.value.cooked ?? quasi.value.raw);\n}\n","import type { TemplateLiteral } from 'oxc-parser';\n\nexport function isTemplateLiteral(node: {\n readonly type: string;\n}): node is TemplateLiteral {\n return node.type === 'TemplateLiteral';\n}\n","import { extractTemplateSpecifier } from './_utils/extract-template-specifier/index.js';\nimport { isTemplateLiteral } from './_utils/is-template-literal/index.js';\n\nexport function extractStaticSpecifier(node: {\n readonly type: string;\n}): null | string {\n if (\n node.type === 'Literal' &&\n 'value' in node &&\n typeof node.value === 'string'\n ) {\n return node.value;\n }\n\n if (isTemplateLiteral(node)) {\n return extractTemplateSpecifier(node);\n }\n\n return null;\n}\n","import type { TModuleImport } from '../../../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TAstNode } from '../../../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nimport { isAstNode } from '../../../../_traverse-ast@shared/_utils/is-ast-node/index.js';\nimport { extractStaticSpecifier } from '../../_handle-specific-node@shared/_utils/extract-static-specifier/index.js';\n\nexport function handleImportExpression(\n expression: TAstNode,\n locator: TSourceLocator,\n inlineImports: TModuleImport[]\n): void {\n const start =\n typeof expression['start'] === 'number' ? expression['start'] : 0;\n const position = locator(start);\n const source = expression['source'];\n const specifier = isAstNode(source) ? extractStaticSpecifier(source) : null;\n\n if (specifier !== null) {\n inlineImports.push({\n isTypeOnly: false,\n kind: 'literal-dynamic-import',\n position,\n specifier,\n });\n return;\n }\n\n inlineImports.push({\n isTypeOnly: false,\n kind: 'non-literal-dynamic-import',\n position,\n specifier: null,\n });\n}\n","import type {\n TModuleImport,\n TUnsupportedSyntax,\n} from '../../../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TAstNode } from '../../../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nimport { UNSUPPORTED_REQUIRE_MESSAGE } from '../../../../_traverse-ast@shared/_constants/traversal-entries.constant.js';\nimport { isAstNode } from '../../../../_traverse-ast@shared/_utils/is-ast-node/index.js';\nimport { extractStaticSpecifier } from '../../_handle-specific-node@shared/_utils/extract-static-specifier/index.js';\n\nexport function handleRequireCall(\n call: TAstNode,\n locator: TSourceLocator,\n inlineImports: TModuleImport[],\n unsupportedSyntaxes: TUnsupportedSyntax[]\n): void {\n const start = typeof call['start'] === 'number' ? call['start'] : 0;\n const position = locator(start);\n const callArguments = call['arguments'];\n const isSingleElement = (value: null | object): value is readonly [unknown] =>\n value === callArguments && Array.isArray(value) && value.length === 1;\n\n if (typeof callArguments !== 'object' || !isSingleElement(callArguments)) {\n unsupportedSyntaxes.push({\n description: UNSUPPORTED_REQUIRE_MESSAGE,\n position,\n });\n return;\n }\n\n const argument = callArguments[0];\n const specifier = isAstNode(argument)\n ? extractStaticSpecifier(argument)\n : null;\n if (specifier !== null) {\n inlineImports.push({\n isTypeOnly: false,\n kind: 'require-call',\n position,\n specifier,\n });\n return;\n }\n\n unsupportedSyntaxes.push({\n description: UNSUPPORTED_REQUIRE_MESSAGE,\n position,\n });\n}\n","import type { TModuleImport } from '../../../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TAstNode } from '../../../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nimport { isAstNode } from '../../../../_traverse-ast@shared/_utils/is-ast-node/index.js';\n\nexport function handleTsImportType(\n importType: TAstNode,\n locator: TSourceLocator,\n inlineImports: TModuleImport[]\n): void {\n const start =\n typeof importType['start'] === 'number' ? importType['start'] : 0;\n const position = locator(start);\n const source = importType['source'];\n const specifier =\n isAstNode(source) && typeof source['value'] === 'string'\n ? source['value']\n : '';\n inlineImports.push({\n isTypeOnly: true,\n kind: 'typescript-import-type',\n position,\n specifier,\n });\n}\n","import type { TUnsupportedSyntax } from '../../../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TAstNode } from '../../../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nexport function handleUnsupportedSyntax(\n node: TAstNode,\n locator: TSourceLocator,\n unsupportedSyntaxes: TUnsupportedSyntax[]\n): void {\n if (node.type !== 'TSExportAssignment') {\n return;\n }\n\n const start = typeof node['start'] === 'number' ? node['start'] : 0;\n unsupportedSyntaxes.push({\n description: 'TypeScript export assignment (export =) is unsupported',\n position: locator(start),\n });\n}\n","import type {\n TModuleImport,\n TUnsupportedSyntax,\n} from '../../../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TAstNode } from '../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nimport { REQUIRE_NAME } from '../../_traverse-ast@shared/_constants/traversal-entries.constant.js';\nimport { isAstNode } from '../../_traverse-ast@shared/_utils/is-ast-node/index.js';\nimport { handleImportExpression } from './_utils/handle-import-expression/index.js';\nimport { handleRequireCall } from './_utils/handle-require-call/index.js';\nimport { handleTsImportType } from './_utils/handle-ts-import-type/index.js';\nimport { handleUnsupportedSyntax } from './_utils/handle-unsupported-syntax/index.js';\n\nexport function handleSpecificNode(\n node: TAstNode,\n isRequireShadowed: boolean,\n locator: TSourceLocator,\n inlineImports: TModuleImport[],\n unsupportedSyntaxes: TUnsupportedSyntax[]\n): void {\n if (node.type === 'CallExpression') {\n const callee = node['callee'];\n if (\n !isRequireShadowed &&\n isAstNode(callee) &&\n callee.type === 'Identifier' &&\n callee['name'] === REQUIRE_NAME\n ) {\n handleRequireCall(node, locator, inlineImports, unsupportedSyntaxes);\n }\n return;\n }\n\n if (node.type === 'ImportExpression') {\n handleImportExpression(node, locator, inlineImports);\n return;\n }\n\n if (node.type === 'TSImportType') {\n handleTsImportType(node, locator, inlineImports);\n return;\n }\n\n handleUnsupportedSyntax(node, locator, unsupportedSyntaxes);\n}\n","import type { TAstNode } from '../../../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nimport { isAstNode } from '../../_traverse-ast@shared/_utils/is-ast-node/index.js';\n\nexport function visitChildren(\n node: TAstNode,\n visitor: (child: TAstNode) => void\n): void {\n const elements = Object.values(node).flat();\n for (const item of elements) {\n if (isAstNode(item)) {\n visitor(item);\n }\n }\n}\n","import type { Program } from 'oxc-parser';\n\nimport type {\n TModuleImport,\n TUnsupportedSyntax,\n} from '../../../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TAstNode } from '../../_extract-traversal-entries@shared/_types/traversal-entries.type.js';\n\nimport { doesNodeDeclareRequire } from './_utils/does-node-declare-require/index.js';\nimport { handleSpecificNode } from './_utils/handle-specific-node/index.js';\nimport { visitChildren } from './_utils/visit-children/index.js';\n\nexport function traverseAst(\n node: Program | TAstNode,\n isRequireShadowed: boolean,\n locator: TSourceLocator,\n inlineImports: TModuleImport[],\n unsupportedSyntaxes: TUnsupportedSyntax[]\n): void {\n const astNode: TAstNode = { ...node, type: node.type };\n const isNextShadowed = isRequireShadowed || doesNodeDeclareRequire(astNode);\n\n handleSpecificNode(\n astNode,\n isNextShadowed,\n locator,\n inlineImports,\n unsupportedSyntaxes\n );\n\n visitChildren(astNode, (child) => {\n traverseAst(\n child,\n isNextShadowed,\n locator,\n inlineImports,\n unsupportedSyntaxes\n );\n });\n}\n","import type { Program } from 'oxc-parser';\n\nimport type {\n TModuleImport,\n TUnsupportedSyntax,\n} from '../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TSourceLocator } from '../../_extract-script-module-record@shared/_utils/create-source-locator/index.js';\nimport type { TTraversalResult } from './extract-traversal-entries.type.js';\n\nimport { traverseAst } from './_utils/traverse-ast/index.js';\n\nexport function extractTraversalEntries(\n program: Program,\n locator: TSourceLocator\n): TTraversalResult {\n const inlineImports: TModuleImport[] = [];\n const unsupportedSyntaxes: TUnsupportedSyntax[] = [];\n\n traverseAst(program, false, locator, inlineImports, unsupportedSyntaxes);\n\n return {\n inlineImports,\n unsupportedSyntaxes,\n };\n}\n","import type { TSourceLocation } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareSourceLocations } from '../../../../../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function sortByPosition<\n T extends { readonly position: TSourceLocation },\n>(items: readonly T[]): readonly T[] {\n const elements = [...items];\n elements.sort((first, second) =>\n compareSourceLocations(first.position, second.position)\n );\n return elements;\n}\n","import type {\n TModuleExport,\n TModuleImport,\n TRootSymbol,\n TUnsupportedSyntax,\n} from '../../../../../../../../_session@shared/_types/module-record.type.js';\n\nexport const EMPTY_MODULE_EXPORTS: readonly TModuleExport[] = [];\nexport const EMPTY_MODULE_IMPORTS: readonly TModuleImport[] = [];\nexport const EMPTY_ROOT_SYMBOLS: readonly TRootSymbol[] = [];\nexport const EMPTY_UNSUPPORTED_SYNTAXES: readonly TUnsupportedSyntax[] = [];\n","import type {\n TModuleRecord,\n TModuleRecordProducer,\n} from '../../../../../../../../_session@shared/_types/module-record.type.js';\n\nimport {\n EMPTY_MODULE_EXPORTS,\n EMPTY_MODULE_IMPORTS,\n EMPTY_ROOT_SYMBOLS,\n EMPTY_UNSUPPORTED_SYNTAXES,\n} from './produce-binary-module-record.constant.js';\n\nexport const produceBinaryModuleRecord: TModuleRecordProducer = (\n _path: string,\n _text: string\n): TModuleRecord => ({\n exports: EMPTY_MODULE_EXPORTS,\n imports: EMPTY_MODULE_IMPORTS,\n language: 'binary',\n symbols: EMPTY_ROOT_SYMBOLS,\n unsupportedSyntaxes: EMPTY_UNSUPPORTED_SYNTAXES,\n});\n","import type { TAdvanceCoordinatesResult } from './advance-coordinates.type.js';\n\nexport function advanceCoordinates(\n text: string,\n startIndex: number,\n endIndex: number,\n startLine: number,\n startColumn: number\n): TAdvanceCoordinatesResult {\n const slice = text.slice(startIndex, endIndex);\n let line = startLine;\n let lastNewline = -1;\n\n for (let index = 0; index < slice.length; index += 1) {\n const isNewline =\n slice[index] === '\\n' ||\n (slice[index] === '\\r' && slice[index + 1] !== '\\n');\n if (!isNewline) {\n continue;\n }\n\n line += 1;\n lastNewline = index;\n }\n\n const column =\n lastNewline === -1\n ? startColumn + slice.length\n : slice.length - lastNewline;\n\n return { column, line };\n}\n","export const EXCLUDED_PREFIXES = ['//', 'data:', 'http:', 'https:'] as const;\n\nexport const INTERPOLATION_MARKERS = ['#{', '@{', 'var('] as const;\n\nexport const PRESERVED_SPECIFIER_PREFIXES = ['./', '../', '#/'] as const;\n\nexport const QUOTE_WRAP_PATTERN = /^(['\"])([\\s\\S]*)\\1$/;\n","import type { TSourceLocation } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TImportSyntaxKind } from '../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TClassifiedStyleReference } from './classify-style-reference.type.js';\n\nimport {\n EXCLUDED_PREFIXES,\n INTERPOLATION_MARKERS,\n PRESERVED_SPECIFIER_PREFIXES,\n QUOTE_WRAP_PATTERN,\n} from './classify-style-reference.constant.js';\n\nexport function classifyStyleReference(\n kind: TImportSyntaxKind,\n position: TSourceLocation,\n raw: string\n): TClassifiedStyleReference {\n const trimmed = raw.trim();\n const cleaned = trimmed.replace(QUOTE_WRAP_PATTERN, '$2').trim();\n\n if (cleaned.length === 0) {\n return {};\n }\n\n const hasInterpolation = INTERPOLATION_MARKERS.some((marker) =>\n cleaned.includes(marker)\n );\n if (hasInterpolation) {\n return {\n importItem: {\n isTypeOnly: false,\n kind,\n position,\n specifier: null,\n },\n unsupportedSyntax: {\n description:\n 'Interpolated expressions in stylesheet references are unsupported',\n position,\n },\n };\n }\n\n if (cleaned.startsWith('#') && !cleaned.startsWith('#/')) {\n return {};\n }\n\n const lower = cleaned.toLowerCase();\n const isExcluded = EXCLUDED_PREFIXES.some((prefix) =>\n lower.startsWith(prefix)\n );\n if (isExcluded) {\n return {};\n }\n\n if (cleaned.startsWith('~')) {\n return {\n importItem: {\n isTypeOnly: false,\n kind,\n position,\n specifier: null,\n },\n unsupportedSyntax: {\n description: `Package-relative specifiers (~pkg) in stylesheets are unsupported: '${cleaned}'`,\n position,\n },\n };\n }\n\n if (cleaned.startsWith('/')) {\n return {\n importItem: {\n isTypeOnly: false,\n kind,\n position,\n specifier: null,\n },\n unsupportedSyntax: {\n description: `Absolute path specifiers (/x) in stylesheets are unsupported: '${cleaned}'`,\n position,\n },\n };\n }\n\n const isExplicitRelative = PRESERVED_SPECIFIER_PREFIXES.some((prefix) =>\n cleaned.startsWith(prefix)\n );\n const specifier = isExplicitRelative ? cleaned : `./${cleaned}`;\n\n return {\n importItem: {\n isTypeOnly: false,\n kind,\n position,\n specifier,\n },\n };\n}\n","export const DELIMITER_CHARS: readonly string[] = [\n ';',\n '}',\n ' ',\n '\\t',\n '\\n',\n '\\r',\n];\n","import type { TReadBareSpecifierResult } from './read-bare-specifier.type.js';\n\nimport { DELIMITER_CHARS } from './read-bare-specifier.constant.js';\n\nexport function readBareSpecifier(\n text: string,\n startIndex: number\n): TReadBareSpecifierResult {\n let braceDepth = 0;\n let index = startIndex;\n\n while (index < text.length) {\n const char = text[index] ?? '';\n if (char === '{') {\n braceDepth += 1;\n index += 1;\n } else if (char === '}' && braceDepth > 0) {\n braceDepth -= 1;\n index += 1;\n } else if (braceDepth === 0 && DELIMITER_CHARS.includes(char)) {\n break;\n } else {\n index += 1;\n }\n }\n\n const raw = text.slice(startIndex, index).trim();\n return { nextIndex: index, raw };\n}\n","import type { TReadQuotedSpecifierResult } from './read-quoted-specifier.type.js';\n\nexport function readQuotedSpecifier(\n text: string,\n startIndex: number,\n quote: string\n): TReadQuotedSpecifierResult {\n const terminators: ReadonlySet<string> = new Set(['\\n', '\\r', quote]);\n\n let index = startIndex;\n while (index < text.length && !terminators.has(text[index] ?? '')) {\n if (text[index] === '\\\\') {\n if (index + 1 >= text.length) {\n break;\n }\n index += 2;\n } else {\n index += 1;\n }\n }\n\n const raw = text.slice(startIndex, index).replaceAll(/\\\\(.)/g, '$1');\n const isClosed = index < text.length && text[index] === quote;\n const nextIndex = isClosed ? index + 1 : index;\n\n return { nextIndex, raw };\n}\n","import type { TReadQuotedUrlResult } from './read-quoted-url.type.js';\n\nexport function readQuotedUrl(\n text: string,\n startIndex: number,\n quote: string\n): TReadQuotedUrlResult {\n const isTerminatingChar = (char: string | undefined): boolean =>\n char === undefined || char === quote || char === '\\n' || char === '\\r';\n\n let index = startIndex;\n while (index < text.length) {\n const char = text[index];\n const isTrailingEscape = char === '\\\\' && index + 1 >= text.length;\n\n if (isTrailingEscape || isTerminatingChar(char)) {\n break;\n }\n\n if (char === '\\\\') {\n index += 2;\n } else {\n index += 1;\n }\n }\n\n const raw = text.slice(startIndex, index).replaceAll(/\\\\(.)/g, '$1');\n const closingParen = text.indexOf(')', index);\n const nextIndex = closingParen === -1 ? text.length : closingParen + 1;\n\n return { nextIndex, raw };\n}\n","import type { TReadUnquotedUrlResult } from './read-unquoted-url.type.js';\n\nexport function readUnquotedUrl(\n text: string,\n startIndex: number\n): TReadUnquotedUrlResult {\n let parenDepth = 0;\n let index = startIndex;\n\n while (index < text.length) {\n const char = text[index];\n if (char === '(') {\n parenDepth += 1;\n index += 1;\n } else if (char === ')' && parenDepth === 0) {\n break;\n } else if (char === ')') {\n parenDepth -= 1;\n index += 1;\n } else {\n index += 1;\n }\n }\n\n const raw = text.slice(startIndex, index).trim();\n const nextIndex = index < text.length ? index + 1 : text.length;\n\n return { nextIndex, raw };\n}\n","export const URL_HEADER_PATTERN = /url[ \\t]*\\([ \\t\\r\\n]*/iy;\n","import type { TReadUrlSpecifierResult } from './read-url-specifier.type.js';\n\nimport { readQuotedUrl } from './_utils/read-quoted-url/index.js';\nimport { readUnquotedUrl } from './_utils/read-unquoted-url/index.js';\nimport { URL_HEADER_PATTERN } from './read-url-specifier.constant.js';\n\nexport function readUrlSpecifier(\n text: string,\n startIndex: number\n): TReadUrlSpecifierResult {\n URL_HEADER_PATTERN.lastIndex = startIndex;\n const match = URL_HEADER_PATTERN.exec(text);\n if (match === null) {\n return { nextIndex: startIndex, raw: '' };\n }\n\n const contentStart = startIndex + match[0].length;\n const quote = text[contentStart];\n const isQuoted = quote === '\"' || quote === \"'\";\n return isQuoted\n ? readQuotedUrl(text, contentStart + 1, quote)\n : readUnquotedUrl(text, contentStart);\n}\n","import type { TReadAtImportSpecifierResult } from './read-at-import-specifier.type.js';\n\nimport { readBareSpecifier } from './_utils/read-bare-specifier/index.js';\nimport { readQuotedSpecifier } from './_utils/read-quoted-specifier/index.js';\nimport { readUrlSpecifier } from './_utils/read-url-specifier/index.js';\n\nexport function readAtImportSpecifier(\n text: string,\n startIndex: number\n): TReadAtImportSpecifierResult {\n const quote = text[startIndex];\n const isQuoted = quote === '\"' || quote === \"'\";\n if (isQuoted) {\n return readQuotedSpecifier(text, startIndex + 1, quote);\n }\n\n const isUrl = text.slice(startIndex, startIndex + 3).toLowerCase() === 'url';\n return isUrl\n ? readUrlSpecifier(text, startIndex)\n : readBareSpecifier(text, startIndex);\n}\n","export const SASS_NEWLINES: readonly string[] = ['\\n', '\\r'];\nexport const STATEMENT_TERMINATORS: readonly string[] = [';', '}'];\n","import type { TSkipAtImportStatementResult } from './skip-at-import-statement.type.js';\n\nimport {\n SASS_NEWLINES,\n STATEMENT_TERMINATORS,\n} from './skip-at-import-statement.constant.js';\n\nexport function skipAtImportStatement(\n text: string,\n startIndex: number,\n isSass: boolean\n): TSkipAtImportStatementResult {\n const isStatementTerminator = (char: string | undefined): boolean =>\n char === undefined ||\n STATEMENT_TERMINATORS.includes(char) ||\n (isSass && SASS_NEWLINES.includes(char));\n\n let statementEnd = startIndex;\n while (!isStatementTerminator(text[statementEnd])) {\n statementEnd += 1;\n }\n\n const nextIndex =\n text[statementEnd] === ';' ? statementEnd + 1 : statementEnd;\n return { nextIndex };\n}\n","export const IDENTIFIER_CHAR_PATTERN = /^[a-zA-Z0-9_-]$/;\n","import type { TScanAtImportResult } from './scan-css-at-import.type.js';\n\nimport { readAtImportSpecifier } from './_utils/read-at-import-specifier/index.js';\nimport { skipAtImportStatement } from './_utils/skip-at-import-statement/index.js';\nimport { IDENTIFIER_CHAR_PATTERN } from './scan-css-at-import.constant.js';\n\nexport function scanCssAtImport(\n text: string,\n startIndex: number,\n isSass: boolean\n): TScanAtImportResult {\n const isAtImportKeyword =\n text.slice(startIndex, startIndex + 7).toLowerCase() === '@import';\n if (!isAtImportKeyword) {\n return { nextIndex: startIndex };\n }\n\n const nextChar = text[startIndex + 7];\n const isFollowedByIdentifier =\n nextChar !== undefined && IDENTIFIER_CHAR_PATTERN.test(nextChar);\n if (isFollowedByIdentifier) {\n return { nextIndex: startIndex };\n }\n\n let contentStart = startIndex + 7;\n while (\n contentStart < text.length &&\n (text[contentStart] === ' ' || text[contentStart] === '\\t')\n ) {\n contentStart += 1;\n }\n\n if (contentStart >= text.length) {\n return { nextIndex: startIndex };\n }\n\n const specifierResult = readAtImportSpecifier(text, contentStart);\n const skipResult = skipAtImportStatement(\n text,\n specifierResult.nextIndex,\n isSass\n );\n\n return { nextIndex: skipResult.nextIndex, raw: specifierResult.raw };\n}\n","import type { TReadQuotedUrlResult } from './read-quoted-url.type.js';\n\nexport function readQuotedUrl(\n text: string,\n startIndex: number,\n quote: string\n): TReadQuotedUrlResult {\n const isTerminatingChar = (char: string | undefined): boolean =>\n char === undefined || char === quote || char === '\\n' || char === '\\r';\n\n let index = startIndex;\n while (index < text.length) {\n const char = text[index];\n const isTrailingEscape = char === '\\\\' && index + 1 >= text.length;\n\n if (isTrailingEscape || isTerminatingChar(char)) {\n break;\n }\n\n if (char === '\\\\') {\n index += 2;\n } else {\n index += 1;\n }\n }\n\n const raw = text.slice(startIndex, index).replaceAll(/\\\\(.)/g, '$1');\n const closingParen = text.indexOf(')', index);\n const nextIndex = closingParen === -1 ? text.length : closingParen + 1;\n\n return { nextIndex, raw };\n}\n","import type { TReadUnquotedUrlResult } from './read-unquoted-url.type.js';\n\nexport function readUnquotedUrl(\n text: string,\n startIndex: number\n): TReadUnquotedUrlResult {\n let parenDepth = 0;\n let index = startIndex;\n\n while (index < text.length) {\n const char = text[index];\n if (char === '(') {\n parenDepth += 1;\n index += 1;\n } else if (char === ')' && parenDepth === 0) {\n break;\n } else if (char === ')') {\n parenDepth -= 1;\n index += 1;\n } else {\n index += 1;\n }\n }\n\n const raw = text.slice(startIndex, index).trim();\n const nextIndex = index < text.length ? index + 1 : text.length;\n\n return { nextIndex, raw };\n}\n","export const IDENTIFIER_CHAR_PATTERN = /^[a-zA-Z0-9_-]$/;\nexport const URL_HEADER_PATTERN = /url[ \\t]*\\([ \\t\\r\\n]*/iy;\n","import type { TScanUrlResult } from './scan-css-url.type.js';\n\nimport { readQuotedUrl } from './_utils/read-quoted-url/index.js';\nimport { readUnquotedUrl } from './_utils/read-unquoted-url/index.js';\nimport {\n IDENTIFIER_CHAR_PATTERN,\n URL_HEADER_PATTERN,\n} from './scan-css-url.constant.js';\n\nexport function scanCssUrl(text: string, startIndex: number): TScanUrlResult {\n const previousChar = text[startIndex - 1];\n if (\n previousChar !== undefined &&\n IDENTIFIER_CHAR_PATTERN.test(previousChar)\n ) {\n return { nextIndex: startIndex };\n }\n\n URL_HEADER_PATTERN.lastIndex = startIndex;\n const match = URL_HEADER_PATTERN.exec(text);\n if (match === null) {\n return { nextIndex: startIndex };\n }\n\n const contentStart = startIndex + match[0].length;\n const quote = text[contentStart];\n const isQuoted = quote === '\"' || quote === \"'\";\n return isQuoted\n ? readQuotedUrl(text, contentStart + 1, quote)\n : readUnquotedUrl(text, contentStart);\n}\n","import type { TSkipBlockCommentResult } from './skip-css-block-comment.type.js';\n\nexport function skipCssBlockComment(\n text: string,\n startIndex: number\n): TSkipBlockCommentResult {\n const isBlockStart = text[startIndex] === '/' && text[startIndex + 1] === '*';\n if (!isBlockStart) {\n return {\n nextIndex: startIndex,\n skipped: false,\n };\n }\n\n const closingIndex = text.indexOf('*/', startIndex + 2);\n const nextIndex = closingIndex === -1 ? text.length : closingIndex + 2;\n\n return {\n nextIndex,\n skipped: true,\n };\n}\n","import type { TSkipLineCommentResult } from './skip-css-line-comment.type.js';\n\nexport function skipCssLineComment(\n text: string,\n startIndex: number\n): TSkipLineCommentResult {\n const isLineStart = text[startIndex] === '/' && text[startIndex + 1] === '/';\n if (!isLineStart) {\n return {\n nextIndex: startIndex,\n skipped: false,\n };\n }\n\n const newlineIndex = text.indexOf('\\n', startIndex + 2);\n const nextIndex = newlineIndex === -1 ? text.length : newlineIndex + 1;\n\n return {\n nextIndex,\n skipped: true,\n };\n}\n","import type { TSkipStringResult } from './skip-css-string.type.js';\n\nexport function skipCssString(\n text: string,\n startIndex: number\n): TSkipStringResult {\n const quote = text[startIndex];\n const isStringStart = quote === '\"' || quote === \"'\";\n if (!isStringStart) {\n return {\n nextIndex: startIndex,\n skipped: false,\n };\n }\n\n let index = startIndex + 1;\n while (index < text.length) {\n const char = text[index];\n if (char === '\\\\') {\n index += 2;\n } else if (char === quote || char === '\\n' || char === '\\r') {\n index += 1;\n break;\n } else {\n index += 1;\n }\n }\n\n const nextIndex = Math.min(index, text.length);\n return {\n nextIndex,\n skipped: true,\n };\n}\n","import type {\n TModuleExport,\n TRootSymbol,\n} from '../../../../../../../../_session@shared/_types/module-record.type.js';\n\nexport const EMPTY_STYLE_EXPORTS: readonly TModuleExport[] = [];\nexport const EMPTY_STYLE_SYMBOLS: readonly TRootSymbol[] = [];\nexport const SASS_EXTENSIONS = ['.sass'] as const;\nexport const SINGLE_LINE_EXTENSIONS = ['.scss', '.sass', '.less'] as const;\n","import type {\n TModuleImport,\n TModuleRecord,\n TUnsupportedSyntax,\n} from '../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TClassifiedStyleReference } from './_utils/classify-style-reference/index.js';\n\nimport { advanceCoordinates } from './_utils/advance-coordinates/index.js';\nimport { classifyStyleReference } from './_utils/classify-style-reference/index.js';\nimport { scanCssAtImport } from './_utils/scan-css-at-import/index.js';\nimport { scanCssUrl } from './_utils/scan-css-url/index.js';\nimport { skipCssBlockComment } from './_utils/skip-css-block-comment/index.js';\nimport { skipCssLineComment } from './_utils/skip-css-line-comment/index.js';\nimport { skipCssString } from './_utils/skip-css-string/index.js';\nimport {\n EMPTY_STYLE_EXPORTS,\n EMPTY_STYLE_SYMBOLS,\n SASS_EXTENSIONS,\n SINGLE_LINE_EXTENSIONS,\n} from './produce-style-module-record.constant.js';\n\nexport function produceStyleModuleRecord(\n path: string,\n text: string\n): TModuleRecord {\n const imports: TModuleImport[] = [];\n const unsupportedSyntaxes: TUnsupportedSyntax[] = [];\n\n const lowerPath = path.toLowerCase();\n const isSass = SASS_EXTENSIONS.some((extension) =>\n lowerPath.endsWith(extension)\n );\n const hasSingleLineComments = SINGLE_LINE_EXTENSIONS.some((extension) =>\n lowerPath.endsWith(extension)\n );\n\n let index = 0;\n let line = 1;\n let column = 1;\n\n const advanceTo = (nextIndex: number): void => {\n const coords = advanceCoordinates(text, index, nextIndex, line, column);\n line = coords.line;\n column = coords.column;\n index = nextIndex;\n };\n\n const recordClassified = (classified: TClassifiedStyleReference): void => {\n if (classified.importItem !== undefined) {\n imports.push(classified.importItem);\n }\n if (classified.unsupportedSyntax !== undefined) {\n unsupportedSyntaxes.push(classified.unsupportedSyntax);\n }\n };\n\n const advanceOneChar = (): void => {\n const char = text[index];\n index += 1;\n if (char === '\\n') {\n line += 1;\n column = 1;\n } else {\n column += 1;\n }\n };\n\n const processScannerStep = (): void => {\n const blockComment = skipCssBlockComment(text, index);\n if (blockComment.skipped) {\n advanceTo(blockComment.nextIndex);\n return;\n }\n\n if (hasSingleLineComments) {\n const lineComment = skipCssLineComment(text, index);\n if (lineComment.skipped) {\n advanceTo(lineComment.nextIndex);\n return;\n }\n }\n\n const stringMatch = skipCssString(text, index);\n if (stringMatch.skipped) {\n advanceTo(stringMatch.nextIndex);\n return;\n }\n\n const atImport = scanCssAtImport(text, index, isSass);\n if (atImport.raw !== undefined) {\n recordClassified(\n classifyStyleReference('css-at-import', { column, line }, atImport.raw)\n );\n advanceTo(atImport.nextIndex);\n return;\n }\n\n const urlMatch = scanCssUrl(text, index);\n if (urlMatch.raw !== undefined) {\n recordClassified(\n classifyStyleReference('css-url', { column, line }, urlMatch.raw)\n );\n advanceTo(urlMatch.nextIndex);\n return;\n }\n\n advanceOneChar();\n };\n\n while (index < text.length) {\n processScannerStep();\n }\n\n return {\n exports: EMPTY_STYLE_EXPORTS,\n imports,\n language: 'style',\n symbols: EMPTY_STYLE_SYMBOLS,\n unsupportedSyntaxes,\n };\n}\n","export const SCRIPT_EXTENSIONS = [\n '.ts',\n '.tsx',\n '.mts',\n '.cts',\n '.js',\n '.jsx',\n '.mjs',\n '.cjs',\n] as const;\n\nexport const STYLE_EXTENSIONS = ['.css', '.scss', '.sass', '.less'] as const;\n","import type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { toPosixPath } from '../../../../../../_session@shared/_utils/to-posix-path/index.js';\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function selectTreeFilePaths(inventory: TInventory): readonly string[] {\n const paths = new Set<string>();\n for (const item of inventory.items) {\n if (item.kind === 'file' && item.treeOrigin !== null) {\n paths.add(toPosixPath(item.path));\n }\n }\n const ordered = [...paths];\n ordered.sort(compareOrdinal);\n return ordered;\n}\n","import type { TUnverifiedOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TModuleRecord } from '../../../../_session@shared/_types/module-record.type.js';\nimport type { TModuleCollection } from '../../_verify-project@shared/_types/_aggregates/module-collection.type.js';\nimport type { TImportResolution } from '../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TCollectModulesInput } from './collect-modules.type.js';\n\nimport { moduleRecordStore } from '../../../../_session@shared/_stores/module-record-store/index.js';\nimport { toPosixPath } from '../../../../_session@shared/_utils/to-posix-path/index.js';\nimport { assertInvariant } from '../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { analyzeQueuedModule } from './_adapters/analyze-queued-module/index.js';\nimport { resolveSpecifiers } from './_adapters/resolve-specifiers/index.js';\nimport { canonicalizeDirectory } from './_collect-modules@shared/_adapters/canonicalize-directory/index.js';\nimport { collectUnvisitedLocalPaths } from './_utils/collect-unvisited-local-paths/index.js';\nimport { orderModuleCollection } from './_utils/order-module-collection/index.js';\nimport { produceModuleRecordByExtension } from './_utils/produce-module-record-by-extension/index.js';\nimport { selectTreeFilePaths } from './_utils/select-tree-file-paths/index.js';\n\nexport function collectModules(input: TCollectModulesInput): TModuleCollection {\n const baseDirectory = canonicalizeDirectory(input.baseDirectory);\n const producer = moduleRecordStore.wrapProducer(\n produceModuleRecordByExtension\n );\n const resolver = resolveSpecifiers(baseDirectory, input.aliases);\n const queue = [...selectTreeFilePaths(input.inventory)];\n const visited = new Set<string>(queue);\n for (const item of input.inventory.items) {\n const posix = toPosixPath(item.path);\n if (\n item.kind !== 'file' ||\n item.treeOrigin !== null ||\n visited.has(posix)\n ) {\n continue;\n }\n visited.add(posix);\n queue.push(posix);\n }\n const records = new Map<string, TModuleRecord>();\n const resolutions = new Map<string, readonly TImportResolution[]>();\n const unverifiedOutcomes: TUnverifiedOutcome[] = [];\n let cursor = 0;\n\n while (cursor < queue.length) {\n const relativePath = queue[cursor];\n assertInvariant(relativePath !== undefined, 'Expected queued module path');\n cursor += 1;\n const analysis = analyzeQueuedModule({\n baseDirectory,\n inventory: input.inventory,\n producer,\n relativePath,\n resolver,\n textOverrides: input.textOverrides,\n });\n if (analysis.record !== null) {\n records.set(relativePath, analysis.record);\n resolutions.set(relativePath, analysis.resolutions);\n }\n for (const outcome of analysis.outcomes) {\n unverifiedOutcomes.push(outcome);\n }\n for (const reachablePath of collectUnvisitedLocalPaths(\n analysis.resolutions,\n visited\n )) {\n visited.add(reachablePath);\n queue.push(reachablePath);\n }\n }\n\n return orderModuleCollection({ records, resolutions, unverifiedOutcomes });\n}\n","import type { TItemClassification } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TInventoryItem } from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function isPermittedEdge(\n sourceItem: TInventoryItem | undefined,\n destinationItem: TInventoryItem | undefined,\n destinationClassification: TItemClassification | undefined\n): boolean {\n if (\n sourceItem === undefined ||\n destinationItem === undefined ||\n destinationClassification === undefined\n ) {\n return false;\n }\n\n const isDirectSibling =\n sourceItem.parentId !== null &&\n sourceItem.parentId === destinationItem.parentId;\n\n const isFragmentNode =\n destinationClassification.nodeKind === 'master-node' ||\n destinationClassification.nodeKind === 'fragment-node';\n\n return isDirectSibling && isFragmentNode;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { isPermittedEdge } from './_utils/is-permitted-edge/index.js';\n\nexport function collectSourceOutcomes(\n model: TVerificationModel\n): readonly TDependencyOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const { inventory } = model.basis;\n const { graph, taxonomy } = model;\n\n for (const edge of graph.edgeMetadata) {\n const sourceClassification = taxonomy.byPath.get(edge.sourcePath);\n if (sourceClassification?.nodeKind !== 'access-node') {\n continue;\n }\n\n const sourceItem = inventory.items[sourceClassification.itemId];\n const destinationClassification = taxonomy.byPath.get(edge.destinationPath);\n const destinationItem =\n destinationClassification === undefined\n ? undefined\n : inventory.items[destinationClassification.itemId];\n\n if (\n !isPermittedEdge(sourceItem, destinationItem, destinationClassification)\n ) {\n outcomes.push(\n createOutcome('dependency/access-node-sources', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n })\n );\n }\n }\n\n for (const note of graph.libraryNotes) {\n const sourceClassification = taxonomy.byPath.get(note.sourcePath);\n if (sourceClassification?.nodeKind === 'access-node') {\n outcomes.push(\n createOutcome('dependency/access-node-sources', {\n from: note.sourcePath,\n importIndex: note.importIndex,\n position: note.position,\n specifier: note.specifier,\n to: note.packageName,\n })\n );\n }\n }\n\n return outcomes;\n}\n","import type {\n TModuleExport,\n TModuleRecord,\n} from '../../../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TEdgeMetadata } from '../../../../../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\n\nexport function isMasterReExported(\n accessExports: readonly TModuleExport[],\n masterPath: string,\n masterRecord: TModuleRecord,\n accessEdges: readonly TEdgeMetadata[]\n): boolean {\n if (masterRecord.symbols.length !== 1) {\n return true;\n }\n const masterSymbol = masterRecord.symbols[0];\n if (masterSymbol === undefined) {\n return true;\n }\n\n const masterSymbolExports = masterRecord.exports.filter(\n (exp) =>\n exp.origin.type === 'local-symbol' &&\n exp.origin.symbolName === masterSymbol.name\n );\n if (masterSymbolExports.length === 0) {\n return true;\n }\n\n const exportedFromMasterNames = new Set(\n masterSymbolExports.map((exp) => exp.exportedName)\n );\n const hasNamedMasterExport = [...exportedFromMasterNames].some(\n (name) => name !== 'default'\n );\n const isMasterValue = masterSymbol.space === 'value';\n\n const localDestinationsBySpecifier = new Map<string, string>();\n for (const edge of accessEdges) {\n localDestinationsBySpecifier.set(edge.specifier, edge.destinationPath);\n }\n\n return accessExports.some((exp) => {\n if (exp.origin.type === 'export-all') {\n const destination = localDestinationsBySpecifier.get(\n exp.origin.specifier\n );\n return (\n destination === masterPath &&\n hasNamedMasterExport &&\n (!isMasterValue || !exp.isTypeOnly)\n );\n }\n\n if (exp.origin.type === 'imported-binding') {\n const destination = localDestinationsBySpecifier.get(\n exp.origin.specifier\n );\n return (\n destination === masterPath &&\n exportedFromMasterNames.has(exp.origin.importedName) &&\n (!isMasterValue || !exp.isTypeOnly)\n );\n }\n\n return false;\n });\n}\n","import type { TSymbolOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TModuleRecord } from '../../../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TItemClassification } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type {\n TDependencyGraph,\n TEdgeMetadata,\n} from '../../../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { isMasterReExported } from './_utils/is-master-re-exported/index.js';\n\nexport function checkMasterExport(\n accessClassification: TItemClassification,\n accessRecord: TModuleRecord,\n masterClassification: TItemClassification | undefined,\n masterRecord: TModuleRecord | undefined,\n graph: TDependencyGraph\n): TSymbolOutcome | undefined {\n if (\n masterClassification === undefined ||\n masterRecord?.language !== 'script'\n ) {\n return undefined;\n }\n\n const edgeIndices =\n graph.edgesBySourcePath.get(accessClassification.path) ?? [];\n const accessEdges = edgeIndices\n .map((index) => graph.edgeMetadata[index])\n .filter((edge): edge is TEdgeMetadata => edge !== undefined);\n\n const isReExported = isMasterReExported(\n accessRecord.exports,\n masterClassification.path,\n masterRecord,\n accessEdges\n );\n\n return isReExported\n ? undefined\n : createOutcome('symbol/access-node-master-export', {\n element: accessClassification.path,\n });\n}\n","import type { TItemClassification } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TInventoryItem } from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function indexMastersByParent(\n classifications: readonly TItemClassification[],\n items: readonly TInventoryItem[]\n): ReadonlyMap<number, TItemClassification> {\n const masterMap = new Map<number, TItemClassification>();\n\n for (const item of classifications) {\n if (item.nodeKind !== 'master-node') {\n continue;\n }\n const inventoryItem = items[item.itemId];\n if (\n inventoryItem?.parentId !== null &&\n inventoryItem?.parentId !== undefined\n ) {\n masterMap.set(inventoryItem.parentId, item);\n }\n }\n\n return masterMap;\n}\n","import type { TSymbolOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { checkMasterExport } from './_utils/check-master-export/index.js';\nimport { indexMastersByParent } from './_utils/index-masters-by-parent/index.js';\n\nexport function collectSymbolOutcomes(\n model: TVerificationModel\n): readonly TSymbolOutcome[] {\n const outcomes: TSymbolOutcome[] = [];\n const { inventory } = model.basis;\n const { graph, modules, taxonomy } = model;\n const mastersByParentId = indexMastersByParent(\n taxonomy.classifications,\n inventory.items\n );\n\n const accessClassifications = taxonomy.classifications.filter(\n (item) => item.nodeKind === 'access-node'\n );\n\n for (const classification of accessClassifications) {\n const accessItem = inventory.items[classification.itemId];\n const accessRecord = modules.records.get(classification.path);\n const hasValidScript =\n accessItem?.parentId !== null &&\n accessItem?.parentId !== undefined &&\n accessRecord?.language === 'script';\n\n if (!hasValidScript) {\n continue;\n }\n\n if (accessRecord.symbols.length > 0) {\n outcomes.push(\n createOutcome('symbol/access-node-own-symbols', {\n element: classification.path,\n })\n );\n }\n\n const masterClassification = mastersByParentId.get(accessItem.parentId);\n const masterRecord =\n masterClassification === undefined\n ? undefined\n : modules.records.get(masterClassification.path);\n\n const masterOutcome = checkMasterExport(\n classification,\n accessRecord,\n masterClassification,\n masterRecord,\n graph\n );\n if (masterOutcome !== undefined) {\n outcomes.push(masterOutcome);\n }\n }\n\n return outcomes;\n}\n","import type { TOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareAccessNodeOutcomes(\n left: TOutcome,\n right: TOutcome\n): number {\n const elementComparison = compareOrdinal(left.element, right.element);\n if (elementComparison !== 0) {\n return elementComparison;\n }\n\n const constraintComparison = compareOrdinal(\n left.constraint,\n right.constraint\n );\n if (constraintComparison !== 0) {\n return constraintComparison;\n }\n\n const positionComparison = compareSourceLocations(\n left.position ?? { column: 0, line: 0 },\n right.position ?? { column: 0, line: 0 }\n );\n return positionComparison === 0\n ? compareOrdinal(left.message, right.message)\n : positionComparison;\n}\n","import type { TOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { collectSourceOutcomes } from './_utils/collect-source-outcomes/index.js';\nimport { collectSymbolOutcomes } from './_utils/collect-symbol-outcomes/index.js';\nimport { compareAccessNodeOutcomes } from './_utils/compare-access-node-outcomes/index.js';\n\nexport function verifyAccessNodeContract(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TOutcome[] = [\n ...collectSourceOutcomes(model),\n ...collectSymbolOutcomes(model),\n ];\n\n outcomes.sort(compareAccessNodeOutcomes);\n return outcomes;\n}\n","export function buildTransposeGraph(\n nodeCount: number,\n adjacency: readonly (readonly number[])[]\n): readonly (readonly number[])[] {\n const revAdjacency: number[][] = Array.from({ length: nodeCount }, () => []);\n\n for (let u = 0; u < nodeCount; u += 1) {\n const neighbors = adjacency[u];\n if (neighbors === undefined) {\n continue;\n }\n for (const v of neighbors) {\n const row = revAdjacency[v];\n if (row !== undefined) {\n row.push(u);\n }\n }\n }\n\n return revAdjacency;\n}\n","export function collectSccComponent(\n root: number,\n revAdjacency: readonly (readonly number[])[],\n visited: Uint8Array\n): readonly number[] {\n const component: number[] = [];\n const stack = [root];\n visited[root] = 1;\n\n let current = stack.pop();\n while (current !== undefined) {\n component.push(current);\n const neighbors = revAdjacency[current];\n if (neighbors === undefined) {\n current = stack.pop();\n continue;\n }\n for (const neighbor of neighbors) {\n if (visited[neighbor] === 1) {\n continue;\n }\n visited[neighbor] = 1;\n stack.push(neighbor);\n }\n current = stack.pop();\n }\n\n return component;\n}\n","export function processStackTop(\n callStack: number[],\n edgeIndices: Int32Array,\n adjacency: readonly (readonly number[])[],\n visited: Uint8Array,\n finishStack: number[]\n): void {\n const currentNode = callStack.at(-1);\n if (currentNode === undefined) {\n return;\n }\n const neighbors = adjacency[currentNode] ?? [];\n const currentEdgeIndex = edgeIndices[currentNode] ?? 0;\n\n if (currentEdgeIndex < neighbors.length) {\n edgeIndices[currentNode] = currentEdgeIndex + 1;\n const nextNode = neighbors[currentEdgeIndex] ?? 0;\n if (visited[nextNode] === 0) {\n visited[nextNode] = 1;\n callStack.push(nextNode);\n }\n } else {\n callStack.pop();\n finishStack.push(currentNode);\n }\n}\n","import { processStackTop } from './_utils/process-stack-top/index.js';\n\nexport function computeFinishStack(\n nodeCount: number,\n adjacency: readonly (readonly number[])[]\n): readonly number[] {\n const visited = new Uint8Array(nodeCount);\n const edgeIndices = new Int32Array(nodeCount);\n const finishStack: number[] = [];\n\n for (let root = 0; root < nodeCount; root += 1) {\n if (visited[root] === 1) {\n continue;\n }\n visited[root] = 1;\n const callStack = [root];\n\n while (callStack.length > 0) {\n processStackTop(callStack, edgeIndices, adjacency, visited, finishStack);\n }\n }\n\n return finishStack;\n}\n","import { buildTransposeGraph } from './_utils/build-transpose-graph/index.js';\nimport { collectSccComponent } from './_utils/collect-scc-component/index.js';\nimport { computeFinishStack } from './_utils/compute-finish-stack/index.js';\n\nexport function computeSccs(\n nodeCount: number,\n adjacency: readonly (readonly number[])[]\n): readonly (readonly number[])[] {\n const finishStack = computeFinishStack(nodeCount, adjacency);\n const revAdjacency = buildTransposeGraph(nodeCount, adjacency);\n const visited = new Uint8Array(nodeCount);\n const sccs: (readonly number[])[] = [];\n\n for (let index = finishStack.length - 1; index >= 0; index -= 1) {\n const root = finishStack[index];\n if (root !== undefined && visited[root] === 0) {\n sccs.push(collectSccComponent(root, revAdjacency, visited));\n }\n }\n\n return sccs;\n}\n","import type { TEffectiveRootFragment } from '../../../../../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nexport function flattenRootFragments(\n fragments: readonly TEffectiveRootFragment[]\n): readonly TEffectiveRootFragment[] {\n const all: TEffectiveRootFragment[] = [];\n const queue = [...fragments];\n let current = queue.shift();\n while (current !== undefined) {\n all.push(current);\n for (const sub of current.subRootFragments) {\n queue.push(sub);\n }\n current = queue.shift();\n }\n return all;\n}\n","import type { TEffectiveRootFragment } from '../../../../../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nexport function populateRootAuthAdjacency(\n allRootFragments: readonly TEffectiveRootFragment[],\n pathToIndex: ReadonlyMap<string, number>,\n nodeToFragmentPath: ReadonlyMap<string, string>,\n adjacency: number[][],\n seenEdges: Set<string>\n): void {\n for (const fragment of allRootFragments) {\n const u = pathToIndex.get(fragment.path);\n if (u === undefined) {\n continue;\n }\n for (const pair of fragment.dependencyPairs) {\n const targetFragPath = nodeToFragmentPath.get(pair.to);\n const v =\n targetFragPath === undefined\n ? undefined\n : pathToIndex.get(targetFragPath);\n if (v === undefined || u === v || seenEdges.has(`${u}\\0${v}`)) {\n continue;\n }\n seenEdges.add(`${u}\\0${v}`);\n adjacency[u]?.push(v);\n }\n }\n}\n","import type { TEffectiveTree } from '../../../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TRootAuthGraph } from './build-root-auth-graph.type.js';\n\nimport { compareOrdinal } from '../../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { flattenRootFragments } from './_utils/flatten-root-fragments/index.js';\nimport { populateRootAuthAdjacency } from './_utils/populate-root-auth-adjacency/index.js';\n\nexport function buildRootAuthGraph(\n trees: readonly TEffectiveTree[]\n): TRootAuthGraph {\n const allRootFragments = flattenRootFragments(\n trees.flatMap((tree) => tree.rootFragments)\n );\n\n const rawPaths = [...new Set(allRootFragments.map((f) => f.path))];\n const sortedPaths = [...rawPaths];\n sortedPaths.sort(compareOrdinal);\n const fragCount = sortedPaths.length;\n\n const pathToIndex = new Map<string, number>();\n for (const [index, p] of sortedPaths.entries()) {\n pathToIndex.set(p, index);\n }\n\n const nodeToFragmentPath = new Map<string, string>();\n for (const fragment of allRootFragments) {\n for (const node of fragment.rootNodes) {\n const fullPath = `${fragment.path}/${node.name}`;\n nodeToFragmentPath.set(fullPath, fragment.path);\n }\n }\n\n const adjacency: number[][] = Array.from({ length: fragCount }, () => []);\n const seenEdges = new Set<string>();\n\n populateRootAuthAdjacency(\n allRootFragments,\n pathToIndex,\n nodeToFragmentPath,\n adjacency,\n seenEdges\n );\n\n return {\n adjacency,\n allRootFragments,\n fragCount,\n fragmentPaths: sortedPaths,\n nodeToFragmentPath,\n };\n}\n","import type { TAcyclicityOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nexport function isRootCycleExercised(\n fragmentNames: readonly string[],\n dependencyCycles: readonly TAcyclicityOutcome[],\n nodeToFragmentPath: ReadonlyMap<string, string>\n): boolean {\n const fragmentSet = new Set(fragmentNames);\n for (const outcome of dependencyCycles) {\n const cycleNodes = outcome.cycle[0] ?? [];\n const cycleFragments = new Set<string>();\n for (const node of cycleNodes) {\n const fragment = nodeToFragmentPath.get(node);\n if (fragment !== undefined && fragmentSet.has(fragment)) {\n cycleFragments.add(fragment);\n }\n }\n if (cycleFragments.size >= 2) {\n return true;\n }\n }\n return false;\n}\n","export function selectMinElement(elements: readonly string[]): string {\n const [first = ''] = elements;\n return first;\n}\n","import type {\n TAcyclicityOutcome,\n TUnverifiedOutcome,\n} from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { computeSccs } from '../../../../_acyclicity@shared/_utils/compute-sccs/index.js';\nimport { buildRootAuthGraph } from './_utils/build-root-auth-graph/index.js';\nimport { isRootCycleExercised } from './_utils/is-root-cycle-exercised/index.js';\nimport { selectMinElement } from './_utils/select-min-element/index.js';\n\nexport function checkRootAuthorizations(\n model: TVerificationModel,\n dependencyCycles: readonly TAcyclicityOutcome[]\n): readonly TUnverifiedOutcome[] {\n const { adjacency, fragCount, fragmentPaths, nodeToFragmentPath } =\n buildRootAuthGraph(model.basis.declarations.trees);\n if (fragCount < 2) {\n return [];\n }\n\n const sccs = computeSccs(fragCount, adjacency);\n const cyclicFragSccs = sccs.filter((c) => c.length >= 2);\n if (cyclicFragSccs.length === 0) {\n return [];\n }\n\n const outcomes: TUnverifiedOutcome[] = [];\n\n for (const component of cyclicFragSccs) {\n const names = fragmentPaths.filter((_, index) => component.includes(index));\n names.sort(compareOrdinal);\n\n if (isRootCycleExercised(names, dependencyCycles, nodeToFragmentPath)) {\n continue;\n }\n\n const minPath = selectMinElement(names);\n outcomes.push(\n createOutcome('unverified/cyclic-root-authorization', {\n element: minPath,\n reason: 'cyclic-root-authorization',\n })\n );\n }\n\n return outcomes;\n}\n","export function isAuthEdgeValid(\n u: number,\n v: number,\n seenEdges: ReadonlySet<string>\n): boolean {\n if (u === v) {\n return false;\n }\n const key = `${u}\\0${v}`;\n return !seenEdges.has(key);\n}\n","import type { TEffectiveTree } from '../../../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TTreeAuthGraph } from './build-tree-auth-graph.type.js';\n\nimport { compareOrdinal } from '../../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { isAuthEdgeValid } from './_utils/is-auth-edge-valid/index.js';\n\nexport function buildTreeAuthGraph(\n trees: readonly TEffectiveTree[]\n): TTreeAuthGraph {\n const treeOrigins = trees.map((t) => t.originPath);\n const sortedOrigins = [...treeOrigins];\n sortedOrigins.sort(compareOrdinal);\n const treeCount = sortedOrigins.length;\n\n const originToIndex = new Map<string, number>();\n for (const [index, origin] of sortedOrigins.entries()) {\n originToIndex.set(origin, index);\n }\n\n const adjacency: number[][] = Array.from({ length: treeCount }, () => []);\n const seenEdges = new Set<string>();\n\n for (const tree of trees) {\n for (const pair of tree.treeDependencyPairs) {\n const u = originToIndex.get(pair.from);\n const v = originToIndex.get(pair.to);\n if (\n u === undefined ||\n v === undefined ||\n !isAuthEdgeValid(u, v, seenEdges)\n ) {\n continue;\n }\n seenEdges.add(`${u}\\0${v}`);\n adjacency[u]?.push(v);\n }\n }\n\n return {\n adjacency,\n originToIndex,\n sortedOrigins,\n treeCount,\n };\n}\n","import type { TAcyclicityOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nexport function isTreeCycleExercised(\n originNames: readonly string[],\n interTreeCycles: readonly TAcyclicityOutcome[],\n fileToTreeOrigin: ReadonlyMap<string, string>\n): boolean {\n const originSet = new Set(originNames);\n\n function recordSegmentTrees(\n segment: readonly string[],\n cycleTrees: Set<string>\n ): void {\n const first = segment[0];\n const last = segment.at(-1);\n if (first !== undefined) {\n const src = fileToTreeOrigin.get(first);\n if (src !== undefined && originSet.has(src)) {\n cycleTrees.add(src);\n }\n }\n if (last === undefined) {\n return;\n }\n const destination = fileToTreeOrigin.get(last);\n if (destination !== undefined && originSet.has(destination)) {\n cycleTrees.add(destination);\n }\n }\n\n for (const outcome of interTreeCycles) {\n const cycleTrees = new Set<string>();\n for (const segment of outcome.cycle) {\n recordSegmentTrees(segment, cycleTrees);\n }\n if (cycleTrees.size >= 2) {\n return true;\n }\n }\n\n return false;\n}\n","export function selectMinElement(elements: readonly string[]): string {\n const [first = ''] = elements;\n return first;\n}\n","import type {\n TAcyclicityOutcome,\n TUnverifiedOutcome,\n} from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { computeSccs } from '../../../../_acyclicity@shared/_utils/compute-sccs/index.js';\nimport { buildTreeAuthGraph } from './_utils/build-tree-auth-graph/index.js';\nimport { isTreeCycleExercised } from './_utils/is-tree-cycle-exercised/index.js';\nimport { selectMinElement } from './_utils/select-min-element/index.js';\n\nexport function checkTreeAuthorizations(\n model: TVerificationModel,\n interTreeCycles: readonly TAcyclicityOutcome[]\n): readonly TUnverifiedOutcome[] {\n const { adjacency, sortedOrigins, treeCount } = buildTreeAuthGraph(\n model.basis.declarations.trees\n );\n if (treeCount < 2) {\n return [];\n }\n\n const sccs = computeSccs(treeCount, adjacency);\n const cyclicTreeSccs = sccs.filter((c) => c.length >= 2);\n if (cyclicTreeSccs.length === 0) {\n return [];\n }\n\n const fileToTreeOrigin = new Map<string, string>();\n for (const item of model.basis.inventory.items) {\n if (item.treeOrigin !== null) {\n fileToTreeOrigin.set(item.path, item.treeOrigin);\n }\n }\n\n const outcomes: TUnverifiedOutcome[] = [];\n\n for (const component of cyclicTreeSccs) {\n const originNames = sortedOrigins.filter((_, index) =>\n component.includes(index)\n );\n originNames.sort(compareOrdinal);\n\n if (isTreeCycleExercised(originNames, interTreeCycles, fileToTreeOrigin)) {\n continue;\n }\n\n const minOrigin = selectMinElement(originNames);\n outcomes.push(\n createOutcome('unverified/cyclic-tree-authorization', {\n element: minOrigin,\n reason: 'cyclic-tree-authorization',\n })\n );\n }\n\n return outcomes;\n}\n","import type {\n TAcyclicityOutcome,\n TUnverifiedOutcome,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { checkRootAuthorizations } from './_utils/check-root-authorizations/index.js';\nimport { checkTreeAuthorizations } from './_utils/check-tree-authorizations/index.js';\n\nexport function checkCyclicAuthorizations(\n model: TVerificationModel,\n interTreeCycles: readonly TAcyclicityOutcome[],\n dependencyCycles: readonly TAcyclicityOutcome[]\n): readonly TUnverifiedOutcome[] {\n const treeOutcomes = checkTreeAuthorizations(model, interTreeCycles);\n const rootOutcomes = checkRootAuthorizations(model, dependencyCycles);\n const all = [...treeOutcomes, ...rootOutcomes];\n all.sort((left, right) => compareOrdinal(left.element, right.element));\n return all;\n}\n","import type { TVerificationModel } from '../../../../../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { compareOrdinal } from '../../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function collectLogicalNodePaths(\n model: TVerificationModel\n): readonly string[] {\n const logicalPaths: string[] = [];\n for (const item of model.basis.inventory.items) {\n if (item.kind !== 'file' || item.treeOrigin === null) {\n continue;\n }\n const classification = model.taxonomy.byItemId.get(item.id);\n if (\n classification !== undefined &&\n classification.nodeKind !== null &&\n classification.nodeKind !== 'foreign-node'\n ) {\n logicalPaths.push(item.path);\n }\n }\n const sorted = [...logicalPaths];\n sorted.sort(compareOrdinal);\n return sorted;\n}\n","export function deduplicateNeighborRow(\n row: readonly number[]\n): readonly number[] {\n const sorted = [...row];\n sorted.sort((a, b) => a - b);\n const deduped: number[] = [];\n for (const neighbor of sorted) {\n if (deduped.at(-1) !== neighbor) {\n deduped.push(neighbor);\n }\n }\n return deduped;\n}\n","import type { TEdgeMetadata } from '../../../../../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\n\nexport function populateAdjacencyEdges(\n edgeMetadata: readonly TEdgeMetadata[],\n pathToIndex: ReadonlyMap<string, number>,\n adjacency: number[][],\n revAdjacency: number[][],\n selfLoopSet: Set<number>,\n edgeBySourceAndDestination: Map<string, TEdgeMetadata>\n): void {\n for (const edge of edgeMetadata) {\n const u = pathToIndex.get(edge.sourcePath);\n const v = pathToIndex.get(edge.destinationPath);\n if (u === undefined || v === undefined) {\n continue;\n }\n const key = `${edge.sourcePath}\\0${edge.destinationPath}`;\n if (!edgeBySourceAndDestination.has(key)) {\n edgeBySourceAndDestination.set(key, edge);\n }\n if (u === v) {\n selfLoopSet.add(u);\n } else {\n adjacency[u]?.push(v);\n revAdjacency[v]?.push(u);\n }\n }\n}\n","import type { TEdgeMetadata } from '../../../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TVerificationModel } from '../../../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type { TDependencyGraphIndex } from './build-dependency-graph-index.type.js';\n\nimport { collectLogicalNodePaths } from './_utils/collect-logical-node-paths/index.js';\nimport { deduplicateNeighborRow } from './_utils/deduplicate-neighbor-row/index.js';\nimport { populateAdjacencyEdges } from './_utils/populate-adjacency-edges/index.js';\n\nexport function buildDependencyGraphIndex(\n model: TVerificationModel\n): TDependencyGraphIndex {\n const logicalPaths = collectLogicalNodePaths(model);\n const nodeCount = logicalPaths.length;\n\n const pathToIndex = new Map<string, number>();\n for (const [index, p] of logicalPaths.entries()) {\n pathToIndex.set(p, index);\n }\n\n const adjacency: number[][] = Array.from({ length: nodeCount }, () => []);\n const revAdjacency: number[][] = Array.from({ length: nodeCount }, () => []);\n const selfLoopSet = new Set<number>();\n const edgeBySourceAndDestination = new Map<string, TEdgeMetadata>();\n\n populateAdjacencyEdges(\n model.graph.edgeMetadata,\n pathToIndex,\n adjacency,\n revAdjacency,\n selfLoopSet,\n edgeBySourceAndDestination\n );\n\n const cleanAdjacency: (readonly number[])[] = [];\n const cleanRevAdjacency: (readonly number[])[] = [];\n\n for (const row of adjacency) {\n cleanAdjacency.push(deduplicateNeighborRow(row));\n }\n\n for (const revRow of revAdjacency) {\n cleanRevAdjacency.push(deduplicateNeighborRow(revRow));\n }\n\n return {\n adjacency: cleanAdjacency,\n edgeBySourceAndDestination,\n logicalPaths,\n nodeCount,\n revAdjacency: cleanRevAdjacency,\n selfLoopSet,\n };\n}\n","export function buildWitnessPayload(witness: readonly string[]): {\n readonly element: string;\n readonly secondNode: string;\n readonly witness: readonly string[];\n} {\n return {\n element: witness[0] ?? '',\n secondNode: witness[1] ?? '',\n witness,\n };\n}\n","import { compareOrdinal } from '../../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function comparePaths(\n left: readonly string[],\n right: readonly string[]\n): number {\n const leftCopy = [...left];\n const rightCopy = [...right];\n let l = leftCopy.shift();\n let r = rightCopy.shift();\n while (l !== undefined && r !== undefined) {\n const cmp = compareOrdinal(l, r);\n if (cmp !== 0) {\n return cmp;\n }\n l = leftCopy.shift();\n r = rightCopy.shift();\n }\n return left.length - right.length;\n}\n","export function findSelfLoopWitness(\n sortedComponent: readonly number[],\n selfLoopSet: ReadonlySet<number>,\n indexToPath: readonly string[]\n): null | readonly string[] {\n for (const nodeIndex of sortedComponent) {\n if (selfLoopSet.has(nodeIndex)) {\n const pathString = indexToPath[nodeIndex];\n return pathString === undefined ? null : [pathString, pathString];\n }\n }\n return null;\n}\n","import { buildWitnessPayload } from './_utils/build-witness-payload/index.js';\nimport { comparePaths } from './_utils/compare-paths/index.js';\nimport { findSelfLoopWitness } from './_utils/find-self-loop-witness/index.js';\n\nexport function findCycleWitness(\n component: readonly number[],\n selfLoopSet: ReadonlySet<number>,\n adjacency: readonly (readonly number[])[],\n indexToPath: readonly string[],\n nodeCount: number\n): null | {\n readonly element: string;\n readonly secondNode: string;\n readonly witness: readonly string[];\n} {\n type TBfsState = {\n bestCycle: null | readonly string[];\n bestLength: number;\n };\n\n function reconstructCyclePath(\n start: number,\n lastNode: number,\n parent: Int32Array\n ): readonly string[] {\n const reversedNodes: string[] = [];\n let trace = lastNode;\n while (trace !== start && trace !== -1) {\n const p = indexToPath[trace];\n if (p !== undefined) {\n reversedNodes.push(p);\n }\n const nextTrace = parent[trace];\n trace = nextTrace ?? -1;\n }\n const startPath = indexToPath[start];\n if (startPath !== undefined) {\n reversedNodes.push(startPath);\n }\n reversedNodes.reverse();\n if (startPath !== undefined) {\n reversedNodes.push(startPath);\n }\n return reversedNodes;\n }\n\n function evaluateCycleCandidate(\n start: number,\n currentNode: number,\n currentDepth: number,\n parent: Int32Array,\n state: TBfsState\n ): void {\n const cycleLength = currentDepth + 1;\n const candidate = reconstructCyclePath(start, currentNode, parent);\n if (cycleLength < state.bestLength) {\n state.bestLength = cycleLength;\n state.bestCycle = candidate;\n return;\n }\n if (\n state.bestCycle === null ||\n comparePaths(candidate, state.bestCycle) < 0\n ) {\n state.bestCycle = candidate;\n }\n }\n\n function exploreBfsNeighbors(\n currentNode: number,\n start: number,\n currentDepth: number,\n depth: Int32Array,\n parent: Int32Array,\n queue: number[],\n state: TBfsState\n ): void {\n const neighbors = adjacency[currentNode] ?? [];\n\n for (const nextNode of neighbors) {\n if (!componentSet.has(nextNode) || nextNode < start) {\n continue;\n }\n if (nextNode === start) {\n evaluateCycleCandidate(start, currentNode, currentDepth, parent, state);\n } else {\n const recordedDepth = depth[nextNode];\n if (recordedDepth === -1) {\n depth[nextNode] = currentDepth + 1;\n parent[nextNode] = currentNode;\n queue.push(nextNode);\n }\n }\n }\n }\n\n function runBfsFromStart(start: number, state: TBfsState): void {\n const depth = new Int32Array(nodeCount);\n depth.fill(-1);\n const parent = new Int32Array(nodeCount);\n parent.fill(-1);\n\n const queue: number[] = [start];\n depth[start] = 0;\n let queueHead = 0;\n\n while (queueHead < queue.length) {\n const currentNode = queue[queueHead] ?? 0;\n queueHead += 1;\n const currentDepth = depth[currentNode] ?? 0;\n if (currentDepth >= state.bestLength) {\n break;\n }\n exploreBfsNeighbors(\n currentNode,\n start,\n currentDepth,\n depth,\n parent,\n queue,\n state\n );\n }\n }\n\n const selfLoopWitness = findSelfLoopWitness(\n component,\n selfLoopSet,\n indexToPath\n );\n if (selfLoopWitness !== null) {\n return buildWitnessPayload(selfLoopWitness);\n }\n\n if (component.length <= 1) {\n return null;\n }\n\n const componentSet = new Set(component);\n const state: TBfsState = {\n bestCycle: null,\n bestLength: component.length,\n };\n\n for (const start of component) {\n runBfsFromStart(start, state);\n }\n\n return state.bestCycle === null ? null : buildWitnessPayload(state.bestCycle);\n}\n","import type { TAcyclicityOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { computeSccs } from '../../_acyclicity@shared/_utils/compute-sccs/index.js';\nimport { buildDependencyGraphIndex } from './_utils/build-dependency-graph-index/index.js';\nimport { findCycleWitness } from './_utils/find-cycle-witness/index.js';\n\nexport function checkDependencyCycles(\n model: TVerificationModel\n): readonly TAcyclicityOutcome[] {\n const index = buildDependencyGraphIndex(model);\n if (index.nodeCount === 0) {\n return [];\n }\n\n const sccs = computeSccs(index.nodeCount, index.adjacency);\n const outcomes: TAcyclicityOutcome[] = [];\n\n for (const component of sccs) {\n const witnessResult = findCycleWitness(\n component,\n index.selfLoopSet,\n index.adjacency,\n index.logicalPaths,\n index.nodeCount\n );\n if (witnessResult === null) {\n continue;\n }\n const edge = index.edgeBySourceAndDestination.get(\n `${witnessResult.element}\\0${witnessResult.secondNode}`\n );\n outcomes.push(\n createOutcome('acyclicity/dependency-cycle', {\n cycle: [witnessResult.witness],\n element: witnessResult.element,\n position: edge?.position,\n })\n );\n }\n\n outcomes.sort((left, right) => compareOrdinal(left.element, right.element));\n return outcomes;\n}\n","import { compareOrdinal } from '../../../../../../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function compareSegmentElements(\n left: readonly string[],\n right: readonly string[]\n): number {\n const leftCopy = [...left];\n const rightCopy = [...right];\n let l = leftCopy.shift();\n let r = rightCopy.shift();\n while (l !== undefined && r !== undefined) {\n const cmp = compareOrdinal(l, r);\n if (cmp !== 0) {\n return cmp;\n }\n l = leftCopy.shift();\n r = rightCopy.shift();\n }\n return left.length - right.length;\n}\n","import { compareOrdinal } from '../../../../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSegmentElements } from './_utils/compare-segment-elements/index.js';\n\nexport function compareSegments(\n left: readonly string[],\n right: readonly string[]\n): number {\n const leftSource = left[0] ?? '';\n const rightSource = right[0] ?? '';\n const sourceComparison = compareOrdinal(leftSource, rightSource);\n if (sourceComparison !== 0) {\n return sourceComparison;\n }\n\n const leftDestination = left.at(-1) ?? '';\n const rightDestination = right.at(-1) ?? '';\n const destinationComparison = compareOrdinal(\n leftDestination,\n rightDestination\n );\n return destinationComparison === 0\n ? compareSegmentElements(left, right)\n : destinationComparison;\n}\n","import type { TSourceLocation } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type { TTransition } from './populate-tree-transitions.type.js';\n\nimport { compareSegments } from './_utils/compare-segments/index.js';\n\nexport function populateTreeTransitions(\n model: TVerificationModel,\n fileToTreeIndex: ReadonlyMap<string, number>,\n transitions: (null | TTransition)[][]\n): void {\n const registerTransition = (\n sourceTreeIndex: number,\n destinationTreeIndex: number,\n segment: readonly string[],\n position?: TSourceLocation\n ): void => {\n const current = transitions[sourceTreeIndex]?.[destinationTreeIndex];\n if (\n current !== null &&\n current !== undefined &&\n compareSegments(segment, current.segment) >= 0\n ) {\n return;\n }\n const row = transitions[sourceTreeIndex];\n if (row !== undefined) {\n row[destinationTreeIndex] = { position, segment };\n }\n };\n\n for (const edge of model.graph.edgeMetadata) {\n const sourceTreeIndex = fileToTreeIndex.get(edge.sourcePath);\n const destinationTreeIndex = fileToTreeIndex.get(edge.destinationPath);\n if (\n sourceTreeIndex !== undefined &&\n destinationTreeIndex !== undefined &&\n sourceTreeIndex !== destinationTreeIndex\n ) {\n registerTransition(\n sourceTreeIndex,\n destinationTreeIndex,\n [edge.sourcePath, edge.destinationPath],\n edge.position\n );\n }\n }\n\n for (const crossing of model.crossings) {\n const sourceTreeIndex = fileToTreeIndex.get(crossing.sourcePath);\n const destinationTreeIndex = fileToTreeIndex.get(crossing.destinationPath);\n if (\n sourceTreeIndex !== undefined &&\n destinationTreeIndex !== undefined &&\n sourceTreeIndex !== destinationTreeIndex\n ) {\n registerTransition(\n sourceTreeIndex,\n destinationTreeIndex,\n crossing.chain,\n crossing.position\n );\n }\n }\n}\n","import type { TVerificationModel } from '../../../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type {\n TQuotientGraph,\n TTransition,\n} from './build-quotient-graph.type.js';\n\nimport { compareOrdinal } from '../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { populateTreeTransitions } from './_utils/populate-tree-transitions/index.js';\n\nexport function buildQuotientGraph(model: TVerificationModel): TQuotientGraph {\n const treeOrigins = model.basis.declarations.trees.map((t) => t.originPath);\n const sortedOrigins = [...treeOrigins];\n sortedOrigins.sort(compareOrdinal);\n const treeCount = sortedOrigins.length;\n\n const originToIndex = new Map<string, number>();\n for (let index = 0; index < treeCount; index += 1) {\n const origin = sortedOrigins[index];\n if (origin !== undefined) {\n originToIndex.set(origin, index);\n }\n }\n\n const fileToTreeIndex = new Map<string, number>();\n for (const item of model.basis.inventory.items) {\n if (item.treeOrigin === null) {\n continue;\n }\n const treeIndex = originToIndex.get(item.treeOrigin);\n if (treeIndex !== undefined) {\n fileToTreeIndex.set(item.path, treeIndex);\n }\n }\n\n const transitions: (null | TTransition)[][] = Array.from(\n { length: treeCount },\n () => Array.from({ length: treeCount }, () => null)\n );\n\n populateTreeTransitions(model, fileToTreeIndex, transitions);\n\n const adjacency: number[][] = Array.from({ length: treeCount }, () => []);\n\n for (let u = 0; u < treeCount; u += 1) {\n for (let v = 0; v < treeCount; v += 1) {\n if (u !== v && transitions[u]?.[v] !== null) {\n adjacency[u]?.push(v);\n }\n }\n }\n\n return {\n adjacency,\n originToIndex,\n transitions,\n treeCount,\n treeOrigins: sortedOrigins,\n };\n}\n","import type { TSourceLocation } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nexport function buildTreePathWitness(\n treePath: readonly number[],\n transitions: readonly (readonly (null | {\n readonly position?: TSourceLocation;\n readonly segment: readonly string[];\n })[])[]\n): null | {\n readonly position?: TSourceLocation;\n readonly witness: readonly (readonly string[])[];\n} {\n const witness: (readonly string[])[] = [];\n let firstPosition: TSourceLocation | undefined;\n\n for (let index = 0; index < treePath.length - 1; index += 1) {\n const u = treePath[index];\n const v = treePath[index + 1];\n if (u === undefined || v === undefined) {\n return null;\n }\n const transition = transitions[u]?.[v];\n if (transition === null || transition === undefined) {\n return null;\n }\n if (index === 0) {\n firstPosition = transition.position;\n }\n witness.push(transition.segment);\n }\n\n return { position: firstPosition, witness };\n}\n","import { compareOrdinal } from '../../../../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function compareWitnessSegment(\n leftSegment: readonly string[],\n rightSegment: readonly string[]\n): number {\n const sourceComparison = compareOrdinal(\n leftSegment[0] ?? '',\n rightSegment[0] ?? ''\n );\n return sourceComparison === 0\n ? compareOrdinal(leftSegment.at(-1) ?? '', rightSegment.at(-1) ?? '')\n : sourceComparison;\n}\n","import { compareWitnessSegment } from './_utils/compare-witness-segment/index.js';\n\nexport function compareTreeWitnesses(\n left: readonly (readonly string[])[],\n right: readonly (readonly string[])[]\n): number {\n const leftCopy = [...left];\n const rightCopy = [...right];\n let l = leftCopy.shift();\n let r = rightCopy.shift();\n while (l !== undefined && r !== undefined) {\n const cmp = compareWitnessSegment(l, r);\n if (cmp !== 0) {\n return cmp;\n }\n l = leftCopy.shift();\n r = rightCopy.shift();\n }\n return left.length - right.length;\n}\n","export function reconstructTreeCycle(\n start: number,\n lastNode: number,\n parent: Int32Array\n): readonly number[] {\n const reversedTrees: number[] = [];\n let trace = lastNode;\n while (trace !== start && trace !== -1) {\n reversedTrees.push(trace);\n trace = parent[trace] ?? -1;\n }\n reversedTrees.push(start);\n reversedTrees.reverse();\n reversedTrees.push(start);\n return reversedTrees;\n}\n","import type { TSourceLocation } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { buildTreePathWitness } from './_utils/build-tree-path-witness/index.js';\nimport { compareTreeWitnesses } from './_utils/compare-tree-witnesses/index.js';\nimport { reconstructTreeCycle } from './_utils/reconstruct-tree-cycle/index.js';\n\nexport function findInterTreeWitness(\n component: readonly number[],\n adjacency: readonly (readonly number[])[],\n transitions: readonly (readonly (null | {\n readonly position?: TSourceLocation;\n readonly segment: readonly string[];\n })[])[],\n treeCount: number\n): null | {\n readonly element: string;\n readonly position?: TSourceLocation;\n readonly witness: readonly (readonly string[])[];\n} {\n type TTreeBfsState = {\n bestLength: number;\n bestPosition?: TSourceLocation;\n bestWitness: null | readonly (readonly string[])[];\n };\n\n if (component.length < 2) {\n return null;\n }\n\n const componentSet = new Set(component);\n\n function evaluateTreeCycle(\n start: number,\n currentNode: number,\n currentDepth: number,\n parent: Int32Array,\n state: TTreeBfsState\n ): void {\n const cycleLength = currentDepth + 1;\n const treePath = reconstructTreeCycle(start, currentNode, parent);\n const built = buildTreePathWitness(treePath, transitions);\n if (built === null) {\n return;\n }\n if (cycleLength < state.bestLength) {\n state.bestLength = cycleLength;\n state.bestWitness = built.witness;\n state.bestPosition = built.position;\n return;\n }\n if (\n state.bestWitness !== null &&\n compareTreeWitnesses(built.witness, state.bestWitness) >= 0\n ) {\n return;\n }\n state.bestWitness = built.witness;\n state.bestPosition = built.position;\n }\n\n function exploreTreeNeighbors(\n currentNode: number,\n start: number,\n currentDepth: number,\n depth: Int32Array,\n parent: Int32Array,\n queue: number[],\n state: TTreeBfsState\n ): void {\n const neighbors = adjacency[currentNode] ?? [];\n\n for (const nextNode of neighbors) {\n if (!componentSet.has(nextNode) || nextNode < start) {\n continue;\n }\n if (nextNode === start) {\n evaluateTreeCycle(start, currentNode, currentDepth, parent, state);\n } else {\n const recordedDepth = depth[nextNode];\n if (recordedDepth === -1) {\n depth[nextNode] = currentDepth + 1;\n parent[nextNode] = currentNode;\n queue.push(nextNode);\n }\n }\n }\n }\n\n function runTreeBfsFromStart(start: number, state: TTreeBfsState): void {\n const depth = new Int32Array(treeCount);\n depth.fill(-1);\n const parent = new Int32Array(treeCount);\n parent.fill(-1);\n\n const queue: number[] = [start];\n depth[start] = 0;\n let queueHead = 0;\n\n while (queueHead < queue.length) {\n const currentNode = queue[queueHead] ?? 0;\n queueHead += 1;\n const currentDepth = depth[currentNode] ?? 0;\n if (currentDepth >= state.bestLength) {\n break;\n }\n exploreTreeNeighbors(\n currentNode,\n start,\n currentDepth,\n depth,\n parent,\n queue,\n state\n );\n }\n }\n\n const state: TTreeBfsState = {\n bestLength: component.length,\n bestWitness: null,\n };\n\n for (const start of component) {\n runTreeBfsFromStart(start, state);\n }\n\n if (state.bestWitness === null) {\n return null;\n }\n\n const firstSegment = state.bestWitness[0] ?? [];\n const element = firstSegment[0] ?? '';\n\n return {\n element,\n position: state.bestPosition,\n witness: state.bestWitness,\n };\n}\n","import type { TAcyclicityOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { computeSccs } from '../../_acyclicity@shared/_utils/compute-sccs/index.js';\nimport { buildQuotientGraph } from './_utils/build-quotient-graph/index.js';\nimport { findInterTreeWitness } from './_utils/find-inter-tree-witness/index.js';\n\nexport function checkInterTreeCycles(\n model: TVerificationModel\n): readonly TAcyclicityOutcome[] {\n const quotientGraph = buildQuotientGraph(model);\n if (quotientGraph.treeCount < 2) {\n return [];\n }\n\n const sccs = computeSccs(quotientGraph.treeCount, quotientGraph.adjacency);\n const outcomes: TAcyclicityOutcome[] = [];\n\n for (const component of sccs) {\n const witnessResult = findInterTreeWitness(\n component,\n quotientGraph.adjacency,\n quotientGraph.transitions,\n quotientGraph.treeCount\n );\n if (witnessResult === null) {\n continue;\n }\n outcomes.push(\n createOutcome('acyclicity/inter-tree-cycle', {\n cycle: witnessResult.witness,\n element: witnessResult.element,\n position: witnessResult.position,\n })\n );\n }\n\n outcomes.sort((left, right) => compareOrdinal(left.element, right.element));\n return outcomes;\n}\n","import type { TOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { checkCyclicAuthorizations } from './_utils/check-cyclic-authorizations/index.js';\nimport { checkDependencyCycles } from './_utils/check-dependency-cycles/index.js';\nimport { checkInterTreeCycles } from './_utils/check-inter-tree-cycles/index.js';\n\nexport function verifyAcyclicity(\n model: TVerificationModel\n): readonly TOutcome[] {\n const dependencyCycles = checkDependencyCycles(model);\n const interTreeCycles = checkInterTreeCycles(model);\n const cyclicAuthorizations = checkCyclicAuthorizations(\n model,\n interTreeCycles,\n dependencyCycles\n );\n\n const outcomes: TOutcome[] = [\n ...dependencyCycles,\n ...interTreeCycles,\n ...cyclicAuthorizations,\n ];\n\n outcomes.sort((left, right) => {\n const elementComparison = compareOrdinal(left.element, right.element);\n return elementComparison === 0\n ? compareOrdinal(left.constraint, right.constraint)\n : elementComparison;\n });\n\n return outcomes;\n}\n","import type {\n TItemClassification,\n TTaxonomyModel,\n} from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function isViolatingFragmentsForm(\n classification: TItemClassification,\n taxonomy: TTaxonomyModel,\n inventory: TInventory,\n trees: readonly TEffectiveTree[]\n): boolean {\n if (\n classification.entryKind !== 'file' ||\n classification.nodeKind === null ||\n classification.nodeKind === 'foreign-node'\n ) {\n return false;\n }\n\n const item = inventory.items[classification.itemId];\n if (\n item === undefined ||\n typeof item.parentId !== 'number' ||\n item.treeOrigin === null\n ) {\n return false;\n }\n const parent = taxonomy.byItemId.get(item.parentId);\n if (typeof parent?.imposedRoleName !== 'string') {\n return false;\n }\n const tree = trees.find((t) => t.originPath === item.treeOrigin);\n if (tree === undefined) {\n return false;\n }\n\n const parentRole = tree.catalog.roles.find(\n (r) => r.name === parent.imposedRoleName\n );\n if (parentRole?.form !== 'fragments') {\n return false;\n }\n\n const hasParentViolation = (): boolean => {\n if (parent.domainKind === 'category') {\n const isMimetic = tree.mimeticPathStructures.some((structure) =>\n structure.paths.includes(parent.path)\n );\n if (isMimetic) {\n return false;\n }\n const slashIndex = classification.path.lastIndexOf('/');\n const fileName = classification.path.slice(slashIndex + 1);\n return classification.role.kind !== 'absent' || fileName === 'index.ts';\n }\n\n return (\n parent.domainKind === 'sub-category' &&\n classification.role.kind !== 'absent'\n );\n };\n\n return hasParentViolation();\n}\n","import type {\n TItemClassification,\n TTaxonomyModel,\n} from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type {\n TEffectiveRole,\n TEffectiveTree,\n} from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function isViolatingNodeForm(\n classification: TItemClassification,\n taxonomy: TTaxonomyModel,\n inventory: TInventory,\n trees: readonly TEffectiveTree[]\n): boolean {\n if (\n classification.entryKind !== 'file' ||\n classification.nodeKind === null ||\n classification.nodeKind === 'foreign-node'\n ) {\n return false;\n }\n if (classification.role.kind === 'implicit') {\n return classification.nodeKind !== 'category-node';\n }\n\n const resolveParentRole = (): TEffectiveRole | undefined => {\n const item = inventory.items[classification.itemId];\n if (\n item === undefined ||\n typeof item.parentId !== 'number' ||\n item.treeOrigin === null\n ) {\n return undefined;\n }\n const parent = taxonomy.byItemId.get(item.parentId);\n if (parent === undefined) {\n return undefined;\n }\n const isContainer =\n parent.domainKind === 'category' || parent.domainKind === 'sub-category';\n if (!isContainer || parent.imposedRoleName === null) {\n return undefined;\n }\n const tree = trees.find(\n (candidate) => candidate.originPath === item.treeOrigin\n );\n return tree === undefined\n ? undefined\n : tree.catalog.roles.find(\n (candidate) => candidate.name === parent.imposedRoleName\n );\n };\n\n const parentRole = resolveParentRole();\n return (\n parentRole?.form === 'category-nodes' &&\n classification.nodeKind !== 'category-node'\n );\n}\n","import type { TClassificationOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { isViolatingFragmentsForm } from './_utils/is-violating-fragments-form/index.js';\nimport { isViolatingNodeForm } from './_utils/is-violating-node-form/index.js';\n\nexport function verifyCategoryRole(\n model: TVerificationModel\n): readonly TClassificationOutcome[] {\n const outcomes: TClassificationOutcome[] = [];\n const reported = new Set<string>();\n\n const report = (path: string): void => {\n if (reported.has(path)) {\n return;\n }\n reported.add(path);\n outcomes.push(\n createOutcome('classification/category-role', { element: path })\n );\n };\n\n const { inventory } = model.basis;\n const { trees } = model.basis.declarations;\n const { taxonomy } = model;\n\n for (const classification of taxonomy.classifications) {\n const isViolation =\n isViolatingNodeForm(classification, taxonomy, inventory, trees) ||\n isViolatingFragmentsForm(classification, taxonomy, inventory, trees);\n\n if (isViolation) {\n report(classification.path);\n }\n }\n\n outcomes.sort((left, right) => compareOrdinal(left.element, right.element));\n return outcomes;\n}\n","import type { TClassificationOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function verifyClassificationCompleteness(\n model: TVerificationModel\n): readonly TClassificationOutcome[] {\n const outcomes: TClassificationOutcome[] = [];\n\n for (const classification of model.taxonomy.classifications) {\n if (\n classification.entryKind === 'directory' &&\n classification.domainKind === null\n ) {\n outcomes.push(\n createOutcome('classification/unclassifiable-directory', {\n element: classification.path,\n })\n );\n }\n if (\n classification.entryKind === 'file' &&\n classification.nodeKind === null\n ) {\n outcomes.push(\n createOutcome('classification/unclassifiable-file', {\n element: classification.path,\n })\n );\n }\n }\n\n outcomes.sort((left, right) => {\n const byConstraint = compareOrdinal(left.constraint, right.constraint);\n return byConstraint === 0\n ? compareOrdinal(left.element, right.element)\n : byConstraint;\n });\n return outcomes;\n}\n","import type {\n TContainmentMatrix,\n TDirectChildType,\n} from '../_containment-matrix@shared/_types/containment-matrix.type.js';\n\nconst ACCESS_NODE: TDirectChildType = 'access-node';\nconst CATEGORY: TDirectChildType = 'category';\nconst CATEGORY_NODE: TDirectChildType = 'category-node';\nconst FOREIGN_DOMAIN: TDirectChildType = 'foreign-domain';\nconst FOREIGN_NODE: TDirectChildType = 'foreign-node';\nconst FRACTAL_BRANCH: TDirectChildType = 'fractal-branch';\nconst FRAGMENT: TDirectChildType = 'fragment';\nconst FRAGMENT_NODE: TDirectChildType = 'fragment-node';\nconst LAYER: TDirectChildType = 'layer';\nconst PATH_SUB_CATEGORY: TDirectChildType = 'path-sub-category';\nconst PRIVATE_CATEGORY: TDirectChildType = 'private-category';\nconst ROOT_FRAGMENT: TDirectChildType = 'root-fragment';\nconst ROOT_NODE: TDirectChildType = 'root-node';\nconst SUB_CATEGORY: TDirectChildType = 'sub-category';\nconst SUB_GRAPH_NODE: TDirectChildType = 'sub-graph-node';\n\nexport const CONTAINMENT_MATRIX: TContainmentMatrix = {\n category: [\n CATEGORY_NODE,\n FOREIGN_DOMAIN,\n FOREIGN_NODE,\n FRACTAL_BRANCH,\n FRAGMENT,\n SUB_CATEGORY,\n ],\n 'foreign-domain': [FOREIGN_DOMAIN, FOREIGN_NODE],\n 'fractal-branch': [CATEGORY, FOREIGN_DOMAIN, FOREIGN_NODE, LAYER],\n fragment: [\n ACCESS_NODE,\n FOREIGN_DOMAIN,\n FOREIGN_NODE,\n FRACTAL_BRANCH,\n FRAGMENT_NODE,\n PRIVATE_CATEGORY,\n SUB_GRAPH_NODE,\n ],\n layer: [CATEGORY, FOREIGN_DOMAIN, FOREIGN_NODE, FRACTAL_BRANCH, LAYER],\n 'mimetic-parent-category': [\n FOREIGN_DOMAIN,\n FOREIGN_NODE,\n FRACTAL_BRANCH,\n FRAGMENT,\n PATH_SUB_CATEGORY,\n ],\n 'root-fragment': [\n FOREIGN_DOMAIN,\n FOREIGN_NODE,\n FRACTAL_BRANCH,\n PRIVATE_CATEGORY,\n ROOT_FRAGMENT,\n ROOT_NODE,\n ],\n 'root-layer': [CATEGORY, FOREIGN_DOMAIN, FOREIGN_NODE, FRACTAL_BRANCH, LAYER],\n} as const;\n","import type {\n TItemClassification,\n TNodeKind,\n} from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type {\n TDirectChildType,\n TParentDomainType,\n} from '../../_containment-matrix@shared/_types/containment-matrix.type.js';\n\nexport function resolveChildType(\n child: TItemClassification,\n parentType: TParentDomainType\n): null | TDirectChildType {\n const resolveFileChild = (\n nodeKind: null | TNodeKind\n ): null | TDirectChildType => {\n const FRAGMENT_NODE = 'fragment-node';\n if (nodeKind === FRAGMENT_NODE || nodeKind === 'master-node') {\n return FRAGMENT_NODE;\n }\n if (nodeKind === 'unauthorized-logical-node') {\n if (parentType === 'fragment') {\n return FRAGMENT_NODE;\n }\n return parentType === 'category'\n ? 'category-node'\n : 'unauthorized-logical-node';\n }\n return nodeKind;\n };\n\n if (child.entryKind === 'file') {\n return resolveFileChild(child.nodeKind);\n }\n\n const { domainKind } = child;\n if (domainKind === 'category') {\n return child.relationalQualifications.isPrivateCategory\n ? 'private-category'\n : 'category';\n }\n return domainKind;\n}\n","import type {\n TClassificationOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TItemClassification } from '../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventoryItem } from '../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type { TParentDomainType } from './_containment-matrix@shared/_types/containment-matrix.type.js';\n\nimport { createOutcome } from '../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { CONTAINMENT_MATRIX } from './_configs/containment-matrix.config.js';\nimport { resolveChildType } from './_utils/resolve-child-type/index.js';\n\nexport function verifyContainmentMatrix(\n model: TVerificationModel\n): readonly TOutcome[] {\n const mimeticParentPaths = new Set<string>();\n const recordMimeticPath = (path: string, tree: TEffectiveTree): void => {\n const categoryName = path.split('/').at(-1) ?? '';\n const role = tree.catalog.categoryToRole.get(categoryName);\n if (role !== undefined && role.form === 'fragments') {\n mimeticParentPaths.add(path);\n }\n };\n\n for (const tree of model.basis.declarations.trees) {\n for (const structure of tree.mimeticPathStructures) {\n for (const path of structure.paths) {\n recordMimeticPath(path, tree);\n }\n }\n }\n\n const resolveParentType = (\n parent: TItemClassification\n ): null | TParentDomainType => {\n const { domainKind } = parent;\n if (domainKind === 'path-sub-category') {\n return 'mimetic-parent-category';\n }\n if (domainKind === 'category') {\n return mimeticParentPaths.has(parent.path)\n ? 'mimetic-parent-category'\n : 'category';\n }\n if (domainKind === 'sub-category') {\n return 'category';\n }\n return domainKind;\n };\n\n const verifyItem = (item: TInventoryItem): null | TClassificationOutcome => {\n if (item.parentId === null) {\n return null;\n }\n const childClassification = model.taxonomy.byItemId.get(item.id);\n const parentClassification = model.taxonomy.byItemId.get(item.parentId);\n if (\n childClassification === undefined ||\n parentClassification === undefined\n ) {\n return null;\n }\n const parentType = resolveParentType(parentClassification);\n if (parentType === null) {\n return null;\n }\n const childType = resolveChildType(childClassification, parentType);\n if (childType === null) {\n return null;\n }\n const admittedChildren = CONTAINMENT_MATRIX[parentType];\n if (admittedChildren.includes(childType)) {\n return null;\n }\n return createOutcome('classification/containment-matrix', {\n element: item.path,\n });\n };\n\n const outcomes: TClassificationOutcome[] = [];\n for (const item of model.basis.inventory.items) {\n const outcome = verifyItem(item);\n if (outcome !== null) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort((left, right) => compareOrdinal(left.element, right.element));\n\n return outcomes;\n}\n","import type { TInventoryItem } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function groupChildrenByParentId(\n items: readonly TInventoryItem[]\n): ReadonlyMap<number, readonly TInventoryItem[]> {\n const grouped = new Map<number, TInventoryItem[]>();\n for (const item of items) {\n if (item.parentId === null) {\n continue;\n }\n const siblings = grouped.get(item.parentId);\n if (siblings === undefined) {\n grouped.set(item.parentId, [item]);\n } else {\n siblings.push(item);\n }\n }\n return grouped;\n}\n","import type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TInventoryItem } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function hasStratifiedConflict(\n children: readonly TInventoryItem[],\n taxonomy: TTaxonomyModel\n): boolean {\n let hasCategories = false;\n let hasLayers = false;\n\n for (const child of children) {\n const classification = taxonomy.byItemId.get(child.id);\n const domainKind = classification?.domainKind;\n hasCategories ||= domainKind === 'category';\n hasLayers ||= domainKind === 'layer';\n }\n\n return hasCategories && hasLayers;\n}\n","import type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TInventoryItem } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function hasTaxonomicConflict(\n children: readonly TInventoryItem[],\n taxonomy: TTaxonomyModel\n): boolean {\n let hasSubCategories = false;\n let hasFragments = false;\n let hasCategoryNodes = false;\n\n for (const child of children) {\n const classification = taxonomy.byItemId.get(child.id);\n const domainKind = classification?.domainKind;\n hasSubCategories ||=\n domainKind === 'sub-category' || domainKind === 'path-sub-category';\n hasFragments ||= domainKind === 'fragment';\n hasCategoryNodes ||= classification?.nodeKind === 'category-node';\n }\n\n const subCategoryPresence = hasSubCategories ? 1 : 0;\n const fragmentPresence = hasFragments ? 1 : 0;\n const categoryNodePresence = hasCategoryNodes ? 1 : 0;\n return subCategoryPresence + fragmentPresence + categoryNodePresence > 1;\n}\n","import type {\n TClassificationOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { groupChildrenByParentId } from './_utils/group-children-by-parent-id/index.js';\nimport { hasStratifiedConflict } from './_utils/has-stratified-conflict/index.js';\nimport { hasTaxonomicConflict } from './_utils/has-taxonomic-conflict/index.js';\n\nexport function verifyExclusiveForms(\n model: TVerificationModel\n): readonly TOutcome[] {\n const mimeticPaths = new Set(\n model.basis.declarations.trees.flatMap((tree) =>\n tree.mimeticPathStructures.flatMap((structure) => structure.paths)\n )\n );\n const stratifiedDomains = new Set<null | string | undefined>([\n 'fractal-branch',\n 'layer',\n 'root-layer',\n ]);\n const taxonomicDomains = new Set<null | string | undefined>([\n 'category',\n 'sub-category',\n ]);\n const childrenByParentId = groupChildrenByParentId(\n model.basis.inventory.items\n );\n const outcomes: TClassificationOutcome[] = [];\n\n for (const item of model.basis.inventory.items) {\n const children = childrenByParentId.get(item.id);\n if (children === undefined) {\n continue;\n }\n\n const classification = model.taxonomy.byItemId.get(item.id);\n const domainKind = classification?.domainKind;\n\n const isStratified = stratifiedDomains.has(domainKind);\n const isTaxonomic =\n taxonomicDomains.has(domainKind) && !mimeticPaths.has(item.path);\n\n const hasConflict = isStratified\n ? hasStratifiedConflict(children, model.taxonomy)\n : isTaxonomic && hasTaxonomicConflict(children, model.taxonomy);\n\n if (hasConflict) {\n outcomes.push(\n createOutcome('classification/exclusive-forms', {\n element: item.path,\n })\n );\n }\n }\n\n outcomes.sort((left, right) => compareOrdinal(left.element, right.element));\n return outcomes;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type {\n TDependencyGraph,\n TEdgeMetadata,\n} from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function checkEdgeExternalDependency(\n edge: TEdgeMetadata,\n graph: TDependencyGraph,\n inventory: TInventory,\n taxonomy: TTaxonomyModel,\n authorizedPairs: ReadonlySet<string>\n): TDependencyOutcome | undefined {\n const destinationVertex = graph.pathToVertex.get(edge.destinationPath);\n const destinationNature =\n destinationVertex === undefined\n ? undefined\n : graph.vertexNatures[destinationVertex];\n if (destinationNature?.kind !== 'external-local-file') {\n return undefined;\n }\n\n const sourceVertex = graph.pathToVertex.get(edge.sourcePath);\n const sourceNature =\n sourceVertex === undefined ? undefined : graph.vertexNatures[sourceVertex];\n if (sourceNature?.kind !== 'tree-node') {\n return undefined;\n }\n\n const eligibleNodeKinds = new Set<string>([\n 'category-node',\n 'fragment-node',\n 'master-node',\n 'root-node',\n 'sub-graph-node',\n 'unauthorized-logical-node',\n ]);\n const nodeKind = taxonomy.byPath.get(edge.sourcePath)?.nodeKind;\n if (!eligibleNodeKinds.has(nodeKind ?? '')) {\n return undefined;\n }\n\n const sourceItem = inventory.items[sourceNature.inventoryId];\n const treeOrigin = sourceItem?.treeOrigin;\n if (typeof treeOrigin !== 'string') {\n return undefined;\n }\n\n const authorizationKey = `${treeOrigin}\\0${edge.sourcePath}\\0${edge.destinationPath}`;\n if (authorizedPairs.has(authorizationKey)) {\n return undefined;\n }\n\n return createOutcome('dependency/external-dependencies', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n return toComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : toComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkEdgeExternalDependency } from './_utils/check-edge-external-dependency/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifyExternalDependencies(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const { inventory } = model.basis;\n const { trees } = model.basis.declarations;\n const { graph, taxonomy } = model;\n\n const authorizedPairs = new Set<string>();\n for (const tree of trees) {\n for (const pair of tree.externalDependencyPairs) {\n authorizedPairs.add(`${tree.originPath}\\0${pair.from}\\0${pair.to}`);\n }\n }\n\n for (const edge of graph.edgeMetadata) {\n const outcome = checkEdgeExternalDependency(\n edge,\n graph,\n inventory,\n taxonomy,\n authorizedPairs\n );\n if (outcome !== undefined) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function checkEdgeIsolation(\n edge: TEdgeMetadata,\n taxonomy: TTaxonomyModel\n): TDependencyOutcome | undefined {\n const isSourceForeign =\n taxonomy.byPath.get(edge.sourcePath)?.nodeKind === 'foreign-node';\n const isDestinationForeign =\n taxonomy.byPath.get(edge.destinationPath)?.nodeKind === 'foreign-node';\n\n if (!isSourceForeign && !isDestinationForeign) {\n return undefined;\n }\n\n return createOutcome('dependency/foreign-node-isolation', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n return toComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : toComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkEdgeIsolation } from './_utils/check-edge-isolation/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifyForeignNodeIsolation(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const taxonomy = model.taxonomy;\n\n for (const edge of model.graph.edgeMetadata) {\n const outcome = checkEdgeIsolation(edge, taxonomy);\n if (outcome !== undefined) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type {\n TInventory,\n TInventoryItem,\n} from '../../../../_types/_primitives/inventory.type.js';\n\nexport function collectAncestors(\n item: TInventoryItem,\n inventory: TInventory\n): readonly TInventoryItem[] {\n const chain: TInventoryItem[] = [];\n let current: TInventoryItem | undefined = item;\n while (current !== undefined) {\n chain.unshift(current);\n current =\n current.parentId === null ? undefined : inventory.items[current.parentId];\n }\n return chain;\n}\n","import type { TInventoryItem } from '../../../../_types/_primitives/inventory.type.js';\n\nexport function findLowestCommonAncestor(\n sourceAncestors: readonly TInventoryItem[],\n destinationAncestors: readonly TInventoryItem[]\n): number {\n if (\n sourceAncestors.length === 0 ||\n destinationAncestors.length === 0 ||\n sourceAncestors[0]?.id !== destinationAncestors[0]?.id\n ) {\n return -1;\n }\n\n const minLength = Math.min(\n sourceAncestors.length,\n destinationAncestors.length\n );\n let lcaIndex = 0;\n while (\n lcaIndex + 1 < minLength &&\n sourceAncestors[lcaIndex + 1]?.id === destinationAncestors[lcaIndex + 1]?.id\n ) {\n lcaIndex += 1;\n }\n return lcaIndex;\n}\n","import type { TTaxonomyModel } from '../../_types/_compounds/classification.type.js';\nimport type {\n TInventory,\n TInventoryItem,\n} from '../../_types/_primitives/inventory.type.js';\nimport type {\n TEdgeGeometry,\n TEdgeGeometryElement,\n} from './edge-geometry.type.js';\n\nimport { collectAncestors } from './_utils/collect-ancestors/index.js';\nimport { findLowestCommonAncestor } from './_utils/find-lowest-common-ancestor/index.js';\n\nexport function describeEdgeGeometry(\n source: TEdgeGeometryElement,\n destination: TEdgeGeometryElement,\n inventory: TInventory,\n _taxonomy?: TTaxonomyModel\n): TEdgeGeometry {\n const interTreeGeometry = (): TEdgeGeometry => ({\n descendingDomains: [],\n differentTrees: true,\n firstStepDestination: null,\n firstStepSource: null,\n isSourceInside: () => false,\n lowestCommonAncestor: null,\n sameTree: false,\n });\n\n const resolveItem = (\n element: TEdgeGeometryElement\n ): TInventoryItem | undefined => {\n if (typeof element === 'number') {\n return inventory.items[element];\n }\n if (typeof element === 'string') {\n const id = inventory.pathToId.get(element);\n return id === undefined ? undefined : inventory.items[id];\n }\n return element;\n };\n\n const sourceItem = resolveItem(source);\n const destinationItem = resolveItem(destination);\n\n if (sourceItem === undefined || destinationItem === undefined) {\n return interTreeGeometry();\n }\n\n const sourceOrigin = sourceItem.treeOrigin;\n if (sourceOrigin === null || sourceOrigin !== destinationItem.treeOrigin) {\n return interTreeGeometry();\n }\n\n const sourceAncestors = collectAncestors(sourceItem, inventory);\n const destinationAncestors = collectAncestors(destinationItem, inventory);\n\n const lcaIndex = findLowestCommonAncestor(\n sourceAncestors,\n destinationAncestors\n );\n const lowestCommonAncestor = sourceAncestors[lcaIndex];\n if (lcaIndex === -1 || lowestCommonAncestor === undefined) {\n return interTreeGeometry();\n }\n\n const firstStepSource = sourceAncestors[lcaIndex + 1] ?? null;\n const firstStepDestination = destinationAncestors[lcaIndex + 1] ?? null;\n\n const descendingDomains = destinationAncestors\n .slice(lcaIndex + 1)\n .filter((step) => step.kind === 'directory');\n\n const isSourceInside = (domain: TInventoryItem): boolean =>\n sourceItem.treeOrigin === domain.treeOrigin &&\n domain.preorderStart <= sourceItem.preorderStart &&\n sourceItem.preorderEnd <= domain.preorderEnd;\n\n return {\n descendingDomains,\n differentTrees: false,\n firstStepDestination,\n firstStepSource,\n isSourceInside,\n lowestCommonAncestor,\n sameTree: true,\n };\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type {\n TDependencyGraph,\n TEdgeMetadata,\n} from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type {\n TInventory,\n TInventoryItem,\n} from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type { TViolationPath } from './collect-branch-outcomes.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { describeEdgeGeometry } from '../../../../_verify-project@shared/_utils/edge-geometry/index.js';\n\nexport const collectBranchOutcomes = (() => {\n const FRACTAL_BRANCH = 'fractal-branch';\n\n type TCandidateSource = {\n readonly depth: number;\n readonly path: string;\n readonly vertex: number;\n };\n\n type TQueueItem = {\n readonly chain: readonly string[];\n readonly current: number;\n readonly firstEdge: TEdgeMetadata;\n };\n\n type TBfsEnvironment = {\n readonly graph: TDependencyGraph;\n readonly inventory: TInventory;\n readonly memo: Map<number, readonly TViolationPath[]>;\n readonly taxonomy: TTaxonomyModel;\n };\n\n const getFileLogicalNode = (\n itemId: number,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n ): TInventoryItem | undefined => {\n const item = inventory.items[itemId];\n if (item === undefined || item.kind !== 'file') {\n return undefined;\n }\n const classification = taxonomy.byItemId.get(itemId);\n return classification === undefined ||\n classification.nodeKind === 'foreign-node' ||\n classification.nodeKind === 'access-node'\n ? undefined\n : item;\n };\n\n const hasAncestorBranch = (\n startParentId: null | number,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n ): boolean => {\n let currentId = startParentId;\n while (currentId !== null) {\n const parentItem = inventory.items[currentId];\n if (parentItem === undefined) {\n break;\n }\n if (taxonomy.byItemId.get(parentItem.id)?.domainKind === FRACTAL_BRANCH) {\n return true;\n }\n currentId = parentItem.parentId;\n }\n return false;\n };\n\n const getCandidateSource = (\n vertex: number,\n graph: TDependencyGraph,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n ): TCandidateSource | undefined => {\n const path = graph.vertexToPath[vertex] ?? '';\n const itemId = inventory.pathToId.get(path);\n if (itemId === undefined) {\n return undefined;\n }\n const item = getFileLogicalNode(itemId, inventory, taxonomy);\n if (\n item === undefined ||\n !hasAncestorBranch(item.parentId, inventory, taxonomy)\n ) {\n return undefined;\n }\n return {\n depth: item.depth,\n path,\n vertex,\n };\n };\n\n const isEligibleDestination = (\n destinationPath: string,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n ): boolean => {\n const destinationId = inventory.pathToId.get(destinationPath);\n if (destinationId === undefined) {\n return false;\n }\n const destinationItem = inventory.items[destinationId];\n if (destinationItem === undefined || destinationItem.kind !== 'file') {\n return false;\n }\n const destinationClassification = taxonomy.byItemId.get(destinationId);\n return (\n destinationClassification !== undefined &&\n destinationClassification.nodeKind !== 'foreign-node'\n );\n };\n\n const isViolation = (\n sourcePath: string,\n destinationPath: string,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n ): boolean => {\n if (!isEligibleDestination(destinationPath, inventory, taxonomy)) {\n return false;\n }\n const geometry = describeEdgeGeometry(\n sourcePath,\n destinationPath,\n inventory,\n taxonomy\n );\n return (\n geometry.firstStepSource !== null &&\n taxonomy.byItemId.get(geometry.firstStepSource.id)?.domainKind ===\n FRACTAL_BRANCH\n );\n };\n\n const isBetterPath = (\n candidate: readonly string[],\n current: readonly string[]\n ): boolean =>\n candidate.length < current.length ||\n (candidate.length === current.length &&\n candidate.join('\\0') < current.join('\\0'));\n\n const hasCycle = (\n left: readonly string[],\n right: readonly string[]\n ): boolean => {\n const seen = new Set(left);\n return right.slice(1).some((element) => seen.has(element));\n };\n\n const sortOutgoingEdges = (\n vertex: number,\n graph: TDependencyGraph\n ): readonly number[] => {\n const start = graph.rowOffsets[vertex] ?? 0;\n const end = graph.rowOffsets[vertex + 1] ?? 0;\n const indices: number[] = [];\n for (let index = start; index < end; index += 1) {\n indices.push(index);\n }\n indices.sort((first, second) => {\n const edgeA = graph.edgeMetadata[first];\n const edgeB = graph.edgeMetadata[second];\n if (edgeA === undefined || edgeB === undefined) {\n return 0;\n }\n const toComparison = compareOrdinal(\n edgeA.destinationPath,\n edgeB.destinationPath\n );\n return toComparison === 0\n ? edgeA.importIndex - edgeB.importIndex\n : toComparison;\n });\n return indices;\n };\n\n const recordViolation = (\n next: number,\n chain: readonly string[],\n firstEdge: TEdgeMetadata,\n violations: Map<number, TViolationPath>\n ): void => {\n const existing = violations.get(next);\n if (existing === undefined || isBetterPath(chain, existing.chain)) {\n violations.set(next, {\n chain,\n firstEdge,\n targetVertex: next,\n });\n }\n };\n\n const incorporateMemoized = (\n source: TCandidateSource,\n pathToNext: readonly string[],\n initialEdge: TEdgeMetadata,\n memoized: readonly TViolationPath[],\n violations: Map<number, TViolationPath>,\n environment: TBfsEnvironment\n ): void => {\n for (const entry of memoized) {\n const destinationPath =\n environment.graph.vertexToPath[entry.targetVertex] ?? '';\n if (\n !isViolation(\n source.path,\n destinationPath,\n environment.inventory,\n environment.taxonomy\n ) ||\n hasCycle(pathToNext, entry.chain)\n ) {\n continue;\n }\n const candidateChain = [...pathToNext, ...entry.chain.slice(1)];\n recordViolation(\n entry.targetVertex,\n candidateChain,\n initialEdge,\n violations\n );\n }\n };\n\n const buildOutcome = (\n violation: TViolationPath,\n sourcePath: string\n ): TDependencyOutcome => {\n const targetPath = violation.chain.at(-1) ?? '';\n if (violation.chain.length === 2) {\n return createOutcome('dependency/fractal-branch-unidirectionality', {\n element: sourcePath,\n from: sourcePath,\n importIndex: violation.firstEdge.importIndex,\n position: violation.firstEdge.position,\n specifier: violation.firstEdge.specifier,\n to: targetPath,\n });\n }\n return createOutcome('dependency/fractal-branch-unidirectionality', {\n chain: violation.chain,\n element: sourcePath,\n from: sourcePath,\n importIndex: violation.firstEdge.importIndex,\n position: violation.firstEdge.position,\n specifier: violation.firstEdge.specifier,\n to: targetPath,\n });\n };\n\n const expandEdge = (\n edgeIndex: number,\n chainToCurrent: readonly string[],\n parentFirstEdge: TEdgeMetadata | undefined,\n queue: TQueueItem[],\n visited: Set<number>,\n violations: Map<number, TViolationPath>,\n source: TCandidateSource,\n environment: TBfsEnvironment\n ): void => {\n const next = environment.graph.columnTargets[edgeIndex];\n const edge = environment.graph.edgeMetadata[edgeIndex];\n if (next === undefined || edge === undefined) {\n return;\n }\n\n const initialEdge = parentFirstEdge ?? edge;\n const chainToNext =\n parentFirstEdge === undefined\n ? [source.path, edge.destinationPath]\n : [...chainToCurrent, edge.destinationPath];\n\n if (\n isViolation(\n source.path,\n edge.destinationPath,\n environment.inventory,\n environment.taxonomy\n )\n ) {\n recordViolation(next, chainToNext, initialEdge, violations);\n return;\n }\n\n const memoized = environment.memo.get(next);\n if (memoized !== undefined) {\n incorporateMemoized(\n source,\n chainToNext,\n initialEdge,\n memoized,\n violations,\n environment\n );\n return;\n }\n\n if (visited.has(next)) {\n return;\n }\n visited.add(next);\n queue.push({\n chain: chainToNext,\n current: next,\n firstEdge: initialEdge,\n });\n };\n\n const exploreBfs = (\n source: TCandidateSource,\n sortedEdges: readonly (readonly number[])[],\n environment: TBfsEnvironment\n ): readonly TViolationPath[] => {\n const queue: TQueueItem[] = [];\n const visited = new Set<number>([source.vertex]);\n const violations = new Map<number, TViolationPath>();\n const sourceOutgoing = sortedEdges[source.vertex] ?? [];\n\n for (const edgeIndex of sourceOutgoing) {\n expandEdge(\n edgeIndex,\n [],\n undefined,\n queue,\n visited,\n violations,\n source,\n environment\n );\n }\n\n let item = queue.shift();\n while (item !== undefined) {\n const outgoing = sortedEdges[item.current] ?? [];\n for (const edgeIndex of outgoing) {\n expandEdge(\n edgeIndex,\n item.chain,\n item.firstEdge,\n queue,\n visited,\n violations,\n source,\n environment\n );\n }\n item = queue.shift();\n }\n\n const recorded = [...violations].map(([, value]) => value);\n environment.memo.set(source.vertex, recorded);\n return recorded;\n };\n\n return function collectBranchOutcomes(\n model: TVerificationModel\n ): readonly TDependencyOutcome[] {\n const {\n basis: { inventory },\n graph,\n taxonomy,\n } = model;\n\n const sortedEdges = Array.from({ length: graph.vertexCount }, (_, vertex) =>\n sortOutgoingEdges(vertex, graph)\n );\n\n const candidateSources: TCandidateSource[] = [];\n for (let vertex = 0; vertex < graph.vertexCount; vertex += 1) {\n const source = getCandidateSource(vertex, graph, inventory, taxonomy);\n if (source !== undefined) {\n candidateSources.push(source);\n }\n }\n\n candidateSources.sort((first, second) =>\n first.depth === second.depth\n ? compareOrdinal(first.path, second.path)\n : second.depth - first.depth\n );\n\n const memo = new Map<number, readonly TViolationPath[]>();\n const environment: TBfsEnvironment = { graph, inventory, memo, taxonomy };\n const outcomes: TDependencyOutcome[] = [];\n\n for (const source of candidateSources) {\n const recorded = exploreBfs(source, sortedEdges, environment);\n for (const violation of recorded) {\n outcomes.push(buildOutcome(violation, source.path));\n }\n }\n\n return outcomes;\n };\n})();\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareBranchOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n if (toComparison !== 0) {\n return toComparison;\n }\n\n const compareChains = (\n leftChain: readonly string[] | undefined,\n rightChain: readonly string[] | undefined\n ): number => {\n if (leftChain === undefined && rightChain === undefined) {\n return 0;\n }\n if (leftChain === undefined) {\n return -1;\n }\n if (rightChain === undefined) {\n return 1;\n }\n if (leftChain.length !== rightChain.length) {\n return leftChain.length - rightChain.length;\n }\n for (const [index, element] of leftChain.entries()) {\n const segComparison = compareOrdinal(element, rightChain[index] ?? '');\n if (segComparison !== 0) {\n return segComparison;\n }\n }\n return 0;\n };\n\n const chainComparison = compareChains(left.chain, right.chain);\n return chainComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : chainComparison;\n}\n","import type { TOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { collectBranchOutcomes } from './_utils/collect-branch-outcomes/index.js';\nimport { compareBranchOutcomes } from './_utils/compare-branch-outcomes/index.js';\n\nexport function verifyFractalBranchUnidirectionality(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes = collectBranchOutcomes(model);\n const sorted = [...outcomes];\n sorted.sort(compareBranchOutcomes);\n return sorted;\n}\n","import type { TTaxonomyModel } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TEdgeGeometry } from '../../../../../../_verify-project@shared/_utils/edge-geometry/index.js';\n\nexport function collectCrossedBranches(\n destinationItem: TInventoryItem,\n geometry: TEdgeGeometry,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n): readonly TInventoryItem[] {\n if (geometry.sameTree) {\n return geometry.descendingDomains.filter(\n (domain) =>\n taxonomy.byItemId.get(domain.id)?.domainKind === 'fractal-branch'\n );\n }\n\n const branches: TInventoryItem[] = [];\n let currentParentId = destinationItem.parentId;\n while (currentParentId !== null) {\n const parentDomain = inventory.items[currentParentId];\n if (parentDomain === undefined) {\n break;\n }\n if (\n taxonomy.byItemId.get(parentDomain.id)?.domainKind === 'fractal-branch'\n ) {\n branches.unshift(parentDomain);\n }\n currentParentId = parentDomain.parentId;\n }\n return branches;\n}\n","import type {\n TItemClassification,\n TTaxonomyModel,\n} from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TInventoryItem } from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TEdgeGeometry } from '../../../../../../_verify-project@shared/_utils/edge-geometry/index.js';\n\nexport function isBranchAccessForbidden(\n parentItem: TInventoryItem,\n sourceItem: TInventoryItem | undefined,\n sourceClassification: TItemClassification | undefined,\n geometry: TEdgeGeometry,\n taxonomy: TTaxonomyModel\n): boolean {\n if (\n sourceClassification === undefined ||\n sourceClassification.nodeKind === 'foreign-node' ||\n !geometry.isSourceInside(parentItem)\n ) {\n return true;\n }\n\n const parentClassification = taxonomy.byItemId.get(parentItem.id);\n const isParentFragment =\n parentClassification?.domainKind === 'fragment' ||\n parentClassification?.domainKind === 'root-fragment';\n\n return (\n isParentFragment &&\n sourceClassification.nodeKind === 'access-node' &&\n sourceItem?.parentId === parentItem.id\n );\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { describeEdgeGeometry } from '../../../../_verify-project@shared/_utils/edge-geometry/index.js';\nimport { collectCrossedBranches } from './_utils/collect-crossed-branches/index.js';\nimport { isBranchAccessForbidden } from './_utils/is-branch-access-forbidden/index.js';\n\nexport function checkBranchVisibility(\n edge: TEdgeMetadata,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n): TDependencyOutcome | undefined {\n const sourceId = inventory.pathToId.get(edge.sourcePath);\n if (sourceId === undefined) {\n return undefined;\n }\n\n const destinationId = inventory.pathToId.get(edge.destinationPath);\n const destinationItem =\n destinationId === undefined ? undefined : inventory.items[destinationId];\n if (destinationItem === undefined) {\n return undefined;\n }\n\n const geometry = describeEdgeGeometry(\n edge.sourcePath,\n edge.destinationPath,\n inventory,\n taxonomy\n );\n\n const branchesToVerify = collectCrossedBranches(\n destinationItem,\n geometry,\n inventory,\n taxonomy\n );\n\n const sourceItem = inventory.items[sourceId];\n const sourceClassification = taxonomy.byItemId.get(sourceId);\n\n for (const branchItem of branchesToVerify) {\n const parentItem =\n typeof branchItem.parentId === 'number'\n ? inventory.items[branchItem.parentId]\n : undefined;\n if (\n parentItem !== undefined &&\n isBranchAccessForbidden(\n parentItem,\n sourceItem,\n sourceClassification,\n geometry,\n taxonomy\n )\n ) {\n return createOutcome('dependency/fractal-branch-visibility', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n }\n }\n\n return undefined;\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n return toComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : toComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkBranchVisibility } from './_utils/check-branch-visibility/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifyFractalBranchVisibility(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const inventory = model.basis.inventory;\n const taxonomy = model.taxonomy;\n\n for (const edge of model.graph.edgeMetadata) {\n const outcome = checkBranchVisibility(edge, inventory, taxonomy);\n if (outcome !== undefined) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type { TItemClassification } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventoryItem } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type { TFragmentInspection } from '../../_fragment-anatomy@shared/_types/fragment-anatomy.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function collectFragmentItems(\n model: TVerificationModel\n): readonly TFragmentInspection[] {\n const treeByOrigin = new Map<null | string, TEffectiveTree>(\n model.basis.declarations.trees.map((tree) => [tree.originPath, tree])\n );\n\n const fileChildrenByParentId = new Map<number, TInventoryItem[]>();\n for (const item of model.basis.inventory.items) {\n if (item.kind !== 'file' || item.parentId === null) {\n continue;\n }\n const list = fileChildrenByParentId.get(item.parentId) ?? [];\n list.push(item);\n fileChildrenByParentId.set(item.parentId, list);\n }\n\n const isFragmentClassification = (\n classification: TItemClassification | undefined\n ): classification is TItemClassification =>\n classification !== undefined &&\n classification.domainKind === 'fragment' &&\n classification.imposedRoleName !== null;\n\n const fragmentTargets: {\n readonly classification: TItemClassification;\n readonly item: TInventoryItem;\n }[] = [];\n\n for (const item of model.basis.inventory.items) {\n if (item.kind !== 'directory') {\n continue;\n }\n const classification = model.taxonomy.byItemId.get(item.id);\n if (isFragmentClassification(classification)) {\n fragmentTargets.push({ classification, item });\n }\n }\n\n const resolveMasterRank = (\n item: TInventoryItem,\n roleName: null | string\n ): null | number => {\n if (roleName === null) {\n return null;\n }\n const tree = treeByOrigin.get(item.treeOrigin);\n const imposedRole = tree?.catalog.roles.find(\n (role) => role.name === roleName\n );\n return imposedRole?.rank ?? null;\n };\n\n const toLogicalChild = (child: TInventoryItem): TItemClassification[] => {\n const childClassification = model.taxonomy.byItemId.get(child.id);\n return childClassification === undefined ||\n childClassification.nodeKind === null ||\n childClassification.nodeKind === 'foreign-node'\n ? []\n : [childClassification];\n };\n\n const inspections: TFragmentInspection[] = [];\n\n for (const { classification, item } of fragmentTargets) {\n const masterRank = resolveMasterRank(item, classification.imposedRoleName);\n\n const rawFileChildren = fileChildrenByParentId.get(item.id);\n const sortedChildren =\n rawFileChildren === undefined ? [] : [...rawFileChildren];\n sortedChildren.sort((left, right) => compareOrdinal(left.path, right.path));\n\n const logicalChildren = sortedChildren.flatMap((child) =>\n toLogicalChild(child)\n );\n\n inspections.push({\n fragmentClassification: classification,\n logicalChildren,\n masterRank,\n });\n }\n\n return inspections;\n}\n","import type { TNodeKind } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nexport const NODE_ACCESS: TNodeKind = 'access-node';\n\nexport const NODE_FRAGMENT: TNodeKind = 'fragment-node';\n\nexport const NODE_MASTER: TNodeKind = 'master-node';\n\nexport const NODE_SUB_GRAPH: TNodeKind = 'sub-graph-node';\n\nexport const ROLE_EXPLICIT = 'explicit' as const;\n\nexport const ADMITTED_NODE_KINDS = new Set<null | TNodeKind>([\n NODE_ACCESS,\n NODE_FRAGMENT,\n NODE_MASTER,\n NODE_SUB_GRAPH,\n]);\n\nexport const FRAGMENT_OR_SUB_GRAPH_KINDS = new Set<null | TNodeKind>([\n NODE_FRAGMENT,\n NODE_MASTER,\n NODE_SUB_GRAPH,\n]);\n\nexport const MASTER_CANDIDATE_KINDS = new Set<null | TNodeKind>([\n NODE_FRAGMENT,\n NODE_MASTER,\n]);\n","import type { TClassificationOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TFragmentInspection } from '../../_fragment-anatomy@shared/_types/fragment-anatomy.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport {\n FRAGMENT_OR_SUB_GRAPH_KINDS,\n MASTER_CANDIDATE_KINDS,\n NODE_ACCESS,\n} from '../../_fragment-anatomy@shared/_constants/fragment-anatomy.constant.js';\n\nexport function inspectFragmentDomain(\n inspection: TFragmentInspection\n): readonly TClassificationOutcome[] {\n const outcomes: TClassificationOutcome[] = [];\n const fragmentPath = inspection.fragmentClassification.path;\n const imposedRoleName = inspection.fragmentClassification.imposedRoleName;\n\n const hasAccessNode = inspection.logicalChildren.some(\n (child) => child.nodeKind === NODE_ACCESS\n );\n if (!hasAccessNode) {\n outcomes.push(\n createOutcome('classification/missing-access-node', {\n element: fragmentPath,\n })\n );\n }\n\n const hasMasterCandidate = inspection.logicalChildren.some(\n (child) =>\n child.role.roleName === imposedRoleName &&\n MASTER_CANDIDATE_KINDS.has(child.nodeKind)\n );\n if (!hasMasterCandidate) {\n outcomes.push(\n createOutcome('classification/missing-master-node', {\n element: fragmentPath,\n })\n );\n }\n\n const explicitRoleCounts = new Map<string, number>();\n for (const child of inspection.logicalChildren) {\n const roleName = child.role.roleName;\n if (roleName === null || !FRAGMENT_OR_SUB_GRAPH_KINDS.has(child.nodeKind)) {\n continue;\n }\n const current = explicitRoleCounts.get(roleName) ?? 0;\n explicitRoleCounts.set(roleName, current + 1);\n }\n\n const duplicatedRoleNames: string[] = [];\n for (const [roleName, count] of explicitRoleCounts) {\n if (count > 1) {\n duplicatedRoleNames.push(roleName);\n }\n }\n duplicatedRoleNames.sort(compareOrdinal);\n\n const duplicateOutcomes = duplicatedRoleNames.map(() =>\n createOutcome('classification/duplicate-fragment-role', {\n element: fragmentPath,\n })\n );\n outcomes.push(...duplicateOutcomes);\n\n return outcomes;\n}\n","import type { TClassificationOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TFragmentInspection } from '../../_fragment-anatomy@shared/_types/fragment-anatomy.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n ADMITTED_NODE_KINDS,\n NODE_FRAGMENT,\n} from '../../_fragment-anatomy@shared/_constants/fragment-anatomy.constant.js';\n\nexport function inspectFragmentNodes(\n inspection: TFragmentInspection\n): readonly TClassificationOutcome[] {\n const outcomes: TClassificationOutcome[] = [];\n\n for (const child of inspection.logicalChildren) {\n if (!ADMITTED_NODE_KINDS.has(child.nodeKind)) {\n outcomes.push(\n createOutcome('classification/fragment-node-anatomy', {\n element: child.path,\n })\n );\n }\n }\n\n const masterRank = inspection.masterRank;\n const imposedRoleName = inspection.fragmentClassification.imposedRoleName;\n\n if (masterRank !== null && imposedRoleName !== null) {\n for (const child of inspection.logicalChildren) {\n const isOtherFragmentNode =\n child.nodeKind === NODE_FRAGMENT &&\n child.role.roleName !== imposedRoleName;\n\n if (\n isOtherFragmentNode &&\n child.fragmentInternalRank !== null &&\n child.fragmentInternalRank >= masterRank\n ) {\n outcomes.push(\n createOutcome('classification/fragment-node-rank', {\n element: child.path,\n })\n );\n }\n }\n }\n\n return outcomes;\n}\n","import type {\n TClassificationOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { collectFragmentItems } from './_utils/collect-fragment-items/index.js';\nimport { inspectFragmentDomain } from './_utils/inspect-fragment-domain/index.js';\nimport { inspectFragmentNodes } from './_utils/inspect-fragment-nodes/index.js';\n\nexport function verifyFragmentAnatomy(\n model: TVerificationModel\n): readonly TOutcome[] {\n const inspections = collectFragmentItems(model);\n\n const outcomes: TClassificationOutcome[] = [];\n for (const inspection of inspections) {\n outcomes.push(\n ...inspectFragmentDomain(inspection),\n ...inspectFragmentNodes(inspection)\n );\n }\n\n outcomes.sort((left, right) => {\n const byConstraint = compareOrdinal(left.constraint, right.constraint);\n return byConstraint === 0\n ? compareOrdinal(left.element, right.element)\n : byConstraint;\n });\n\n return outcomes;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { describeEdgeGeometry } from '../../../../_verify-project@shared/_utils/edge-geometry/index.js';\n\nexport function checkEdgeEncapsulation(\n edge: TEdgeMetadata,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n): TDependencyOutcome | undefined {\n const destinationId = inventory.pathToId.get(edge.destinationPath);\n if (destinationId === undefined) {\n return undefined;\n }\n\n const destinationClassification = taxonomy.byItemId.get(destinationId);\n const isFragmentNode =\n destinationClassification?.nodeKind === 'master-node' ||\n destinationClassification?.nodeKind === 'fragment-node';\n if (!isFragmentNode) {\n return undefined;\n }\n\n const destinationItem = inventory.items[destinationId];\n if (destinationItem === undefined || destinationItem.parentId === null) {\n return undefined;\n }\n\n const parentItem = inventory.items[destinationItem.parentId];\n if (parentItem === undefined) {\n return undefined;\n }\n\n const parentClassification = taxonomy.byItemId.get(parentItem.id);\n if (parentClassification?.domainKind !== 'fragment') {\n return undefined;\n }\n\n const geometry = describeEdgeGeometry(\n edge.sourcePath,\n edge.destinationPath,\n inventory,\n taxonomy\n );\n if (!geometry.sameTree || geometry.isSourceInside(parentItem)) {\n return undefined;\n }\n\n return createOutcome('dependency/fragment-encapsulation', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n return toComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : toComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkEdgeEncapsulation } from './_utils/check-edge-encapsulation/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifyFragmentEncapsulation(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const inventory = model.basis.inventory;\n const taxonomy = model.taxonomy;\n\n for (const edge of model.graph.edgeMetadata) {\n const outcome = checkEdgeEncapsulation(edge, inventory, taxonomy);\n if (outcome !== undefined) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type { TClassificationOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { THorizontalHierarchySet } from '../../../../_verify-project@shared/_types/_compounds/horizontal-hierarchies.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function collectMemberOutcomes(\n sets: readonly THorizontalHierarchySet[],\n taxonomy: TTaxonomyModel\n): readonly TClassificationOutcome[] {\n const outcomes: TClassificationOutcome[] = [];\n const reported = new Set<string>();\n\n for (const set of sets) {\n const parent = taxonomy.byPath.get(set.parentPath);\n const isUnclassified =\n parent === undefined ||\n (parent.entryKind === 'directory'\n ? parent.domainKind\n : parent.nodeKind) === null;\n if (isUnclassified || set.isOrderable || reported.has(set.parentPath)) {\n continue;\n }\n reported.add(set.parentPath);\n outcomes.push(\n createOutcome('classification/horizontal-hierarchy-members', {\n element: set.parentPath,\n })\n );\n }\n\n return outcomes;\n}\n","import type { TClassificationOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { THorizontalHierarchyConflict } from '../../../../_verify-project@shared/_types/_compounds/horizontal-hierarchies.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function collectOverlapOutcomes(\n conflicts: readonly THorizontalHierarchyConflict[],\n taxonomy: TTaxonomyModel\n): readonly TClassificationOutcome[] {\n const outcomes: TClassificationOutcome[] = [];\n const reported = new Set<string>();\n\n for (const conflict of conflicts) {\n const child = taxonomy.byItemId.get(conflict.itemId);\n const isUnclassified =\n child === undefined ||\n (child.entryKind === 'directory' ? child.domainKind : child.nodeKind) ===\n null;\n if (isUnclassified || reported.has(child.path)) {\n continue;\n }\n reported.add(child.path);\n outcomes.push(\n createOutcome('classification/horizontal-hierarchy-overlap', {\n element: child.path,\n })\n );\n }\n\n return outcomes;\n}\n","import type { TClassificationOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { collectMemberOutcomes } from './_utils/collect-member-outcomes/index.js';\nimport { collectOverlapOutcomes } from './_utils/collect-overlap-outcomes/index.js';\n\nexport function verifyHorizontalHierarchies(\n model: TVerificationModel\n): readonly TClassificationOutcome[] {\n const outcomes: TClassificationOutcome[] = [\n ...collectMemberOutcomes(model.hierarchies.sets, model.taxonomy),\n ...collectOverlapOutcomes(model.hierarchies.conflicts, model.taxonomy),\n ];\n\n outcomes.sort((left, right) => {\n const byConstraint = compareOrdinal(left.constraint, right.constraint);\n return byConstraint === 0\n ? compareOrdinal(left.element, right.element)\n : byConstraint;\n });\n\n return outcomes;\n}\n","import type { TItemClassification } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nexport function isViolatingCoordinateName(\n classification: TItemClassification\n): boolean {\n if (classification.domainKind !== 'path-sub-category') {\n return false;\n }\n const name = classification.path.slice(\n classification.path.lastIndexOf('/') + 1\n );\n if (name.startsWith('_[') && name.endsWith(']')) {\n return !/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(name.slice(2, -1));\n }\n const isStatic = name.startsWith('_') && !name.startsWith('_[');\n return !isStatic || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(name.slice(1));\n}\n","import type { TItemClassification } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function isViolatingDomainName(\n classification: TItemClassification,\n inventory: TInventory,\n trees: readonly TEffectiveTree[]\n): boolean {\n if (\n classification.entryKind !== 'directory' ||\n classification.domainKind === null ||\n classification.relationalQualifications.isPathFragment\n ) {\n return false;\n }\n\n const item = inventory.items[classification.itemId];\n const isOrigin = trees.some((tree) => tree.originPath === item?.path);\n if (item === undefined || isOrigin) {\n return false;\n }\n\n const directoryName = classification.path.slice(\n classification.path.lastIndexOf('/') + 1\n );\n\n const { domainKind } = classification;\n if (domainKind === 'fractal-branch') {\n const parentPath = inventory.items[item.parentId ?? -1]?.path;\n const scope = parentPath\n ?.slice(parentPath.lastIndexOf('/') + 1)\n .replace(/^_/u, '');\n return directoryName !== `_${scope}@shared`;\n }\n\n const allowedKinds = new Set([\n 'category',\n 'fragment',\n 'layer',\n 'sub-category',\n ]);\n if (!allowedKinds.has(domainKind)) {\n return false;\n }\n\n const isFragment = domainKind === 'fragment';\n const hasMatchingPrefix = isFragment !== directoryName.startsWith('_');\n const checkedSegment = directoryName.slice(Number(!isFragment));\n return (\n !hasMatchingPrefix || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(checkedSegment)\n );\n}\n","import type { TEffectiveMimeticStructure } from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nexport function isViolatingPathFragmentName(\n name: string,\n lookupPath: string,\n mimeticStructures: readonly TEffectiveMimeticStructure[]\n): boolean {\n const isKebab = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(name);\n const matched = mimeticStructures.find((structure) =>\n structure.paths.some(\n (prefix) => lookupPath === prefix || lookupPath.startsWith(`${prefix}/`)\n )\n );\n\n const actions = matched?.actions ?? [];\n if (actions.length === 0) {\n return !isKebab;\n }\n\n const matchingActions = actions.filter((action) =>\n name.startsWith(`${action}-`)\n );\n matchingActions.sort((left, right) => right.length - left.length);\n const longestAction = matchingActions[0];\n if (longestAction === undefined) {\n return true;\n }\n\n const target = name.slice(longestAction.length + 1);\n return !/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(target);\n}\n","import type {\n TItemClassification,\n TTaxonomyModel,\n} from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { isViolatingPathFragmentName } from './_utils/is-violating-path-fragment-name/index.js';\n\nexport function isViolatingUnitName(\n classification: TItemClassification,\n taxonomy: TTaxonomyModel,\n inventory: TInventory,\n trees: readonly TEffectiveTree[]\n): boolean {\n const item = inventory.items[classification.itemId];\n const tree = trees.find(\n (candidate) => candidate.originPath === item?.treeOrigin\n );\n if (tree === undefined) {\n return false;\n }\n\n const { domainKind, entryKind, nodeKind, path } = classification;\n const fileName = path.slice(path.lastIndexOf('/') + 1);\n\n if (entryKind === 'directory') {\n const isPathFragment =\n domainKind === 'fragment' &&\n classification.relationalQualifications.isPathFragment;\n return (\n isPathFragment &&\n isViolatingPathFragmentName(fileName, path, tree.mimeticPathStructures)\n );\n }\n\n const validNodeKinds = new Set([\n 'category-node',\n 'fragment-node',\n 'master-node',\n 'sub-graph-node',\n ]);\n if (!validNodeKinds.has(nodeKind ?? '')) {\n return false;\n }\n\n const dotIndex = fileName.indexOf('.');\n const stem = dotIndex === -1 ? fileName : fileName.slice(0, dotIndex);\n const parent = taxonomy.byItemId.get(item?.parentId ?? -1);\n\n return parent?.relationalQualifications.isPathFragment === true\n ? isViolatingPathFragmentName(stem, parent.path, tree.mimeticPathStructures)\n : !/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(stem);\n}\n","import type { TClassificationOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { isViolatingCoordinateName } from './_utils/is-violating-coordinate-name/index.js';\nimport { isViolatingDomainName } from './_utils/is-violating-domain-name/index.js';\nimport { isViolatingUnitName } from './_utils/is-violating-unit-name/index.js';\n\nexport function verifyNomenclature(\n model: TVerificationModel\n): readonly TClassificationOutcome[] {\n const outcomes: TClassificationOutcome[] = [];\n const reported = new Set<string>();\n\n const report = (path: string): void => {\n if (reported.has(path)) {\n return;\n }\n reported.add(path);\n outcomes.push(\n createOutcome('classification/nomenclature', { element: path })\n );\n };\n\n const { inventory } = model.basis;\n const { trees } = model.basis.declarations;\n const { taxonomy } = model;\n\n for (const classification of taxonomy.classifications) {\n const isViolation =\n isViolatingCoordinateName(classification) ||\n isViolatingDomainName(classification, inventory, trees) ||\n isViolatingUnitName(classification, taxonomy, inventory, trees);\n\n if (isViolation) {\n report(classification.path);\n }\n }\n\n outcomes.sort((left, right) => compareOrdinal(left.element, right.element));\n return outcomes;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TEffectivePathAlias } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function checkEdgeAliasAnchoring(\n edge: TEdgeMetadata,\n inventory: TInventory,\n taxonomy: TTaxonomyModel,\n aliases: readonly TEffectivePathAlias[]\n): TDependencyOutcome | undefined {\n if (edge.aliasUsed === null) {\n return undefined;\n }\n\n const sourceId = inventory.pathToId.get(edge.sourcePath);\n const destinationId = inventory.pathToId.get(edge.destinationPath);\n const sourceItem =\n sourceId === undefined ? undefined : inventory.items[sourceId];\n const destinationItem =\n destinationId === undefined ? undefined : inventory.items[destinationId];\n\n const sourceOrigin = sourceItem?.treeOrigin ?? null;\n if (sourceOrigin === null || sourceOrigin !== destinationItem?.treeOrigin) {\n return undefined;\n }\n\n const matchedAlias = aliases.find((alias) => alias.prefix === edge.aliasUsed);\n const baseAlternatives = matchedAlias?.targets ?? edge.aliasAlternatives;\n\n const isAnchored =\n baseAlternatives.length > 0 &&\n baseAlternatives.every((basePath) => {\n const baseId = inventory.pathToId.get(basePath);\n if (baseId === undefined) {\n return false;\n }\n const baseItem = inventory.items[baseId];\n if (baseItem === undefined || baseItem.treeOrigin !== sourceOrigin) {\n return false;\n }\n const classification =\n taxonomy.byItemId.get(baseId) ?? taxonomy.byPath.get(basePath);\n return (\n classification !== undefined &&\n classification.domainKind === 'fractal-branch'\n );\n });\n\n if (!isAnchored) {\n return createOutcome('dependency/path-alias-anchoring', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n }\n\n return undefined;\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n return toComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : toComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkEdgeAliasAnchoring } from './_utils/check-edge-alias-anchoring/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifyPathAliasAnchoring(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const { aliases, inventory } = model.basis;\n const taxonomy = model.taxonomy;\n\n for (const edge of model.graph.edgeMetadata) {\n const outcome = checkEdgeAliasAnchoring(edge, inventory, taxonomy, aliases);\n if (outcome !== undefined) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type { THorizontalHierarchies } from '../../../../../../_verify-project@shared/_types/_compounds/horizontal-hierarchies.type.js';\n\nexport function isOrderedDownward(\n sourceItemId: number,\n destinationItemId: number,\n lowestCommonAncestorPath: string,\n hierarchies: THorizontalHierarchies\n): boolean {\n const hasConflict = hierarchies.conflicts.some(\n (conflict) =>\n conflict.itemId === sourceItemId || conflict.itemId === destinationItemId\n );\n if (hasConflict) {\n return false;\n }\n\n return hierarchies.sets.some((set) => {\n if (!set.isOrderable || set.parentPath !== lowestCommonAncestorPath) {\n return false;\n }\n const sourceRanks = set.siblings.filter((s) => s.itemId === sourceItemId);\n const destinationRanks = set.siblings.filter(\n (s) => s.itemId === destinationItemId\n );\n if (sourceRanks.length !== 1 || destinationRanks.length !== 1) {\n return false;\n }\n const sourceSibling = sourceRanks[0];\n const destinationSibling = destinationRanks[0];\n return (\n sourceSibling !== undefined &&\n destinationSibling !== undefined &&\n sourceSibling.rank > destinationSibling.rank\n );\n });\n}\n","import type { TItemClassification } from '../../../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nexport function isPeerDomain(\n classification: TItemClassification | undefined\n): classification is TItemClassification {\n const kind = classification?.domainKind;\n if (kind === null || kind === undefined) {\n return false;\n }\n const nonPeerDomains = ['foreign-domain', 'root-fragment'];\n return !nonPeerDomains.includes(kind);\n}\n","import type { TItemClassification } from '../../../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nexport function isPeerNode(\n classification: TItemClassification | undefined\n): classification is TItemClassification {\n const kind = classification?.nodeKind;\n if (kind === null || kind === undefined) {\n return false;\n }\n const nonPeerNodes = [\n 'foreign-node',\n 'root-node',\n 'unauthorized-logical-node',\n ];\n return !nonPeerNodes.includes(kind);\n}\n","import type { TTaxonomyModel } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nimport { isPeerDomain } from './_utils/is-peer-domain/index.js';\nimport { isPeerNode } from './_utils/is-peer-node/index.js';\n\nexport function isPeerPair(\n sourceStepId: number,\n destinationStepId: number,\n taxonomy: TTaxonomyModel\n): boolean {\n const sourceClassification = taxonomy.byItemId.get(sourceStepId);\n const destinationClassification = taxonomy.byItemId.get(destinationStepId);\n\n const areBothDomains =\n isPeerDomain(sourceClassification) &&\n isPeerDomain(destinationClassification) &&\n destinationClassification.domainKind !== 'fractal-branch';\n\n const areBothNodes =\n isPeerNode(sourceClassification) && isPeerNode(destinationClassification);\n\n return areBothDomains || areBothNodes;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { THorizontalHierarchies } from '../../../../_verify-project@shared/_types/_compounds/horizontal-hierarchies.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { describeEdgeGeometry } from '../../../../_verify-project@shared/_utils/edge-geometry/index.js';\nimport { isOrderedDownward } from './_utils/is-ordered-downward/index.js';\nimport { isPeerPair } from './_utils/is-peer-pair/index.js';\n\nexport function checkEdgePeerSeparation(\n edge: TEdgeMetadata,\n inventory: TInventory,\n taxonomy: TTaxonomyModel,\n hierarchies: THorizontalHierarchies\n): TDependencyOutcome | undefined {\n const geometry = describeEdgeGeometry(\n edge.sourcePath,\n edge.destinationPath,\n inventory,\n taxonomy\n );\n\n if (\n !geometry.sameTree ||\n geometry.firstStepSource === null ||\n geometry.firstStepDestination === null\n ) {\n return undefined;\n }\n\n const sourceStep = geometry.firstStepSource;\n const destinationStep = geometry.firstStepDestination;\n\n if (\n !isPeerPair(sourceStep.id, destinationStep.id, taxonomy) ||\n isOrderedDownward(\n sourceStep.id,\n destinationStep.id,\n geometry.lowestCommonAncestor.path,\n hierarchies\n )\n ) {\n return undefined;\n }\n\n return createOutcome('dependency/peer-separation', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n return toComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : toComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkEdgePeerSeparation } from './_utils/check-edge-peer-separation/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifyPeerSeparation(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const { basis, hierarchies, taxonomy } = model;\n const { inventory } = basis;\n\n for (const edge of model.graph.edgeMetadata) {\n const outcome = checkEdgePeerSeparation(\n edge,\n inventory,\n taxonomy,\n hierarchies\n );\n if (outcome !== undefined) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { describeEdgeGeometry } from '../../../../_verify-project@shared/_utils/edge-geometry/index.js';\n\nexport function checkPrivateCategoryUnidirectionality(\n edge: TEdgeMetadata,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n): TDependencyOutcome | undefined {\n const destinationId = inventory.pathToId.get(edge.destinationPath);\n if (destinationId === undefined) {\n return undefined;\n }\n\n const destinationItem = inventory.items[destinationId];\n if (destinationItem === undefined || destinationItem.kind !== 'file') {\n return undefined;\n }\n\n const geometry = describeEdgeGeometry(\n edge.sourcePath,\n edge.destinationPath,\n inventory,\n taxonomy\n );\n if (\n !geometry.sameTree ||\n geometry.firstStepSource === null ||\n destinationItem.parentId !== geometry.lowestCommonAncestor.id\n ) {\n return undefined;\n }\n\n const isEligibleTarget = (): boolean => {\n const classification = taxonomy.byItemId.get(destinationId);\n return (\n classification !== undefined &&\n classification.nodeKind !== null &&\n classification.nodeKind !== 'foreign-node'\n );\n };\n\n const isPrivateSource =\n taxonomy.byItemId.get(geometry.firstStepSource.id)?.relationalQualifications\n .isPrivateCategory === true;\n\n if (!isPrivateSource || !isEligibleTarget()) {\n return undefined;\n }\n\n return createOutcome('dependency/private-category-unidirectionality', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { describeEdgeGeometry } from '../../../../_verify-project@shared/_utils/edge-geometry/index.js';\n\nexport function checkPrivateCategoryVisibility(\n edge: TEdgeMetadata,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n): TDependencyOutcome | undefined {\n const destinationId = inventory.pathToId.get(edge.destinationPath);\n const sourceId = inventory.pathToId.get(edge.sourcePath);\n if (destinationId === undefined || sourceId === undefined) {\n return undefined;\n }\n\n const sourceItem = inventory.items[sourceId];\n if (sourceItem === undefined) {\n return undefined;\n }\n\n const geometry = describeEdgeGeometry(\n edge.sourcePath,\n edge.destinationPath,\n inventory,\n taxonomy\n );\n if (!geometry.sameTree) {\n return undefined;\n }\n\n const isAuthorizedConsumer = (parentId: number): boolean => {\n if (sourceItem.parentId !== parentId) {\n return false;\n }\n const parentKind = taxonomy.byItemId.get(parentId)?.domainKind;\n const sourceKind = taxonomy.byItemId.get(sourceItem.id)?.nodeKind;\n const isFragmentChild =\n sourceKind === 'master-node' ||\n sourceKind === 'fragment-node' ||\n sourceKind === 'sub-graph-node';\n return parentKind === 'fragment'\n ? isFragmentChild\n : parentKind === 'root-fragment' && sourceKind === 'root-node';\n };\n\n for (const domain of geometry.descendingDomains) {\n const isPrivate =\n taxonomy.byItemId.get(domain.id)?.relationalQualifications\n .isPrivateCategory === true;\n if (!isPrivate || domain.parentId === null) {\n continue;\n }\n\n if (!isAuthorizedConsumer(domain.parentId)) {\n return createOutcome('dependency/private-category-visibility', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n }\n }\n\n return undefined;\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n if (toComparison !== 0) {\n return toComparison;\n }\n const specifierComparison = compareOrdinal(\n left.specifier ?? '',\n right.specifier ?? ''\n );\n return specifierComparison === 0\n ? compareOrdinal(left.constraint, right.constraint)\n : specifierComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkPrivateCategoryUnidirectionality } from './_utils/check-private-category-unidirectionality/index.js';\nimport { checkPrivateCategoryVisibility } from './_utils/check-private-category-visibility/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifyPrivateCategoryVisibility(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const inventory = model.basis.inventory;\n const taxonomy = model.taxonomy;\n\n for (const edge of model.graph.edgeMetadata) {\n const visibilityOutcome = checkPrivateCategoryVisibility(\n edge,\n inventory,\n taxonomy\n );\n if (visibilityOutcome !== undefined) {\n outcomes.push(visibilityOutcome);\n }\n\n const unidirectionalityOutcome = checkPrivateCategoryUnidirectionality(\n edge,\n inventory,\n taxonomy\n );\n if (unidirectionalityOutcome !== undefined) {\n outcomes.push(unidirectionalityOutcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareReEntryOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n if (toComparison !== 0) {\n return toComparison;\n }\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n return compareOrdinal(left.specifier ?? '', right.specifier ?? '');\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type {\n TCandidatePath,\n TPriorityQueue,\n TSearchContext,\n TSearchState,\n TTransition,\n} from './find-re-entry-paths.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport const findReEntryPaths = (() => {\n const compareCandidates = (\n left: TCandidatePath,\n right: TCandidatePath\n ): number => {\n if (left.distance !== right.distance) {\n return left.distance - right.distance;\n }\n const minLength = Math.min(left.chain.length, right.chain.length);\n for (let index = 0; index < minLength; index += 1) {\n const comparison = compareOrdinal(\n left.chain[index] ?? '',\n right.chain[index] ?? ''\n );\n if (comparison !== 0) {\n return comparison;\n }\n }\n const positionComparison = compareSourceLocations(\n left.position,\n right.position\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n return compareOrdinal(left.specifier, right.specifier);\n };\n\n const compareSearchStates = (\n left: TSearchState,\n right: TSearchState\n ): number => {\n if (left.distance !== right.distance) {\n return left.distance - right.distance;\n }\n const minLength = Math.min(left.chain.length, right.chain.length);\n for (let index = 0; index < minLength; index += 1) {\n const comparison = compareOrdinal(\n left.chain[index] ?? '',\n right.chain[index] ?? ''\n );\n if (comparison !== 0) {\n return comparison;\n }\n }\n return 0;\n };\n\n const createPriorityQueue = (): TPriorityQueue => {\n const states: TSearchState[] = [];\n\n const push = (state: TSearchState): void => {\n states.push(state);\n };\n\n const pop = (): TSearchState | undefined => {\n if (states.length === 0) {\n return undefined;\n }\n let bestIndex = 0;\n for (let index = 1; index < states.length; index += 1) {\n const current = states[index];\n const best = states[bestIndex];\n if (\n current !== undefined &&\n best !== undefined &&\n compareSearchStates(current, best) < 0\n ) {\n bestIndex = index;\n }\n }\n const [selected] = states.splice(bestIndex, 1);\n return selected;\n };\n\n return { pop, push };\n };\n\n const buildTransitions = (\n model: TVerificationModel,\n isLogical: (path: string) => boolean\n ): ReadonlyMap<string, readonly TTransition[]> => {\n const transitionsBySource = new Map<string, TTransition[]>();\n\n const appendTransition = (\n source: string,\n transition: TTransition\n ): void => {\n const list = transitionsBySource.get(source);\n if (list === undefined) {\n transitionsBySource.set(source, [transition]);\n return;\n }\n list.push(transition);\n };\n\n for (const crossing of model.crossings) {\n if (\n isLogical(crossing.sourcePath) &&\n isLogical(crossing.destinationPath)\n ) {\n appendTransition(crossing.sourcePath, {\n chain: crossing.chain,\n destinationPath: crossing.destinationPath,\n hasExternal: true,\n importIndex: crossing.importIndex,\n position: crossing.position,\n specifier: crossing.specifier,\n weight: crossing.chain.length - 1,\n });\n }\n }\n\n for (const edge of model.graph.edgeMetadata) {\n if (isLogical(edge.sourcePath) && isLogical(edge.destinationPath)) {\n appendTransition(edge.sourcePath, {\n chain: [edge.sourcePath, edge.destinationPath],\n destinationPath: edge.destinationPath,\n hasExternal: false,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n weight: 1,\n });\n }\n }\n\n return transitionsBySource;\n };\n\n const isStateDominated = (\n state: TSearchState,\n bestExternalDistance: Map<string, number>,\n bestNonExternalDistance: Map<string, number>\n ): boolean => {\n const bestMap = state.hasExternal\n ? bestExternalDistance\n : bestNonExternalDistance;\n const previousDistance = bestMap.get(state.current);\n if (previousDistance !== undefined && previousDistance <= state.distance) {\n return true;\n }\n bestMap.set(state.current, state.distance);\n return false;\n };\n\n const processTransition = (\n state: TSearchState,\n transition: TTransition,\n context: TSearchContext\n ): void => {\n const { destinationPath } = transition;\n const isTargetInSameTree = context.isTargetTree(destinationPath);\n const hasCrossing = state.hasExternal || transition.hasExternal;\n const nextDistance = state.distance + transition.weight;\n const nextChain = [...state.chain, ...transition.chain.slice(1)];\n\n if (isTargetInSameTree) {\n if (hasCrossing) {\n context.recordCandidate(destinationPath, {\n chain: nextChain,\n destination: destinationPath,\n distance: nextDistance,\n importIndex: state.importIndex,\n position: state.position,\n specifier: state.specifier,\n });\n }\n return;\n }\n\n context.queue.push({\n chain: nextChain,\n current: destinationPath,\n distance: nextDistance,\n hasExternal: hasCrossing,\n importIndex: state.importIndex,\n position: state.position,\n specifier: state.specifier,\n });\n };\n\n const expandSearchState = (\n state: TSearchState,\n context: TSearchContext\n ): void => {\n const transitions = context.transitionsBySource.get(state.current) ?? [];\n for (const transition of transitions) {\n processTransition(state, transition, context);\n }\n };\n\n const seedInitialTransitions = (\n sourcePath: string,\n context: TSearchContext\n ): void => {\n const transitions = context.transitionsBySource.get(sourcePath) ?? [];\n for (const transition of transitions) {\n const { destinationPath } = transition;\n if (context.isTargetTree(destinationPath)) {\n if (transition.hasExternal) {\n context.recordCandidate(destinationPath, {\n chain: transition.chain,\n destination: destinationPath,\n distance: transition.weight,\n importIndex: transition.importIndex,\n position: transition.position,\n specifier: transition.specifier,\n });\n }\n } else {\n context.queue.push({\n chain: transition.chain,\n current: destinationPath,\n distance: transition.weight,\n hasExternal: transition.hasExternal,\n importIndex: transition.importIndex,\n position: transition.position,\n specifier: transition.specifier,\n });\n }\n }\n };\n\n const drainSearchQueue = (context: TSearchContext): void => {\n const bestExternalDistance = new Map<string, number>();\n const bestNonExternalDistance = new Map<string, number>();\n\n let state = context.queue.pop();\n while (state !== undefined) {\n if (\n !isStateDominated(state, bestExternalDistance, bestNonExternalDistance)\n ) {\n expandSearchState(state, context);\n }\n state = context.queue.pop();\n }\n };\n\n const exploreSourceNode = (\n sourcePath: string,\n baseContext: Omit<TSearchContext, 'queue' | 'recordCandidate'>\n ): readonly TCandidatePath[] => {\n const winningCandidates = new Map<string, TCandidatePath>();\n\n const recordCandidate = (\n destinationPath: string,\n candidate: TCandidatePath\n ): void => {\n const existing = winningCandidates.get(destinationPath);\n if (\n existing === undefined ||\n compareCandidates(candidate, existing) < 0\n ) {\n winningCandidates.set(destinationPath, candidate);\n }\n };\n\n const queue = createPriorityQueue();\n const searchContext: TSearchContext = {\n ...baseContext,\n queue,\n recordCandidate,\n };\n\n seedInitialTransitions(sourcePath, searchContext);\n drainSearchQueue(searchContext);\n\n const candidates: TCandidatePath[] = [];\n winningCandidates.forEach((candidate) => {\n candidates.push(candidate);\n });\n return candidates;\n };\n\n return function findReEntryPaths(\n model: TVerificationModel\n ): readonly TDependencyOutcome[] {\n const { inventory } = model.basis;\n const getTreeOrigin = (path: string): null | string => {\n const id = inventory.pathToId.get(path);\n if (id === undefined) {\n return null;\n }\n const item = inventory.items[id];\n return item?.treeOrigin ?? null;\n };\n\n const isLogicalTreeNode = (path: string): boolean => {\n const origin = getTreeOrigin(path);\n if (origin === null) {\n return false;\n }\n const classification = model.taxonomy.byPath.get(path);\n return classification?.nodeKind !== 'foreign-node';\n };\n\n const transitionsBySource = buildTransitions(model, isLogicalTreeNode);\n const outcomes: TDependencyOutcome[] = [];\n\n for (const tree of model.basis.declarations.trees) {\n const treeOrigin = tree.originPath;\n const isTargetTree = (path: string): boolean =>\n getTreeOrigin(path) === treeOrigin;\n\n const candidateSources: string[] = [];\n for (const [sourcePath, transitions] of transitionsBySource) {\n if (getTreeOrigin(sourcePath) !== treeOrigin) {\n continue;\n }\n const hasLeavingTransition = transitions.some(\n (transition) =>\n transition.hasExternal ||\n getTreeOrigin(transition.destinationPath) !== treeOrigin\n );\n if (hasLeavingTransition) {\n candidateSources.push(sourcePath);\n }\n }\n\n candidateSources.sort(compareOrdinal);\n\n for (const sourcePath of candidateSources) {\n const candidates = exploreSourceNode(sourcePath, {\n isTargetTree,\n transitionsBySource,\n treeOrigin,\n });\n\n for (const candidate of candidates) {\n outcomes.push(\n createOutcome('dependency/re-entry-prohibition', {\n chain: candidate.chain,\n from: sourcePath,\n importIndex: candidate.importIndex,\n position: candidate.position,\n specifier: candidate.specifier,\n to: candidate.destination,\n })\n );\n }\n }\n }\n\n return outcomes;\n };\n})();\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { compareReEntryOutcomes } from './_utils/compare-re-entry-outcomes/index.js';\nimport { findReEntryPaths } from './_utils/find-re-entry-paths/index.js';\n\nexport function verifyReEntryProhibition(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes = findReEntryPaths(model);\n const sorted: TDependencyOutcome[] = [...outcomes];\n sorted.sort(compareReEntryOutcomes);\n return sorted;\n}\n","import type { TSourceLocation } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareSourceLocations } from '../../../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function dedupeSourceLocations(\n locations: readonly TSourceLocation[]\n): readonly TSourceLocation[] {\n const sorted = [...locations];\n sorted.sort(compareSourceLocations);\n const deduped: TSourceLocation[] = [];\n\n for (const position of sorted) {\n const last = deduped.at(-1);\n if (last === undefined || compareSourceLocations(last, position) !== 0) {\n deduped.push(position);\n }\n }\n\n return deduped;\n}\n","import type {\n TModuleExport,\n TModuleImport,\n} from '../../../../../../../../_session@shared/_types/module-record.type.js';\n\nimport { compareSourceLocations } from '../../../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function hasMatchingDirectReExport(\n direct: TModuleImport,\n reExports: readonly TModuleExport[],\n handled: Set<TModuleExport>\n): boolean {\n let hasMatch = false;\n\n for (const exp of reExports) {\n const isEligible =\n !handled.has(exp) &&\n 'specifier' in exp.origin &&\n exp.origin.specifier === direct.specifier &&\n compareSourceLocations(direct.position, exp.position) <= 0;\n\n if (!isEligible) {\n continue;\n }\n\n handled.add(exp);\n hasMatch = true;\n }\n\n return hasMatch;\n}\n","import type { TImportSyntaxKind } from '../../../../../../_session@shared/_types/module-record.type.js';\n\nexport const RE_EXPORT_IMPORT_KINDS: ReadonlySet<TImportSyntaxKind> = new Set([\n 'export-all-from',\n 'export-named-from',\n 'export-type-from',\n]);\n","import type { TSourceLocation } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TModuleExport,\n TModuleImport,\n TModuleRecord,\n} from '../../../../../../_session@shared/_types/module-record.type.js';\n\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\nimport { dedupeSourceLocations } from './_utils/dedupe-source-locations/index.js';\nimport { hasMatchingDirectReExport } from './_utils/has-matching-direct-re-export/index.js';\nimport { RE_EXPORT_IMPORT_KINDS } from './collect-re-export-positions.constant.js';\n\nexport function collectReExportPositions(\n record: TModuleRecord\n): readonly TSourceLocation[] {\n const directReExports: TModuleImport[] = [];\n for (const item of record.imports) {\n if (RE_EXPORT_IMPORT_KINDS.has(item.kind)) {\n directReExports.push(item);\n }\n }\n directReExports.sort((left, right) =>\n compareSourceLocations(left.position, right.position)\n );\n\n const reExports: TModuleExport[] = [];\n for (const item of record.exports) {\n if (item.origin.type !== 'local-symbol') {\n reExports.push(item);\n }\n }\n\n if (reExports.length === 0) {\n return [];\n }\n\n const positions: TSourceLocation[] = [];\n const handledExports = new Set<TModuleExport>();\n\n for (const direct of directReExports) {\n if (hasMatchingDirectReExport(direct, reExports, handledExports)) {\n positions.push({ column: 1, line: direct.position.line });\n }\n }\n\n for (const exp of reExports) {\n if (!handledExports.has(exp)) {\n positions.push({ column: 1, line: exp.position.line });\n }\n }\n\n return dedupeSourceLocations(positions);\n}\n","import type { TSymbolOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareSymbolOutcomes(\n left: TSymbolOutcome,\n right: TSymbolOutcome\n): number {\n const elementComparison = compareOrdinal(left.element, right.element);\n if (elementComparison !== 0) {\n return elementComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? { column: 0, line: 0 },\n right.position ?? { column: 0, line: 0 }\n );\n return positionComparison === 0\n ? compareOrdinal(left.message, right.message)\n : positionComparison;\n}\n","import type {\n TOutcome,\n TSymbolOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { collectReExportPositions } from './_utils/collect-re-export-positions/index.js';\nimport { compareSymbolOutcomes } from './_utils/compare-symbol-outcomes/index.js';\n\nexport function verifyReExportProhibition(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TSymbolOutcome[] = [];\n\n for (const item of model.taxonomy.classifications) {\n const record = model.modules.records.get(item.path);\n const isSubject =\n item.entryKind === 'file' &&\n item.role.kind === 'explicit' &&\n record !== undefined &&\n record.language === 'script';\n\n if (!isSubject) {\n continue;\n }\n\n const positions = collectReExportPositions(record);\n for (const position of positions) {\n outcomes.push(\n createOutcome('symbol/re-export-prohibition', {\n element: item.path,\n position,\n })\n );\n }\n }\n\n outcomes.sort(compareSymbolOutcomes);\n return outcomes;\n}\n","import type {\n TEffectiveDeclarations,\n TEffectiveRootFragment,\n} from '../../../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nexport function isAuthorizedRootDependency(\n sourcePath: string,\n destinationPath: string,\n sourceParentPath: string,\n treeOrigin: string,\n declarations: TEffectiveDeclarations\n): boolean {\n const tree = declarations.trees.find(\n (candidate) => candidate.originPath === treeOrigin\n );\n if (tree === undefined) {\n return false;\n }\n\n const fragments: TEffectiveRootFragment[] = [...tree.rootFragments];\n let current = fragments.shift();\n while (current !== undefined) {\n if (current.path === sourceParentPath) {\n return current.dependencyPairs.some(\n (pair) => pair.from === sourcePath && pair.to === destinationPath\n );\n }\n fragments.push(...current.subRootFragments);\n current = fragments.shift();\n }\n\n return false;\n}\n","import type { THorizontalHierarchies } from '../../../../../../../../_verify-project@shared/_types/_compounds/horizontal-hierarchies.type.js';\n\nexport function isStrictlyDescendingRoot(\n sourceId: number,\n destinationId: number,\n parentPath: string,\n hierarchies: THorizontalHierarchies\n): boolean {\n const hierarchySet = hierarchies.sets.find(\n (set) => set.origin === 'root-nodes' && set.parentPath === parentPath\n );\n if (\n hierarchySet === undefined ||\n !hierarchySet.isOrderable ||\n hierarchySet.repetitions.length > 0\n ) {\n return false;\n }\n\n const conflictingIds = new Set(\n hierarchies.conflicts.map((conflict) => conflict.itemId)\n );\n if (conflictingIds.has(sourceId) || conflictingIds.has(destinationId)) {\n return false;\n }\n\n const sourceSiblings = hierarchySet.siblings.filter(\n (sibling) => sibling.itemId === sourceId\n );\n const destinationSiblings = hierarchySet.siblings.filter(\n (sibling) => sibling.itemId === destinationId\n );\n if (sourceSiblings.length !== 1 || destinationSiblings.length !== 1) {\n return false;\n }\n\n const sourceSibling = sourceSiblings[0];\n const destinationSibling = destinationSiblings[0];\n return (\n sourceSibling !== undefined &&\n destinationSibling !== undefined &&\n sourceSibling.rank > destinationSibling.rank\n );\n}\n","import type { TEdgeMetadata } from '../../../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventoryItem } from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TVerificationModel } from '../../../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { isAuthorizedRootDependency } from './_utils/is-authorized-root-dependency/index.js';\nimport { isStrictlyDescendingRoot } from './_utils/is-strictly-descending-root/index.js';\n\nexport function isRootEdgeAuthorized(\n sourceItem: TInventoryItem,\n destinationItem: TInventoryItem,\n edge: TEdgeMetadata,\n model: TVerificationModel\n): boolean {\n if (edge.aliasUsed !== null) {\n return false;\n }\n\n const sourceParentId = sourceItem.parentId;\n const sourceParentItem =\n sourceParentId === null\n ? undefined\n : model.basis.inventory.items[sourceParentId];\n const destinationParentId = destinationItem.parentId;\n\n if (sourceParentItem === undefined || destinationParentId === null) {\n return false;\n }\n\n const sourceTree = sourceItem.treeOrigin ?? '';\n\n return sourceParentId === destinationParentId\n ? isStrictlyDescendingRoot(\n sourceItem.id,\n destinationItem.id,\n sourceParentItem.path,\n model.hierarchies\n )\n : isAuthorizedRootDependency(\n edge.sourcePath,\n edge.destinationPath,\n sourceParentItem.path,\n sourceTree,\n model.basis.declarations\n );\n}\n","import type { TEdgeMetadata } from '../../../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TVerificationModel } from '../../../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\nimport type { TResolvedRootEdge } from './resolve-root-edge.type.js';\n\nexport function resolveRootEdge(\n edge: TEdgeMetadata,\n model: TVerificationModel\n): TResolvedRootEdge | undefined {\n const destinationClassification = model.taxonomy.byPath.get(\n edge.destinationPath\n );\n if (\n destinationClassification?.nodeKind !== 'root-node' ||\n edge.sourcePath === edge.destinationPath\n ) {\n return undefined;\n }\n\n const sourceClassification = model.taxonomy.byPath.get(edge.sourcePath);\n if (\n sourceClassification === undefined ||\n sourceClassification.nodeKind === 'foreign-node'\n ) {\n return undefined;\n }\n\n const inventory = model.basis.inventory;\n const destinationItem = inventory.items[destinationClassification.itemId];\n const sourceItem = inventory.items[sourceClassification.itemId];\n if (\n sourceItem === undefined ||\n destinationItem === undefined ||\n sourceItem.treeOrigin === null ||\n sourceItem.treeOrigin !== destinationItem.treeOrigin\n ) {\n return undefined;\n }\n\n return {\n destinationItem,\n isSourceRootNode: sourceClassification.nodeKind === 'root-node',\n sourceItem,\n };\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TVerificationModel } from '../../../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { isRootEdgeAuthorized } from './_utils/is-root-edge-authorized/index.js';\nimport { resolveRootEdge } from './_utils/resolve-root-edge/index.js';\n\nexport function checkEdgeRootDiscipline(\n edge: TEdgeMetadata,\n model: TVerificationModel\n): TDependencyOutcome | undefined {\n const resolved = resolveRootEdge(edge, model);\n if (resolved === undefined) {\n return undefined;\n }\n\n const isAuthorized =\n resolved.isSourceRootNode &&\n isRootEdgeAuthorized(\n resolved.sourceItem,\n resolved.destinationItem,\n edge,\n model\n );\n\n if (isAuthorized) {\n return undefined;\n }\n\n return createOutcome('dependency/root-node-discipline', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n return toComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : toComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkEdgeRootDiscipline } from './_utils/check-edge-root-discipline/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifyRootNodeDiscipline(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n\n for (const edge of model.graph.edgeMetadata) {\n const outcome = checkEdgeRootDiscipline(edge, model);\n if (outcome !== undefined) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function checkEdgeSubGraphIsolation(\n edge: TEdgeMetadata,\n inventory: TInventory,\n taxonomy: TTaxonomyModel\n): TDependencyOutcome | undefined {\n const destinationId = inventory.pathToId.get(edge.destinationPath);\n const destinationClassification =\n destinationId === undefined\n ? undefined\n : taxonomy.byItemId.get(destinationId);\n if (destinationClassification?.nodeKind !== 'sub-graph-node') {\n return undefined;\n }\n\n const sourceId = inventory.pathToId.get(edge.sourcePath);\n const sourceClassification =\n sourceId === undefined ? undefined : taxonomy.byItemId.get(sourceId);\n const isLogicalNode =\n sourceClassification !== undefined &&\n sourceClassification.nodeKind !== null &&\n sourceClassification.nodeKind !== 'foreign-node';\n if (!isLogicalNode) {\n return undefined;\n }\n\n return createOutcome('dependency/sub-graph-node-isolation', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n });\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareEdgeOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const fromComparison = compareOrdinal(left.from, right.from);\n if (fromComparison !== 0) {\n return fromComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n );\n if (positionComparison !== 0) {\n return positionComparison;\n }\n if (left.importIndex !== right.importIndex) {\n return left.importIndex - right.importIndex;\n }\n const toComparison = compareOrdinal(left.to, right.to);\n return toComparison === 0\n ? compareOrdinal(left.specifier ?? '', right.specifier ?? '')\n : toComparison;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkEdgeSubGraphIsolation } from './_utils/check-edge-sub-graph-isolation/index.js';\nimport { compareEdgeOutcomes } from './_utils/compare-edge-outcomes/index.js';\n\nexport function verifySubGraphNodeIsolation(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TDependencyOutcome[] = [];\n const inventory = model.basis.inventory;\n const taxonomy = model.taxonomy;\n\n for (const edge of model.graph.edgeMetadata) {\n const outcome = checkEdgeSubGraphIsolation(edge, inventory, taxonomy);\n if (outcome !== undefined) {\n outcomes.push(outcome);\n }\n }\n\n outcomes.sort(compareEdgeOutcomes);\n return outcomes;\n}\n","import type { TModuleRecord } from '../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TItemClassification } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nexport function isViolatingMasterSymbol(\n classification: TItemClassification,\n record: TModuleRecord\n): boolean {\n const { entryKind, nodeKind } = classification;\n if (entryKind !== 'file' || nodeKind !== 'master-node') {\n return false;\n }\n\n if (record.symbols.length !== 1) {\n return true;\n }\n\n const masterSymbolName = record.symbols[0]?.name;\n\n return record.exports.every(\n (exp) =>\n exp.origin.type !== 'local-symbol' ||\n exp.origin.symbolName !== masterSymbolName\n );\n}\n","import type { TModuleRecord } from '../../../../../../_session@shared/_types/module-record.type.js';\nimport type { TItemClassification } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nexport function isViolatingSymbolUniqueness(\n classification: TItemClassification,\n record: TModuleRecord,\n tree: TEffectiveTree\n): boolean {\n const roleName = classification.role.roleName;\n if (roleName === null || classification.role.kind !== 'explicit') {\n return false;\n }\n\n const { nodeKind } = classification;\n const isTargetKind =\n nodeKind === 'category-node' ||\n nodeKind === 'fragment-node' ||\n nodeKind === 'unauthorized-logical-node';\n\n if (\n !isTargetKind ||\n tree.catalog.subGraphRoles.includes(roleName) ||\n record.symbols.length <= 1\n ) {\n return false;\n }\n\n const role = tree.catalog.roles.find(\n (candidate) => candidate.name === roleName\n );\n\n return role?.allowMultipleSymbols !== true;\n}\n","import type {\n TOutcome,\n TSymbolOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { createOutcome } from '../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { isViolatingMasterSymbol } from './_utils/is-violating-master-symbol/index.js';\nimport { isViolatingSymbolUniqueness } from './_utils/is-violating-symbol-uniqueness/index.js';\n\nexport function verifySymbolUniqueness(\n model: TVerificationModel\n): readonly TOutcome[] {\n const outcomes: TSymbolOutcome[] = [];\n const { inventory } = model.basis;\n const { trees } = model.basis.declarations;\n const { records } = model.modules;\n const { classifications } = model.taxonomy;\n\n const treeByOrigin = new Map(trees.map((tree) => [tree.originPath, tree]));\n\n for (const classification of classifications) {\n const item = inventory.items[classification.itemId];\n const treeOrigin = item?.treeOrigin;\n const tree =\n typeof treeOrigin === 'string' ? treeByOrigin.get(treeOrigin) : undefined;\n const record = records.get(classification.path);\n\n if (\n tree === undefined ||\n record === undefined ||\n record.language !== 'script'\n ) {\n continue;\n }\n\n if (isViolatingMasterSymbol(classification, record)) {\n outcomes.push(\n createOutcome('symbol/master-symbol', {\n element: classification.path,\n })\n );\n }\n\n if (isViolatingSymbolUniqueness(classification, record, tree)) {\n outcomes.push(\n createOutcome('symbol/symbol-uniqueness', {\n element: classification.path,\n })\n );\n }\n }\n\n outcomes.sort((left, right) => compareOrdinal(left.element, right.element));\n return outcomes;\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TExternalCrossing } from '../../../../_verify-project@shared/_types/_compounds/external-crossing.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function checkCrossingTreeAuthorization(\n crossing: TExternalCrossing,\n inventory: TInventory,\n authorizedTreePairs: ReadonlySet<string>\n): TDependencyOutcome | undefined {\n const sourceItemId = inventory.pathToId.get(crossing.sourcePath);\n const sourceItem =\n sourceItemId === undefined ? undefined : inventory.items[sourceItemId];\n if (sourceItem === undefined || sourceItem.treeOrigin === null) {\n return undefined;\n }\n const sourceTreeOrigin = sourceItem.treeOrigin;\n\n const destinationItemId = inventory.pathToId.get(crossing.destinationPath);\n const destinationItem =\n destinationItemId === undefined\n ? undefined\n : inventory.items[destinationItemId];\n if (destinationItem === undefined || destinationItem.treeOrigin === null) {\n return undefined;\n }\n const destinationTreeOrigin = destinationItem.treeOrigin;\n\n if (sourceTreeOrigin === destinationTreeOrigin) {\n return undefined;\n }\n\n const authorizationKey = `${sourceTreeOrigin}\\0${destinationTreeOrigin}`;\n if (authorizedTreePairs.has(authorizationKey)) {\n return undefined;\n }\n\n return createOutcome('dependency/tree-authorization', {\n chain: crossing.chain,\n from: crossing.sourcePath,\n importIndex: crossing.importIndex,\n position: crossing.position,\n specifier: crossing.specifier,\n to: crossing.destinationPath,\n });\n}\n","import type { TDependencyOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TEdgeMetadata } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function checkEdgeTreeFrontier(\n edge: TEdgeMetadata,\n inventory: TInventory,\n publicNodes: ReadonlySet<string>,\n authorizedTreePairs: ReadonlySet<string>\n): readonly TDependencyOutcome[] {\n const destinationItemId = inventory.pathToId.get(edge.destinationPath);\n if (destinationItemId === undefined) {\n return [];\n }\n const destinationItem = inventory.items[destinationItemId];\n if (destinationItem === undefined || destinationItem.treeOrigin === null) {\n return [];\n }\n const destinationTreeOrigin = destinationItem.treeOrigin;\n\n const sourceItemId = inventory.pathToId.get(edge.sourcePath);\n const sourceItem =\n sourceItemId === undefined ? undefined : inventory.items[sourceItemId];\n const sourceTreeOrigin = sourceItem?.treeOrigin ?? null;\n\n if (sourceTreeOrigin === destinationTreeOrigin) {\n return [];\n }\n\n const outcomes: TDependencyOutcome[] = [];\n\n if (!publicNodes.has(edge.destinationPath)) {\n outcomes.push(\n createOutcome('dependency/tree-opacity', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n })\n );\n }\n\n if (sourceTreeOrigin !== null) {\n const authorizationKey = `${sourceTreeOrigin}\\0${destinationTreeOrigin}`;\n if (!authorizedTreePairs.has(authorizationKey)) {\n outcomes.push(\n createOutcome('dependency/tree-authorization', {\n from: edge.sourcePath,\n importIndex: edge.importIndex,\n position: edge.position,\n specifier: edge.specifier,\n to: edge.destinationPath,\n })\n );\n }\n }\n\n return outcomes;\n}\n","import type {\n TDependencyOutcome,\n TSourceLocation,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareTreeFrontierOutcomes(\n left: TDependencyOutcome,\n right: TDependencyOutcome\n): number {\n const absentLocation: TSourceLocation = { column: 0, line: 0 };\n const comparisons = [\n compareOrdinal(left.from, right.from),\n compareSourceLocations(\n left.position ?? absentLocation,\n right.position ?? absentLocation\n ),\n left.importIndex - right.importIndex,\n compareOrdinal(left.to, right.to),\n compareOrdinal(left.specifier ?? '', right.specifier ?? ''),\n compareOrdinal(left.constraint, right.constraint),\n compareOrdinal(\n (left.chain ?? []).join('\\0'),\n (right.chain ?? []).join('\\0')\n ),\n compareOrdinal(left.message, right.message),\n ];\n\n for (const diff of comparisons) {\n if (diff !== 0) {\n return diff;\n }\n }\n\n return 0;\n}\n","import type {\n TDependencyOutcome,\n TOutcome,\n} from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TVerificationModel } from '../../_verify-project@shared/_types/_systems/verification-model.type.js';\n\nimport { checkCrossingTreeAuthorization } from './_utils/check-crossing-tree-authorization/index.js';\nimport { checkEdgeTreeFrontier } from './_utils/check-edge-tree-frontier/index.js';\nimport { compareTreeFrontierOutcomes } from './_utils/compare-tree-frontier-outcomes/index.js';\n\nexport function verifyTreeFrontier(\n model: TVerificationModel\n): readonly TOutcome[] {\n const { inventory } = model.basis;\n const { trees } = model.basis.declarations;\n const { crossings, graph, surface } = model;\n\n const publicNodes = new Set<string>();\n for (const treeSurface of surface.trees) {\n for (const node of treeSurface.nodes) {\n publicNodes.add(node);\n }\n }\n\n const authorizedTreePairs = new Set<string>();\n for (const tree of trees) {\n for (const pair of tree.treeDependencyPairs) {\n authorizedTreePairs.add(`${pair.from}\\0${pair.to}`);\n }\n }\n\n const outcomes: TDependencyOutcome[] = [];\n\n for (const edge of graph.edgeMetadata) {\n const edgeOutcomes = checkEdgeTreeFrontier(\n edge,\n inventory,\n publicNodes,\n authorizedTreePairs\n );\n for (const outcome of edgeOutcomes) {\n outcomes.push(outcome);\n }\n }\n\n for (const crossing of crossings) {\n const crossingOutcome = checkCrossingTreeAuthorization(\n crossing,\n inventory,\n authorizedTreePairs\n );\n if (crossingOutcome !== undefined) {\n outcomes.push(crossingOutcome);\n }\n }\n\n outcomes.sort(compareTreeFrontierOutcomes);\n return outcomes;\n}\n","import nodePath from 'node:path';\n\nimport type { TOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TPrepareProjectResult } from './prepare-project.type.js';\n\nimport { readPackageJson } from '../../_verify-project@shared/_adapters/read-package-json/index.js';\nimport { includeExternalTargets } from './_adapters/include-external-targets/index.js';\nimport { listEntries } from './_adapters/list-entries/index.js';\nimport { loadConfig } from './_adapters/load-config/index.js';\nimport { acquirePathAliases } from './_utils/acquire-path-aliases/index.js';\nimport { buildInventory } from './_utils/build-inventory/index.js';\nimport { composeDeclarations } from './_utils/compose-declarations/index.js';\nimport { validateConfigFormat } from './_utils/validate-config-format/index.js';\nimport { validateConfigReferences } from './_utils/validate-config-references/index.js';\n\nexport function prepareProject(configPath: string): TPrepareProjectResult {\n const blocked = (\n resolvedPath: string,\n baseDirectory: string,\n loadedFiles: readonly string[],\n outcomes: readonly TOutcome[]\n ): TPrepareProjectResult => ({\n baseDirectory,\n configPath: resolvedPath,\n kind: 'blocked',\n loadedFiles,\n outcomes,\n });\n const resolvedConfigPath = nodePath.resolve(configPath);\n const loaded = loadConfig({ configPath: resolvedConfigPath });\n if (!loaded.ok) {\n return blocked(\n resolvedConfigPath,\n nodePath.dirname(resolvedConfigPath),\n [],\n loaded.outcomes\n );\n }\n const formatted = validateConfigFormat(loaded.value.config);\n if (!formatted.ok) {\n return blocked(\n loaded.value.configPath,\n loaded.value.configDirectory,\n loaded.value.loadedFiles,\n formatted.outcomes\n );\n }\n const packageJson = readPackageJson({\n directory: loaded.value.configDirectory,\n });\n if (!packageJson.ok) {\n return blocked(\n loaded.value.configPath,\n loaded.value.configDirectory,\n loaded.value.loadedFiles,\n packageJson.outcomes\n );\n }\n const aliases = acquirePathAliases({\n commonAliases: formatted.value.faf.common?.aliases,\n packageJson: packageJson.value.packageJson,\n });\n if (!aliases.ok) {\n return blocked(\n loaded.value.configPath,\n loaded.value.configDirectory,\n loaded.value.loadedFiles,\n aliases.outcomes\n );\n }\n const declarations = composeDeclarations(\n formatted.value,\n loaded.value.configDirectory\n );\n if (!declarations.ok) {\n return blocked(\n loaded.value.configPath,\n loaded.value.configDirectory,\n loaded.value.loadedFiles,\n declarations.outcomes\n );\n }\n const origins = declarations.value.trees.map((tree) => tree.originPath);\n const entries = listEntries(loaded.value.configDirectory, origins);\n if (!entries.ok) {\n return blocked(\n loaded.value.configPath,\n loaded.value.configDirectory,\n loaded.value.loadedFiles,\n entries.outcomes\n );\n }\n const built = buildInventory(entries.value, origins);\n const inventory = includeExternalTargets(\n built.inventory,\n formatted.value,\n loaded.value.configDirectory\n );\n const references = validateConfigReferences(\n formatted.value,\n declarations.value,\n inventory\n );\n if (references.length > 0) {\n return blocked(\n loaded.value.configPath,\n loaded.value.configDirectory,\n loaded.value.loadedFiles,\n [...built.outcomes, ...references]\n );\n }\n return {\n aliases: aliases.value,\n baseDirectory: loaded.value.configDirectory,\n configPath: loaded.value.configPath,\n declarations: declarations.value,\n inventory,\n inventoryOutcomes: built.outcomes,\n kind: 'ready',\n loadedFiles: loaded.value.loadedFiles,\n };\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\n\nimport type {\n TPackageJsonData,\n TReadPackageJsonInput,\n TReadPackageJsonResult,\n} from './read-package-json.type.js';\n\nimport { createOutcome } from '../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function readPackageJson(\n input: TReadPackageJsonInput\n): TReadPackageJsonResult {\n const packagePath = nodePath.join(\n nodePath.resolve(input.directory),\n 'package.json'\n );\n\n const stats = nodeFs.statSync(packagePath, { throwIfNoEntry: false });\n if (stats === undefined) {\n return {\n ok: true,\n value: {\n present: false,\n },\n };\n }\n\n const invalidPackageJson = 'configuration/invalid-package-json';\n\n if (!stats.isFile()) {\n return {\n ok: false,\n outcomes: [\n createOutcome(invalidPackageJson, {\n detail: `package.json at ${packagePath} is not a regular file`,\n element: packagePath,\n propertyPath: '',\n }),\n ],\n };\n }\n\n try {\n const rawContent = nodeFs.readFileSync(packagePath, 'utf8');\n const parsed: unknown = JSON.parse(rawContent);\n\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n if (!isRecord(parsed)) {\n return {\n ok: false,\n outcomes: [\n createOutcome(invalidPackageJson, {\n detail: `package.json at ${packagePath} does not contain a JSON object`,\n element: packagePath,\n propertyPath: '',\n }),\n ],\n };\n }\n\n const packageJsonData: TPackageJsonData = {\n packageJson: parsed,\n present: true,\n };\n\n return {\n ok: true,\n value: packageJsonData,\n };\n } catch (error: unknown) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n\n return {\n ok: false,\n outcomes: [\n createOutcome(invalidPackageJson, {\n detail: `Failed to parse package.json at ${packagePath}: ${errorMessage}`,\n element: packagePath,\n propertyPath: '',\n }),\n ],\n };\n }\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\n\nimport type { TFAFConfig } from '../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type {\n TInventory,\n TInventoryItem,\n} from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { LINTABLE_EXTENSIONS } from '../../../../../../../../../../_src@shared/_constants/faf.constant.js';\nimport { toPosixPath } from '../../../../../../_session@shared/_utils/to-posix-path/index.js';\n\nexport function includeExternalTargets(\n inventory: TInventory,\n config: TFAFConfig,\n baseDirectory: string\n): TInventory {\n const items = [...inventory.items];\n const pathToId = new Map(inventory.pathToId);\n const realPathToId = new Map(inventory.realPathToId);\n const sections = [\n config.faf.common?.externalDependencies,\n ...config.faf.locals.map((local) => local.externalDependencies),\n ];\n const targets = sections\n .flatMap((section) => section ?? [])\n .flatMap((edge) => edge.to);\n\n const dirents = nodeFs.existsSync(baseDirectory)\n ? nodeFs.readdirSync(baseDirectory, { withFileTypes: true })\n : [];\n\n for (const dirent of dirents) {\n const isRootCandidate =\n dirent.isFile() &&\n dirent.name !== 'fafconfig.ts' &&\n LINTABLE_EXTENSIONS.some((extension) => dirent.name.endsWith(extension));\n if (isRootCandidate) {\n targets.push(dirent.name);\n }\n }\n\n for (const target of targets) {\n const normalized = toPosixPath(target);\n const absolute = nodePath.resolve(baseDirectory, normalized);\n const stats = nodeFs.statSync(absolute, { throwIfNoEntry: false });\n const isRegularFile = stats?.isFile() === true;\n if (!isRegularFile || pathToId.has(normalized)) {\n continue;\n }\n const id = items.length;\n const isSymlink = nodeFs.lstatSync(absolute).isSymbolicLink();\n const item: TInventoryItem = {\n depth: 0,\n id,\n isSymlink,\n kind: 'file',\n parentId: null,\n path: normalized,\n preorderEnd: id,\n preorderStart: id,\n realPath: nodeFs.realpathSync(absolute),\n treeOrigin: null,\n };\n items.push(item);\n pathToId.set(item.path, id);\n realPathToId.set(item.realPath, id);\n }\n\n return { items, pathToId, realPathToId };\n}\n","import path from 'node:path';\n\nimport type {\n TOutcome,\n TResult,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TRawInventoryEntry } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { scanTreeOrigin } from './_adapters/scan-tree-origin/index.js';\n\nexport function listEntries(\n baseDirectory: string,\n origins: readonly string[]\n): TResult<readonly TRawInventoryEntry[]> {\n const resolvedBase = path.resolve(baseDirectory);\n const entries: TRawInventoryEntry[] = [];\n const outcomes: TOutcome[] = [];\n\n for (const rawOrigin of origins) {\n const scanResult = scanTreeOrigin(rawOrigin, resolvedBase);\n for (const outcome of scanResult.outcomes) {\n outcomes.push(outcome);\n }\n for (const entry of scanResult.entries) {\n entries.push(entry);\n }\n }\n\n return outcomes.length > 0\n ? { ok: false, outcomes }\n : { ok: true, value: entries };\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { TOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TRawInventoryEntry } from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TScanTreeOriginResult } from './scan-tree-origin.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { toPosixPath } from '../../../../../../../../_session@shared/_utils/to-posix-path/index.js';\nimport { assertInvariant } from '../../../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { compareOrdinal } from '../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { inspectOrigin } from './_adapters/inspect-origin/index.js';\nimport { processDirent } from './_adapters/process-dirent/index.js';\n\nexport function scanTreeOrigin(\n rawOrigin: string,\n resolvedBase: string\n): TScanTreeOriginResult {\n const posixOrigin = toPosixPath(rawOrigin);\n const withoutPrefix = posixOrigin.startsWith('./')\n ? posixOrigin.slice(2)\n : posixOrigin;\n const normalizedOrigin = withoutPrefix.endsWith('/')\n ? withoutPrefix.slice(0, -1)\n : withoutPrefix;\n\n const originAbs = path.resolve(resolvedBase, normalizedOrigin);\n const entries: TRawInventoryEntry[] = [];\n const outcomes: TOutcome[] = [];\n\n const inspection = inspectOrigin(originAbs, normalizedOrigin, resolvedBase);\n\n if (!inspection.ok) {\n outcomes.push(inspection.outcome);\n return { entries, outcomes };\n }\n\n entries.push({\n isSymlink: inspection.isSymlink,\n kind: 'directory',\n path: normalizedOrigin,\n realPath: inspection.originReal,\n });\n\n if (inspection.isSymlink) {\n return { entries, outcomes };\n }\n\n const queue: string[] = [originAbs];\n\n const processDirectory = (\n currentDirectoryAbsolute: string\n ): {\n readonly directoriesToVisit: readonly string[];\n readonly entries: readonly TRawInventoryEntry[];\n readonly outcomes: readonly TOutcome[];\n } => {\n let directoryEntries: fs.Dirent[];\n try {\n directoryEntries = fs.readdirSync(currentDirectoryAbsolute, {\n withFileTypes: true,\n });\n } catch (error: unknown) {\n assertInvariant(error instanceof Error, 'Expected file system error');\n const relativeDirectory = toPosixPath(\n path.relative(resolvedBase, currentDirectoryAbsolute)\n );\n return {\n directoriesToVisit: [],\n entries: [],\n outcomes: [\n createOutcome('unverified/unreadable-entry', {\n detail: error.message,\n element: relativeDirectory,\n reason: error.message,\n }),\n ],\n };\n }\n\n directoryEntries.sort((left, right) =>\n compareOrdinal(left.name, right.name)\n );\n\n const stepEntries: TRawInventoryEntry[] = [];\n const stepOutcomes: TOutcome[] = [];\n const stepDirectories: string[] = [];\n\n for (const dirent of directoryEntries) {\n const result = processDirent(\n dirent,\n currentDirectoryAbsolute,\n resolvedBase\n );\n if (result.entry !== undefined) {\n stepEntries.push(result.entry);\n }\n if (result.outcome !== undefined) {\n stepOutcomes.push(result.outcome);\n }\n if (result.directoryToVisit !== undefined) {\n stepDirectories.push(result.directoryToVisit);\n }\n }\n\n return {\n directoriesToVisit: stepDirectories,\n entries: stepEntries,\n outcomes: stepOutcomes,\n };\n };\n\n while (queue.length > 0) {\n const currentDirectoryAbsolute = queue.shift();\n assertInvariant(\n currentDirectoryAbsolute !== undefined,\n 'Queue cannot be empty'\n );\n\n const step = processDirectory(currentDirectoryAbsolute);\n for (const outcome of step.outcomes) {\n outcomes.push(outcome);\n }\n for (const entry of step.entries) {\n entries.push(entry);\n }\n for (const directory of step.directoriesToVisit) {\n queue.push(directory);\n }\n }\n\n return { entries, outcomes };\n}\n","import fs from 'node:fs';\n\nimport type { TInspectOriginResult } from './inspect-origin.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { assertInvariant } from '../../../../../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { toRelativeRealPath } from '../../_scan-tree-origin@shared/_utils/to-relative-real-path/index.js';\n\nexport function inspectOrigin(\n originAbs: string,\n normalizedOrigin: string,\n resolvedBase: string\n): TInspectOriginResult {\n let originLstat: fs.Stats;\n try {\n originLstat = fs.lstatSync(originAbs);\n } catch (error: unknown) {\n assertInvariant(error instanceof Error, 'Expected file system error');\n const isEnoent = 'code' in error && error.code === 'ENOENT';\n\n if (isEnoent) {\n return {\n ok: false,\n outcome: createOutcome('configuration/missing-origin', {\n element: normalizedOrigin,\n propertyPath: 'faf.locals',\n }),\n };\n }\n\n return {\n ok: false,\n outcome: createOutcome('unverified/unreadable-origin', {\n detail: error.message,\n element: normalizedOrigin,\n reason: error.message,\n }),\n };\n }\n\n const isOriginSymlink = originLstat.isSymbolicLink();\n let isDirectory = originLstat.isDirectory();\n if (isOriginSymlink) {\n try {\n const targetStat = fs.statSync(originAbs);\n isDirectory = targetStat.isDirectory();\n } catch {\n isDirectory = false;\n }\n }\n\n if (!isDirectory) {\n return {\n ok: false,\n outcome: createOutcome('configuration/invalid-origin', {\n element: normalizedOrigin,\n propertyPath: 'faf.locals',\n }),\n };\n }\n\n const originReal = isOriginSymlink\n ? toRelativeRealPath(fs.realpathSync(originAbs), resolvedBase)\n : normalizedOrigin;\n\n return {\n isSymlink: isOriginSymlink,\n ok: true,\n originReal,\n };\n}\n","import path from 'node:path';\n\nimport { toPosixPath } from '../../../../../../../../../../../_session@shared/_utils/to-posix-path/index.js';\n\nexport function toRelativeRealPath(\n rawRealPathAbsolute: string,\n resolvedBaseDirectory: string\n): string {\n const normalizedReal = toPosixPath(rawRealPathAbsolute);\n const normalizedBase = toPosixPath(resolvedBaseDirectory);\n const relative = path.posix.relative(normalizedBase, normalizedReal);\n if (relative.startsWith('..') || path.posix.isAbsolute(relative)) {\n return normalizedReal;\n }\n if (relative === '') {\n return '.';\n }\n return relative;\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { TEntryKind } from '../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TProcessDirentResult } from './process-dirent.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { toPosixPath } from '../../../../../../../../../../_session@shared/_utils/to-posix-path/index.js';\nimport { assertInvariant } from '../../../../../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { toRelativeRealPath } from '../../_scan-tree-origin@shared/_utils/to-relative-real-path/index.js';\n\nexport function processDirent(\n dirent: fs.Dirent,\n currentDirectoryAbsolute: string,\n resolvedBase: string\n): TProcessDirentResult {\n const itemAbsolute = path.join(currentDirectoryAbsolute, dirent.name);\n const itemRelative = toPosixPath(path.relative(resolvedBase, itemAbsolute));\n\n if (dirent.isSymbolicLink()) {\n try {\n const rawReal = fs.realpathSync(itemAbsolute);\n const realPath = toRelativeRealPath(rawReal, resolvedBase);\n const targetStat = fs.statSync(rawReal);\n let kind: TEntryKind = 'file';\n if (targetStat.isDirectory()) {\n kind = 'directory';\n }\n return {\n entry: { isSymlink: true, kind, path: itemRelative, realPath },\n };\n } catch (error: unknown) {\n assertInvariant(error instanceof Error, 'Expected file system error');\n return {\n outcome: createOutcome('unverified/unreadable-entry', {\n detail: error.message,\n element: itemRelative,\n reason: error.message,\n }),\n };\n }\n }\n\n if (dirent.isDirectory()) {\n return {\n directoryToVisit: itemAbsolute,\n entry: {\n isSymlink: false,\n kind: 'directory',\n path: itemRelative,\n realPath: itemRelative,\n },\n };\n }\n\n return {\n entry: {\n isSymlink: false,\n kind: 'file',\n path: itemRelative,\n realPath: itemRelative,\n },\n };\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\nimport nodeUrl from 'node:url';\nimport {\n MessageChannel,\n receiveMessageOnPort,\n Worker,\n} from 'node:worker_threads';\n\nimport type {\n TLoadConfigInput,\n TLoadConfigResult,\n} from './load-config.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { readPackageJson } from '../../../../_verify-project@shared/_adapters/read-package-json/index.js';\nimport { classifyWorkerOutcome } from './_utils/classify-worker-outcome/index.js';\n\nexport function loadConfig(input: TLoadConfigInput): TLoadConfigResult {\n const resolvedConfigPath = nodePath.resolve(input.configPath);\n\n const stats = nodeFs.statSync(resolvedConfigPath, {\n throwIfNoEntry: false,\n });\n\n if (stats === undefined || !stats.isFile()) {\n return {\n ok: false,\n outcomes: [\n createOutcome('configuration/missing-config-file', {\n element: resolvedConfigPath,\n propertyPath: 'faf',\n }),\n ],\n };\n }\n\n const timeoutBudget = input.timeoutMs ?? 30_000;\n const sharedBuffer = new SharedArrayBuffer(4);\n const int32Array = new Int32Array(sharedBuffer);\n const { port1, port2 } = new MessageChannel();\n\n const workerScript = `\n(async () => {\n let int32ArrayRef;\n try {\n const { workerData } = await import(\"node:worker_threads\");\n const nodeModule = await import(\"node:module\");\n const { fileURLToPath } = await import(\"node:url\");\n\n int32ArrayRef = workerData.int32Array;\n const { fileUrl, port } = workerData;\n const loadedFiles = [];\n const seenFiles = new Set();\n\n nodeModule.registerHooks({\n load(url, context, nextLoad) {\n if (url.startsWith(\"file:\") && !url.includes(\"/node_modules/\") && !url.includes(\"\\\\\\\\node_modules\\\\\\\\\")) {\n try {\n const resolvedFilePath = fileURLToPath(url);\n if (!seenFiles.has(resolvedFilePath)) {\n seenFiles.add(resolvedFilePath);\n loadedFiles.push(resolvedFilePath);\n }\n } catch {}\n }\n return nextLoad(url, context);\n }\n });\n\n try {\n const loadedModule = await import(fileUrl);\n if (!(\"default\" in loadedModule) || loadedModule.default === undefined) {\n port.postMessage({ kind: \"missing\", loadedFiles });\n return;\n }\n\n const defaultExport = loadedModule.default;\n if (typeof defaultExport === \"function\") {\n port.postMessage({ kind: \"function\", loadedFiles });\n return;\n }\n\n if (defaultExport !== null && typeof defaultExport === \"object\" && typeof defaultExport.then === \"function\") {\n port.postMessage({ kind: \"thenable\", loadedFiles });\n return;\n }\n\n try {\n port.postMessage({ kind: \"value\", loadedFiles, value: defaultExport });\n } catch (cloneError) {\n const message = cloneError instanceof Error ? cloneError.message : String(cloneError);\n port.postMessage({ kind: \"clone-error\", message });\n }\n } catch (importError) {\n const code = typeof importError === \"object\" && importError !== null && \"code\" in importError && typeof importError.code === \"string\" ? importError.code : undefined;\n const message = importError instanceof Error ? importError.message : String(importError);\n const name = typeof importError === \"object\" && importError !== null && \"name\" in importError && typeof importError.name === \"string\" ? importError.name : undefined;\n port.postMessage({ error: { code, message, name }, kind: \"error\" });\n }\n } catch {} finally {\n if (int32ArrayRef) {\n Atomics.store(int32ArrayRef, 0, 1);\n Atomics.notify(int32ArrayRef, 0);\n }\n }\n})();\n`;\n\n const worker = new Worker(workerScript, {\n eval: true,\n transferList: [port2],\n workerData: {\n fileUrl: nodeUrl.pathToFileURL(resolvedConfigPath).href,\n int32Array,\n port: port2,\n },\n });\n\n try {\n const waitResult = Atomics.wait(int32Array, 0, 0, timeoutBudget);\n if (waitResult === 'timed-out') {\n return {\n ok: false,\n outcomes: [\n createOutcome('unverified/config-loading-timeout', {\n element: resolvedConfigPath,\n reason: `Worker execution exceeded timeout budget of ${timeoutBudget}ms`,\n }),\n ],\n };\n }\n\n const messageWrapper = receiveMessageOnPort(port1);\n const messagePayload: unknown = messageWrapper?.message;\n\n const configDirectory = nodePath.dirname(resolvedConfigPath);\n const packageJsonResult = readPackageJson({\n directory: configDirectory,\n });\n const packageJson =\n packageJsonResult.ok && packageJsonResult.value.present\n ? packageJsonResult.value.packageJson\n : undefined;\n\n return classifyWorkerOutcome({\n configPath: resolvedConfigPath,\n packageJson,\n rawMessage: messagePayload,\n });\n } finally {\n port1.close();\n void worker.terminate();\n }\n}\n","import nodePath from 'node:path';\n\nimport type { TConfigConstraint } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TLoadConfigResult } from '../../_load-config@shared/_types/load-config.type.js';\nimport type { TClassifyWorkerOutcomeInput } from './classify-worker-outcome.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { workerMessageSchema } from './_schemas/worker-message-schema/index.js';\n\nexport function classifyWorkerOutcome(\n input: TClassifyWorkerOutcomeInput\n): TLoadConfigResult {\n const { configPath, rawMessage } = input;\n const configLoadFailure = 'configuration/config-load-failure' as const;\n const invalidPayloadMessage =\n 'Worker terminated without transmitting a valid configuration payload';\n const defaultProperty = 'default';\n\n const makeFailure = (\n constraint: TConfigConstraint,\n detail?: string\n ): TLoadConfigResult => ({\n ok: false,\n outcomes: [\n createOutcome(constraint, {\n ...(detail !== undefined && { detail }),\n element: configPath,\n propertyPath: defaultProperty,\n }),\n ],\n });\n\n const isCommonJsConfig = (): boolean =>\n input.packageJson?.['type'] === 'commonjs';\n\n const classifyError = (errorPayload: unknown): TLoadConfigResult => {\n const parseDetails = (\n error: unknown\n ): { readonly code?: string; readonly message: string } => {\n if (typeof error !== 'object' || error === null || Array.isArray(error)) {\n return { message: '' };\n }\n const message =\n 'message' in error && typeof error.message === 'string'\n ? error.message\n : '';\n const code =\n 'code' in error && typeof error.code === 'string'\n ? error.code\n : undefined;\n return { code, message };\n };\n\n const { code, message } = parseDetails(errorPayload);\n const codeSuffix = code === undefined ? '' : ` (code: ${code})`;\n\n if (\n code === 'ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX' ||\n message.includes('TypeScript enum is not supported')\n ) {\n return makeFailure(\n 'configuration/unsupported-typescript-syntax',\n `Non-strippable TypeScript syntax violates configuration constraints: ${message}${codeSuffix}`\n );\n }\n\n if (code === 'ERR_MODULE_NOT_FOUND') {\n return makeFailure(\n 'configuration/unresolved-relative-import',\n `Relative import without explicit file extension violates configuration constraints: ${message}${codeSuffix}`\n );\n }\n\n return isCommonJsConfig()\n ? makeFailure(\n 'configuration/commonjs-package-type',\n `Package configuration declaring \"type\": \"commonjs\" violates configuration constraints: ${message}${codeSuffix}. TypeScript ES module loading requires \"type\": \"module\" in package.json.`\n )\n : makeFailure(\n configLoadFailure,\n `Failed to load fafconfig.ts: ${message}${codeSuffix}`\n );\n };\n\n const classifyCloneError = (payload: object): TLoadConfigResult => {\n const cloneMessage =\n 'message' in payload && typeof payload.message === 'string'\n ? payload.message\n : 'Unknown data clone error';\n return makeFailure(\n 'configuration/unclonable-config-value',\n `Exported configuration default value could not be cloned via structured clone: ${cloneMessage}`\n );\n };\n\n const classifyValue = (payload: object): TLoadConfigResult => {\n const hasValue = 'value' in payload;\n const loadedFiles =\n 'loadedFiles' in payload ? payload.loadedFiles : undefined;\n\n const areLoadedFilesValid =\n Array.isArray(loadedFiles) &&\n loadedFiles.every((file: unknown) => typeof file === 'string');\n\n if (hasValue && areLoadedFilesValid) {\n return {\n ok: true,\n value: {\n config: payload.value,\n configDirectory: nodePath.dirname(configPath),\n configPath,\n loadedFiles,\n },\n };\n }\n\n return makeFailure(configLoadFailure, invalidPayloadMessage);\n };\n\n const dispatchKind = (payload: object, kind: string): TLoadConfigResult => {\n switch (kind) {\n case 'clone-error': {\n return classifyCloneError(payload);\n }\n case 'error': {\n const errorPayload = 'error' in payload ? payload.error : undefined;\n return classifyError(errorPayload);\n }\n case 'function': {\n return makeFailure('configuration/invalid-default-export-function');\n }\n case 'missing': {\n return makeFailure('configuration/missing-default-export');\n }\n case 'thenable': {\n return makeFailure('configuration/invalid-default-export-promise');\n }\n case 'value': {\n return classifyValue(payload);\n }\n default: {\n return makeFailure(configLoadFailure, invalidPayloadMessage);\n }\n }\n };\n\n const dispatchValidKind = (payload: object): TLoadConfigResult =>\n 'kind' in payload && typeof payload.kind === 'string'\n ? dispatchKind(payload, payload.kind)\n : makeFailure(configLoadFailure, invalidPayloadMessage);\n\n const parsedMessage = workerMessageSchema.safeParse(rawMessage);\n return parsedMessage.success\n ? dispatchValidKind(parsedMessage.data)\n : makeFailure(configLoadFailure, invalidPayloadMessage);\n}\n","import { z } from 'zod';\n\nexport const workerMessageSchema = z.record(z.string(), z.unknown());\n","export const FAF_CONFIG_ELEMENT = 'fafconfig.ts';\n\nexport const PACKAGE_JSON_ELEMENT = 'package.json';\n\nexport const COMMON_ALIASES_PROPERTY_PATH = 'faf.common.aliases';\n\nexport const PACKAGE_JSON_IMPORTS_PROPERTY_PATH = 'imports';\n","import type { TEffectivePathAlias } from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nexport function convertCommonAliases(\n commonAliases: Readonly<Record<string, string>>\n): readonly TEffectivePathAlias[] {\n const aliases: TEffectivePathAlias[] = [];\n\n for (const [key, rawBase] of Object.entries(commonAliases)) {\n const withoutLeadingDot = rawBase.startsWith('./')\n ? rawBase.slice(2)\n : rawBase;\n\n const baseWithoutTrailingSlash = withoutLeadingDot.endsWith('/')\n ? withoutLeadingDot.slice(0, -1)\n : withoutLeadingDot;\n\n const normalizedBase =\n baseWithoutTrailingSlash === '' ? '.' : baseWithoutTrailingSlash;\n\n aliases.push({\n prefix: key,\n source: 'common.aliases',\n targets: [normalizedBase],\n });\n }\n\n return aliases;\n}\n","import { z } from 'zod';\n\nexport const importsObjectSchema = z.record(z.string(), z.unknown());\n","import { z } from 'zod';\n\nexport const importTargetNodeSchema = z.union([\n z.string(),\n z.null(),\n z.array(z.unknown()),\n z.record(z.string(), z.unknown()),\n]);\n","export function cleanBasePath(rawBase: string): string {\n const withoutTrailingSlash = rawBase.endsWith('/')\n ? rawBase.slice(0, -1)\n : rawBase;\n\n return withoutTrailingSlash === '' ? '.' : withoutTrailingSlash;\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TResolveLocalSubpathTargetResult } from './resolve-local-subpath-target.type.js';\n\nimport { createOutcome as makeOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n PACKAGE_JSON_ELEMENT,\n PACKAGE_JSON_IMPORTS_PROPERTY_PATH,\n} from '../../../../../../_acquire-path-aliases@shared/_constants/acquire-path-aliases.constant.js';\nimport { cleanBasePath } from './_utils/clean-base-path/index.js';\n\nexport function resolveLocalSubpathTarget(\n targetString: string,\n subpathKey: string,\n hasWildcardKey: boolean\n): TResolveLocalSubpathTargetResult {\n const createOutcome = (\n constraint:\n | 'configuration/invalid-alias-source'\n | 'configuration/unresolvable-alias-base',\n detail: string\n ): TConfigOutcome =>\n makeOutcome(constraint, {\n detail,\n element: PACKAGE_JSON_ELEMENT,\n propertyPath: `${PACKAGE_JSON_IMPORTS_PROPERTY_PATH}.${subpathKey}`,\n });\n\n if (targetString.length === 0) {\n return {\n outcome: createOutcome(\n 'configuration/invalid-alias-source',\n `package.json imports target path cannot be empty: ${subpathKey}`\n ),\n };\n }\n\n if (targetString.startsWith('../') || targetString.startsWith('/')) {\n return {\n outcome: createOutcome(\n 'configuration/invalid-alias-source',\n `package.json imports target cannot use parent directory traversal or absolute path: ${targetString}`\n ),\n };\n }\n\n if (!targetString.startsWith('./')) {\n return { target: null };\n }\n\n if (hasWildcardKey) {\n const isSingleTerminalWildcard =\n targetString.endsWith('/*') &&\n targetString.indexOf('*') === targetString.length - 1;\n\n if (!isSingleTerminalWildcard) {\n return {\n outcome: createOutcome(\n 'configuration/unresolvable-alias-base',\n `Local import target must contain a single terminal wildcard matching key: ${targetString}`\n ),\n };\n }\n\n return { target: cleanBasePath(targetString.slice(2, -2)) };\n }\n\n if (targetString.includes('*')) {\n return {\n outcome: createOutcome(\n 'configuration/unresolvable-alias-base',\n `Local import target must not contain wildcards when key has no wildcard: ${targetString}`\n ),\n };\n }\n\n return { target: cleanBasePath(targetString.slice(2)) };\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TCollectSubpathTargetsResult } from './collect-subpath-targets.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n PACKAGE_JSON_ELEMENT,\n PACKAGE_JSON_IMPORTS_PROPERTY_PATH,\n} from '../../../../_acquire-path-aliases@shared/_constants/acquire-path-aliases.constant.js';\nimport { importTargetNodeSchema } from './_schemas/import-target-node-schema/index.js';\nimport { resolveLocalSubpathTarget } from './_utils/resolve-local-subpath-target/index.js';\n\nexport function collectSubpathTargets(\n entryValue: unknown,\n subpathKey: string,\n hasWildcardKey: boolean\n): TCollectSubpathTargetsResult {\n const targets: string[] = [];\n\n const invalidType = (value: unknown): TConfigOutcome =>\n createOutcome('configuration/invalid-alias-source', {\n detail: `Invalid package.json imports target type: ${typeof value}`,\n element: PACKAGE_JSON_ELEMENT,\n propertyPath: `${PACKAGE_JSON_IMPORTS_PROPERTY_PATH}.${subpathKey}`,\n });\n\n const traverse = (currentValue: unknown): null | TConfigOutcome => {\n const parsed = importTargetNodeSchema.safeParse(currentValue);\n if (!parsed.success) {\n return invalidType(currentValue);\n }\n if (typeof parsed.data === 'string') {\n const resolution = resolveLocalSubpathTarget(\n parsed.data,\n subpathKey,\n hasWildcardKey\n );\n if ('outcome' in resolution) {\n return resolution.outcome;\n }\n if (resolution.target !== null) {\n targets.push(resolution.target);\n }\n return null;\n }\n if (parsed.data === null) {\n return null;\n }\n const children = Array.isArray(parsed.data)\n ? parsed.data\n : Object.values(parsed.data);\n for (const item of children) {\n const outcome = traverse(item);\n if (outcome !== null) {\n return outcome;\n }\n }\n return null;\n };\n\n const failureOutcome = traverse(entryValue);\n if (failureOutcome !== null) {\n return { outcome: failureOutcome };\n }\n\n const uniqueTargets: string[] = [];\n for (const target of targets) {\n if (!uniqueTargets.includes(target)) {\n uniqueTargets.push(target);\n }\n }\n return { targets: uniqueTargets };\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TValidateSubpathKeyResult } from './validate-subpath-key.type.js';\n\nimport { createOutcome as makeOutcome } from '../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n PACKAGE_JSON_ELEMENT,\n PACKAGE_JSON_IMPORTS_PROPERTY_PATH,\n} from '../../../../_acquire-path-aliases@shared/_constants/acquire-path-aliases.constant.js';\n\nexport function validateSubpathKey(key: string): TValidateSubpathKeyResult {\n const createOutcome = (\n constraint:\n | 'configuration/invalid-alias-key'\n | 'configuration/invalid-alias-source'\n | 'configuration/unresolvable-alias-base',\n detail: string\n ): TConfigOutcome =>\n makeOutcome(constraint, {\n detail,\n element: PACKAGE_JSON_ELEMENT,\n propertyPath: `${PACKAGE_JSON_IMPORTS_PROPERTY_PATH}.${key}`,\n });\n\n if (key === '#' || !key.startsWith('#')) {\n return {\n outcome: createOutcome(\n 'configuration/invalid-alias-source',\n `package.json imports subpath keys must start with '#' followed by a path: ${key}`\n ),\n };\n }\n\n const starMatches = key.match(/\\*/g);\n const starCount = starMatches === null ? 0 : starMatches.length;\n\n if (starCount > 1) {\n return {\n outcome: createOutcome(\n 'configuration/unresolvable-alias-base',\n `package.json imports subpath key cannot contain multiple wildcards: ${key}`\n ),\n };\n }\n\n if (starCount === 1) {\n if (key.endsWith('/*')) {\n return {\n hasWildcardKey: true,\n prefix: key.slice(0, -2),\n };\n }\n\n return {\n outcome: createOutcome(\n 'configuration/unresolvable-alias-base',\n `Wildcard in package.json imports subpath key must be terminal and preceded by a slash: ${key}`\n ),\n };\n }\n\n if (key.endsWith('/')) {\n return {\n outcome: createOutcome(\n 'configuration/invalid-alias-source',\n `package.json imports subpath key must not end with a slash: ${key}`\n ),\n };\n }\n\n return {\n hasWildcardKey: false,\n prefix: key,\n };\n}\n","import type {\n TConfigOutcome,\n TResult,\n} from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TEffectivePathAlias } from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n PACKAGE_JSON_ELEMENT,\n PACKAGE_JSON_IMPORTS_PROPERTY_PATH,\n} from '../../_acquire-path-aliases@shared/_constants/acquire-path-aliases.constant.js';\nimport { importsObjectSchema } from './_schemas/imports-object-schema/index.js';\nimport { collectSubpathTargets } from './_utils/collect-subpath-targets/index.js';\nimport { validateSubpathKey } from './_utils/validate-subpath-key/index.js';\n\nexport function parsePackageJsonImports(\n rawImports: unknown\n): TResult<readonly TEffectivePathAlias[]> {\n const parsedImports = importsObjectSchema.safeParse(rawImports);\n if (!parsedImports.success) {\n return {\n ok: false,\n outcomes: [\n createOutcome('configuration/invalid-alias-source', {\n detail: 'package.json imports must be a JSON object',\n element: PACKAGE_JSON_ELEMENT,\n propertyPath: PACKAGE_JSON_IMPORTS_PROPERTY_PATH,\n }),\n ],\n };\n }\n\n const outcomes: TConfigOutcome[] = [];\n const aliases: TEffectivePathAlias[] = [];\n\n const processEntry = (\n key: string,\n rawValue: unknown\n ): null | TConfigOutcome => {\n const keyResult = validateSubpathKey(key);\n\n if ('outcome' in keyResult) {\n return keyResult.outcome;\n }\n\n const targetResult = collectSubpathTargets(\n rawValue,\n key,\n keyResult.hasWildcardKey\n );\n\n if ('outcome' in targetResult) {\n return targetResult.outcome;\n }\n\n if (targetResult.targets.length > 0) {\n aliases.push({\n prefix: keyResult.prefix,\n source: 'package.json#imports',\n targets: targetResult.targets,\n });\n }\n\n return null;\n };\n\n for (const [key, rawValue] of Object.entries(parsedImports.data)) {\n const outcome = processEntry(key, rawValue);\n if (outcome !== null) {\n outcomes.push(outcome);\n }\n }\n\n if (outcomes.length > 0) {\n return {\n ok: false,\n outcomes,\n };\n }\n\n return {\n ok: true,\n value: aliases,\n };\n}\n","import type {\n TAcquirePathAliasesInput,\n TAcquirePathAliasesResult,\n} from './acquire-path-aliases.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n COMMON_ALIASES_PROPERTY_PATH,\n FAF_CONFIG_ELEMENT,\n} from './_acquire-path-aliases@shared/_constants/acquire-path-aliases.constant.js';\nimport { convertCommonAliases } from './_utils/convert-common-aliases/index.js';\nimport { parsePackageJsonImports } from './_utils/parse-package-json-imports/index.js';\n\nexport function acquirePathAliases(\n input: TAcquirePathAliasesInput\n): TAcquirePathAliasesResult {\n const rawImports = input.packageJson?.['imports'];\n const hasImportsField = rawImports !== undefined;\n const hasAliasesField = input.commonAliases !== undefined;\n\n if (hasImportsField) {\n const importsResult = parsePackageJsonImports(rawImports);\n\n if (!importsResult.ok) {\n return importsResult;\n }\n\n if (hasAliasesField) {\n return {\n ok: false,\n outcomes: [\n createOutcome('configuration/duplicate-alias-source', {\n element: FAF_CONFIG_ELEMENT,\n propertyPath: COMMON_ALIASES_PROPERTY_PATH,\n }),\n ],\n };\n }\n\n return importsResult;\n }\n\n if (input.commonAliases !== undefined) {\n return {\n ok: true,\n value: convertCommonAliases(input.commonAliases),\n };\n }\n\n return {\n ok: true,\n value: [],\n };\n}\n","import type { TOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TInventoryItem } from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function collectSymlinkOutcomes(\n items: readonly TInventoryItem[]\n): readonly TOutcome[] {\n const outcomes: TOutcome[] = [];\n\n for (const item of items) {\n if (item.isSymlink && item.treeOrigin !== null) {\n outcomes.push(\n createOutcome('unverified/symbolic-link', {\n detail: item.realPath,\n element: item.path,\n reason: item.realPath,\n })\n );\n }\n }\n\n return outcomes;\n}\n","import type {\n TGroupTreeNodesResult,\n TInProgressInventoryEntry,\n} from '../../_build-inventory@shared/_types/build-inventory.type.js';\n\nimport { compareOrdinal } from '../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function groupTreeNodes(\n entryMap: ReadonlyMap<string, TInProgressInventoryEntry>\n): TGroupTreeNodesResult {\n const roots: string[] = [];\n const childrenMap = new Map<string, string[]>();\n\n for (const [path, item] of entryMap) {\n if (path === item.treeOrigin) {\n roots.push(path);\n continue;\n }\n\n const lastSlash = path.lastIndexOf('/');\n const parentPath =\n lastSlash === -1 ? item.treeOrigin : path.slice(0, lastSlash);\n const siblings = childrenMap.get(parentPath);\n if (siblings === undefined) {\n childrenMap.set(parentPath, [path]);\n } else {\n siblings.push(path);\n }\n }\n\n roots.sort(compareOrdinal);\n\n for (const children of childrenMap.values()) {\n children.sort((left, right) =>\n compareOrdinal(\n left.slice(left.lastIndexOf('/') + 1),\n right.slice(right.lastIndexOf('/') + 1)\n )\n );\n }\n\n return { childrenMap, roots };\n}\n","import { toPosixPath } from '../../../../../../../../_session@shared/_utils/to-posix-path/index.js';\n\nexport function normalizeOrigins(\n origins: readonly string[]\n): readonly string[] {\n return origins.map((rawOrigin) => {\n const posix = toPosixPath(rawOrigin);\n const withoutPrefix = posix.startsWith('./') ? posix.slice(2) : posix;\n return withoutPrefix.endsWith('/') && withoutPrefix.length > 1\n ? withoutPrefix.slice(0, -1)\n : withoutPrefix;\n });\n}\n","import type { TInProgressInventoryEntry } from '../../_build-inventory@shared/_types/build-inventory.type.js';\n\nexport function populateEntryMap(\n filteredEntries: readonly TInProgressInventoryEntry[],\n normalizedOrigins: readonly string[]\n): Map<string, TInProgressInventoryEntry> {\n const entryMap = new Map<string, TInProgressInventoryEntry>();\n\n for (const entry of filteredEntries) {\n if (!entryMap.has(entry.path)) {\n entryMap.set(entry.path, entry);\n }\n }\n\n for (const origin of normalizedOrigins) {\n if (!entryMap.has(origin)) {\n entryMap.set(origin, {\n isSymlink: false,\n kind: 'directory',\n path: origin,\n realPath: origin,\n treeOrigin: origin,\n });\n }\n }\n\n const initialItems: TInProgressInventoryEntry[] = [];\n entryMap.forEach((item) => {\n initialItems.push(item);\n });\n\n for (const item of initialItems) {\n let current = item.path;\n while (current !== item.treeOrigin && current.includes('/')) {\n const parentSlash = current.lastIndexOf('/');\n const parentPath = current.slice(0, parentSlash);\n if (!entryMap.has(parentPath)) {\n entryMap.set(parentPath, {\n isSymlink: false,\n kind: 'directory',\n path: parentPath,\n realPath: parentPath,\n treeOrigin: item.treeOrigin,\n });\n }\n current = parentPath;\n }\n }\n\n return entryMap;\n}\n","export function resolveTreeOrigin(\n entryPath: string,\n normalizedOrigins: readonly string[]\n): null | string {\n let matchedOrigin: null | string = null;\n\n for (const origin of normalizedOrigins) {\n if (origin === '.') {\n matchedOrigin = origin;\n continue;\n }\n\n if (\n (entryPath === origin || entryPath.startsWith(`${origin}/`)) &&\n (matchedOrigin === null || origin.length > matchedOrigin.length)\n ) {\n matchedOrigin = origin;\n }\n }\n\n return matchedOrigin;\n}\n","import type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TInProgressInventoryEntry } from '../../_build-inventory@shared/_types/build-inventory.type.js';\n\nexport function traverseInventoryTree(\n entryMap: ReadonlyMap<string, TInProgressInventoryEntry>,\n roots: readonly string[],\n childrenMap: ReadonlyMap<string, readonly string[]>\n): TInventory {\n let nextId = 0;\n const items: TInventoryItem[] = [];\n const pathToId = new Map<string, number>();\n const realPathToId = new Map<string, number>();\n\n const visit = (\n currentPath: string,\n parentId: null | number,\n depth: number\n ): void => {\n const raw = entryMap.get(currentPath);\n if (raw === undefined) {\n return;\n }\n\n const id = nextId;\n nextId += 1;\n const preorderStart = id;\n\n const children = childrenMap.get(currentPath) ?? [];\n for (const childPath of children) {\n visit(childPath, id, depth + 1);\n }\n\n const preorderEnd = nextId - 1;\n\n const item: TInventoryItem = {\n depth,\n id,\n isSymlink: raw.isSymlink,\n kind: raw.kind,\n parentId,\n path: raw.path,\n preorderEnd,\n preorderStart,\n realPath: raw.realPath,\n treeOrigin: raw.treeOrigin,\n };\n\n items[id] = item;\n pathToId.set(item.path, id);\n\n if (!item.isSymlink || !realPathToId.has(item.realPath)) {\n realPathToId.set(item.realPath, id);\n }\n };\n\n for (const rootPath of roots) {\n visit(rootPath, null, 0);\n }\n\n return { items, pathToId, realPathToId };\n}\n","import type { TRawInventoryEntry } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type {\n TBuildInventoryResult,\n TInProgressInventoryEntry,\n} from './build-inventory.type.js';\n\nimport { collectSymlinkOutcomes } from './_utils/collect-symlink-outcomes/index.js';\nimport { groupTreeNodes } from './_utils/group-tree-nodes/index.js';\nimport { normalizeOrigins } from './_utils/normalize-origins/index.js';\nimport { populateEntryMap } from './_utils/populate-entry-map/index.js';\nimport { resolveTreeOrigin } from './_utils/resolve-tree-origin/index.js';\nimport { traverseInventoryTree } from './_utils/traverse-inventory-tree/index.js';\n\nexport function buildInventory(\n entries: readonly TRawInventoryEntry[],\n origins: readonly string[]\n): TBuildInventoryResult {\n const normalizedOrigins = normalizeOrigins(origins);\n\n const filteredEntries: TInProgressInventoryEntry[] = [];\n for (const entry of entries) {\n const treeOrigin = resolveTreeOrigin(entry.path, normalizedOrigins);\n if (treeOrigin !== null) {\n filteredEntries.push({\n isSymlink: entry.isSymlink,\n kind: entry.kind,\n path: entry.path,\n realPath: entry.realPath,\n treeOrigin,\n });\n }\n }\n\n const entryMap = populateEntryMap(filteredEntries, normalizedOrigins);\n const { childrenMap, roots } = groupTreeNodes(entryMap);\n const inventory = traverseInventoryTree(entryMap, roots, childrenMap);\n const outcomes = collectSymlinkOutcomes(inventory.items);\n\n return { inventory, outcomes };\n}\n","import type {\n TFAFRole,\n TFAFRoles,\n TFAFSubGraphRole,\n} from '../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type {\n TEffectiveCatalog,\n TEffectiveRole,\n TRoleForm,\n} from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nexport const composeCatalog = (\n roles: TFAFRoles,\n subGraphRoles: readonly TFAFSubGraphRole[]\n): TEffectiveCatalog => {\n const effectiveRoles: TEffectiveRole[] = [];\n const categoryToRole = new Map<string, TEffectiveRole>();\n const extensionToRole = new Map<string, TEffectiveRole>();\n\n for (const [rank, tier] of roles.entries()) {\n const tierRoles: readonly TFAFRole[] = 'category' in tier ? [tier] : tier;\n\n for (const role of tierRoles) {\n const implicitExtensions =\n role.implicitRoleExtensions === undefined\n ? []\n : [...role.implicitRoleExtensions];\n const isCategory =\n role.isCategoryNode === true || implicitExtensions.length > 0;\n const form: TRoleForm = isCategory ? 'category-nodes' : 'fragments';\n\n const effectiveRole: TEffectiveRole = {\n allowMultipleSymbols: role.allowMultipleSymbols === true,\n category: role.category,\n form,\n implicitExtensions,\n name: role.name,\n rank,\n };\n\n effectiveRoles.push(effectiveRole);\n categoryToRole.set(effectiveRole.category, effectiveRole);\n for (const extension of implicitExtensions) {\n extensionToRole.set(extension, effectiveRole);\n }\n }\n }\n\n return {\n categoryToRole,\n extensionToRole,\n roles: effectiveRoles,\n subGraphRoles: subGraphRoles.map((s) => s.name),\n topRank: roles.length,\n };\n};\n","import type { TFAFRootFragment } from '../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type {\n TEffectiveOrientedPair,\n TEffectiveRootFragment,\n TEffectiveRootNode,\n} from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nimport { compareOrdinal } from '../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport const composeRootFragments = (\n rootFragments: readonly TFAFRootFragment[]\n): readonly TEffectiveRootFragment[] => {\n return rootFragments.map((fragment) => {\n const rootNodes: TEffectiveRootNode[] = [];\n for (const [tierIndex, tier] of fragment.rootNodes.entries()) {\n for (const name of tier) {\n rootNodes.push({ name, rank: tierIndex });\n }\n }\n\n const edges = fragment.dependencyEdges ?? [];\n const flatTargets = edges.flatMap((edge) =>\n edge.from.flatMap((fromName) => {\n const fromPath = `${fragment.path}/${fromName}`;\n return edge.to.map((toPath) => ({ fromPath, toPath }));\n })\n );\n\n const seenPairs = new Set<string>();\n const dependencyPairs: TEffectiveOrientedPair[] = [];\n\n for (const target of flatTargets) {\n const key = `${target.fromPath}\\0${target.toPath}`;\n if (seenPairs.has(key)) {\n continue;\n }\n seenPairs.add(key);\n dependencyPairs.push({\n from: target.fromPath,\n to: target.toPath,\n });\n }\n\n dependencyPairs.sort((left, right) => {\n const fromComparison = compareOrdinal(left.from, right.from);\n return fromComparison === 0\n ? compareOrdinal(left.to, right.to)\n : fromComparison;\n });\n\n return {\n dependencyPairs,\n path: fragment.path,\n rootNodes,\n subRootFragments: composeRootFragments(fragment.subRootFragments ?? []),\n };\n });\n};\n","import type {\n TFAFCommonConfig,\n TFAFForeignNodeFamily,\n TFAFLocalConfig,\n} from '../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type {\n TEffectiveForeignFamily,\n TEffectiveForeignNodes,\n TEffectiveLocalHierarchy,\n TEffectiveMimeticStructure,\n TEffectiveOrientedPair,\n} from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TTreeScopedDeclarations } from './filter-by-tree-containment.type.js';\n\nimport { compareOrdinal } from '../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport const filterByTreeContainment = (\n originPath: string,\n common: TFAFCommonConfig | undefined,\n local: TFAFLocalConfig\n): TTreeScopedDeclarations => {\n const isPathInTree = (path: string): boolean =>\n originPath === '.' ||\n path === originPath ||\n path.startsWith(`${originPath}/`);\n\n const buildForeignNodes = (): TEffectiveForeignNodes => {\n const rawItems = local.foreignNodes ?? common?.foreignNodes;\n if (rawItems === undefined) {\n return { families: [], individualPaths: [] };\n }\n\n const isInherited = local.foreignNodes === undefined;\n const stringItems = rawItems.filter(\n (item): item is string => typeof item === 'string'\n );\n const familyItems = rawItems.filter(\n (item): item is TFAFForeignNodeFamily => typeof item !== 'string'\n );\n\n const individualPaths = stringItems.filter(\n (item) => !isInherited || isPathInTree(item)\n );\n individualPaths.sort(compareOrdinal);\n\n const families: TEffectiveForeignFamily[] = [];\n for (const item of familyItems) {\n const paths = isInherited\n ? item.paths.filter((p: string) => isPathInTree(p))\n : [...item.paths];\n if (paths.length > 0) {\n families.push({\n paths,\n patterns: [...item.patterns],\n });\n }\n }\n\n return { families, individualPaths };\n };\n\n const buildLocalHierarchies = (): readonly TEffectiveLocalHierarchy[] => {\n if (local.localHorizontalHierarchies !== undefined) {\n return local.localHorizontalHierarchies.map((h) => ({\n hierarchy: h.hierarchies,\n paths: [...h.paths],\n }));\n }\n\n if (common?.localHorizontalHierarchies === undefined) {\n return [];\n }\n\n const result: TEffectiveLocalHierarchy[] = [];\n for (const h of common.localHorizontalHierarchies) {\n const filteredPaths = h.paths.filter((p: string) => isPathInTree(p));\n if (filteredPaths.length > 0) {\n result.push({\n hierarchy: h.hierarchies,\n paths: filteredPaths,\n });\n }\n }\n return result;\n };\n\n const buildMimeticStructures = (): readonly TEffectiveMimeticStructure[] => {\n if (local.mimeticPathStructures !== undefined) {\n return local.mimeticPathStructures.map((m) => ({\n actions: m.actions === undefined ? null : [...m.actions],\n paths: [...m.paths],\n }));\n }\n\n if (common?.mimeticPathStructures === undefined) {\n return [];\n }\n\n const result: TEffectiveMimeticStructure[] = [];\n for (const m of common.mimeticPathStructures) {\n const filteredPaths = m.paths.filter((p: string) => isPathInTree(p));\n if (filteredPaths.length > 0) {\n result.push({\n actions: m.actions === undefined ? null : [...m.actions],\n paths: filteredPaths,\n });\n }\n }\n return result;\n };\n\n const buildSortedPaths = (\n rawPaths: readonly string[] | undefined,\n isInherited: boolean\n ): readonly string[] => {\n if (rawPaths === undefined) {\n return [];\n }\n\n const included = rawPaths.filter(\n (path) => !isInherited || isPathInTree(path)\n );\n included.sort(compareOrdinal);\n return included;\n };\n\n const buildExternalDependencyPairs =\n (): readonly TEffectiveOrientedPair[] => {\n const rawEdges =\n local.externalDependencies ?? common?.externalDependencies;\n if (rawEdges === undefined) {\n return [];\n }\n const isInherited = local.externalDependencies === undefined;\n const flatTargets = rawEdges.flatMap((edge) =>\n edge.from.flatMap((from) =>\n isInherited && !isPathInTree(from)\n ? []\n : edge.to.map((to) => ({ from, to }))\n )\n );\n\n const seen = new Set<string>();\n const pairs: TEffectiveOrientedPair[] = [];\n for (const target of flatTargets) {\n const key = `${target.from}\\0${target.to}`;\n if (seen.has(key)) {\n continue;\n }\n seen.add(key);\n pairs.push({\n from: target.from,\n to: target.to,\n });\n }\n pairs.sort((left, right) => {\n const fromComparison = compareOrdinal(left.from, right.from);\n return fromComparison === 0\n ? compareOrdinal(left.to, right.to)\n : fromComparison;\n });\n return pairs;\n };\n\n const buildTreeDependencyPairs = (): readonly TEffectiveOrientedPair[] => {\n const rawEdges = local.treeDependencies ?? common?.treeDependencies;\n if (rawEdges === undefined) {\n return [];\n }\n const isInherited = local.treeDependencies === undefined;\n const flatTargets = rawEdges.flatMap((edge) =>\n edge.from.flatMap((from) =>\n isInherited && from !== originPath\n ? []\n : edge.to.map((to) => ({ from, to }))\n )\n );\n\n const seen = new Set<string>();\n const pairs: TEffectiveOrientedPair[] = [];\n for (const target of flatTargets) {\n const key = `${target.from}\\0${target.to}`;\n if (seen.has(key)) {\n continue;\n }\n seen.add(key);\n pairs.push({\n from: target.from,\n to: target.to,\n });\n }\n pairs.sort((left, right) => {\n const fromComparison = compareOrdinal(left.from, right.from);\n return fromComparison === 0\n ? compareOrdinal(left.to, right.to)\n : fromComparison;\n });\n return pairs;\n };\n\n return {\n externalDependencyPairs: buildExternalDependencyPairs(),\n foreignDomains: buildSortedPaths(\n local.foreignDomains ?? common?.foreignDomains,\n local.foreignDomains === undefined\n ),\n foreignNodes: buildForeignNodes(),\n horizontalHierarchies:\n local.horizontalHierarchies ?? common?.horizontalHierarchies ?? [],\n localHorizontalHierarchies: buildLocalHierarchies(),\n mimeticPathStructures: buildMimeticStructures(),\n publicRootNodes: buildSortedPaths(\n local.publicRootNodes ?? common?.publicRootNodes,\n local.publicRootNodes === undefined\n ),\n treeDependencyPairs: buildTreeDependencyPairs(),\n };\n};\n","import type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TOriginEntry } from './validate-origins.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport const validateOrigins = (\n origins: readonly TOriginEntry[]\n): readonly TConfigOutcome[] => {\n const outcomes: TConfigOutcome[] = [];\n const seenByPath = new Map<string, TOriginEntry>();\n\n for (const entry of origins) {\n const previous = seenByPath.get(entry.path);\n if (previous === undefined) {\n seenByPath.set(entry.path, entry);\n } else {\n const isDuplicate = previous.kind === entry.kind;\n outcomes.push(\n createOutcome(\n isDuplicate\n ? 'configuration/duplicate-origin'\n : 'configuration/conflicting-origin-kind',\n {\n element: entry.path,\n propertyPath: entry.propertyPath,\n }\n )\n );\n }\n }\n\n for (const outer of origins) {\n const isRoot = outer.path === '.';\n const prefix = `${outer.path}/`;\n const containedOrigins = origins.filter(\n (inner) =>\n inner.path !== outer.path && (isRoot || inner.path.startsWith(prefix))\n );\n for (const inner of containedOrigins) {\n outcomes.push(\n createOutcome('configuration/overlapping-origins', {\n detail: `Origin '${inner.path}' is contained within origin '${outer.path}'`,\n element: inner.path,\n propertyPath: inner.propertyPath,\n })\n );\n }\n }\n\n return outcomes;\n};\n","import type { TFAFConfig } from '../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type {\n TConfigOutcome,\n TResult,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TEffectiveDeclarations,\n TEffectiveTree,\n} from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { composeCatalog } from './_utils/compose-catalog/index.js';\nimport { composeRootFragments } from './_utils/compose-root-fragments/index.js';\nimport { filterByTreeContainment } from './_utils/filter-by-tree-containment/index.js';\nimport {\n type TOriginEntry,\n validateOrigins,\n} from './_utils/validate-origins/index.js';\n\nexport const composeDeclarations = (\n config: TFAFConfig,\n baseDirectory: string\n): TResult<TEffectiveDeclarations> => {\n const collectOrigins = (): readonly TOriginEntry[] => {\n const origins: TOriginEntry[] = [];\n for (const [localIndex, local] of config.faf.locals.entries()) {\n if (local.rootLayers !== undefined) {\n for (const [layerIndex, layer] of local.rootLayers.entries()) {\n origins.push({\n kind: 'root-layer',\n path: layer,\n propertyPath: `faf.locals[${localIndex}].rootLayers[${layerIndex}]`,\n });\n }\n }\n if (local.rootFragments !== undefined) {\n for (const [fragIndex, frag] of local.rootFragments.entries()) {\n origins.push({\n kind: 'root-fragment',\n path: frag.path,\n propertyPath: `faf.locals[${localIndex}].rootFragments[${fragIndex}]`,\n });\n }\n }\n }\n return origins;\n };\n\n const checkMissingRoles = (): readonly TConfigOutcome[] => {\n const outcomes: TConfigOutcome[] = [];\n for (const [localIndex, local] of config.faf.locals.entries()) {\n if (\n local.roles === undefined &&\n (config.faf.common === undefined ||\n config.faf.common.roles === undefined)\n ) {\n outcomes.push(\n createOutcome('configuration/missing-roles', {\n element: 'fafconfig.ts',\n propertyPath: `faf.locals[${localIndex}]`,\n })\n );\n }\n }\n return outcomes;\n };\n\n const originEntries = collectOrigins();\n const originOutcomes = validateOrigins(originEntries);\n const rolesOutcomes = checkMissingRoles();\n\n const allOutcomes = [...originOutcomes, ...rolesOutcomes];\n if (allOutcomes.length > 0) {\n return {\n ok: false,\n outcomes: allOutcomes,\n };\n }\n\n const buildTrees = (): readonly TEffectiveTree[] => {\n const resultTrees: TEffectiveTree[] = [];\n for (const local of config.faf.locals) {\n const roles = local.roles ?? config.faf.common?.roles ?? [];\n const subGraphRoles =\n local.subGraphRoles ?? config.faf.common?.subGraphRoles ?? [];\n const catalog = composeCatalog(roles, subGraphRoles);\n\n if (local.rootLayers !== undefined) {\n for (const originPath of local.rootLayers) {\n const scoped = filterByTreeContainment(\n originPath,\n config.faf.common,\n local\n );\n resultTrees.push({\n catalog,\n externalDependencyPairs: scoped.externalDependencyPairs,\n foreignDomains: scoped.foreignDomains,\n foreignNodes: scoped.foreignNodes,\n horizontalHierarchies: scoped.horizontalHierarchies,\n localHorizontalHierarchies: scoped.localHorizontalHierarchies,\n mimeticPathStructures: scoped.mimeticPathStructures,\n originKind: 'root-layer',\n originPath,\n publicRootNodes: scoped.publicRootNodes,\n rootFragments: [],\n treeDependencyPairs: scoped.treeDependencyPairs,\n });\n }\n }\n\n if (local.rootFragments !== undefined) {\n for (const rootFragment of local.rootFragments) {\n const originPath = rootFragment.path;\n const scoped = filterByTreeContainment(\n originPath,\n config.faf.common,\n local\n );\n resultTrees.push({\n catalog,\n externalDependencyPairs: scoped.externalDependencyPairs,\n foreignDomains: scoped.foreignDomains,\n foreignNodes: scoped.foreignNodes,\n horizontalHierarchies: scoped.horizontalHierarchies,\n localHorizontalHierarchies: scoped.localHorizontalHierarchies,\n mimeticPathStructures: scoped.mimeticPathStructures,\n originKind: 'root-fragment',\n originPath,\n publicRootNodes: scoped.publicRootNodes,\n rootFragments: composeRootFragments([rootFragment]),\n treeDependencyPairs: scoped.treeDependencyPairs,\n });\n }\n }\n }\n return resultTrees;\n };\n\n return {\n ok: true,\n value: {\n aliases: [],\n baseDirectory,\n trees: buildTrees(),\n },\n };\n};\n","export function isPlainRecord(\n candidate: unknown\n): candidate is Record<string, unknown> {\n return (\n typeof candidate === 'object' &&\n candidate !== null &&\n !Array.isArray(candidate)\n );\n}\n","import { z } from 'zod';\n\nimport { DIAGNOSTIC_PREFIX } from '../../_constants/config-diagnostic.constant.js';\nimport { isLiteralConfigPath } from './_utils/is-literal-config-path/index.js';\n\nexport const formFields = (() => {\n const NULL_FORBIDDEN = 'configuration/null-forbidden';\n const INVALID_TYPE = 'configuration/invalid-type';\n const EMPTY_STRING = 'configuration/empty-string';\n const EXPLICIT_UNDEFINED = 'configuration/explicit-undefined';\n const MISSING_PROPERTY = 'configuration/missing-property';\n\n const encode = (diagnostic: Readonly<Record<string, unknown>>): string =>\n `${DIAGNOSTIC_PREFIX}${JSON.stringify(diagnostic)}`;\n\n const fixed = (constraint: string): string =>\n encode({\n constraint,\n kind: 'fixed',\n });\n\n const isNonEmptyString = (value: unknown): value is string =>\n typeof value === 'string' && value.length > 0;\n\n const nullOrType = (input: unknown): string =>\n fixed(input === null ? NULL_FORBIDDEN : INVALID_TYPE);\n\n const optionalProperty = (): z.ZodType =>\n z\n .custom<unknown>((value) => value !== null && value !== undefined, {\n error: (issue) =>\n fixed(issue.input === null ? NULL_FORBIDDEN : EXPLICIT_UNDEFINED),\n })\n .exactOptional();\n\n const requiredAbsence = (): string =>\n encode({\n emptyList: null,\n explicit: {\n constraint: EXPLICIT_UNDEFINED,\n kind: 'fixed',\n },\n invalid: {\n constraint: INVALID_TYPE,\n kind: 'fixed',\n },\n kind: 'absent',\n missing: {\n constraint: MISSING_PROPERTY,\n kind: 'fixed',\n },\n });\n\n const presenceIssue = (input: unknown): string => {\n if (input === null) {\n return fixed(NULL_FORBIDDEN);\n }\n if (input === undefined) {\n return fixed(EXPLICIT_UNDEFINED);\n }\n return fixed(INVALID_TYPE);\n };\n\n const requiredText = (): z.ZodType<string> =>\n z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? requiredAbsence()\n : nullOrType(issue.input),\n })\n .min(1, {\n error: () => fixed(EMPTY_STRING),\n });\n\n const textValue = (): z.ZodType<string> =>\n z\n .string({\n error: (issue) => nullOrType(issue.input),\n })\n .min(1, {\n error: () => fixed(EMPTY_STRING),\n });\n\n return {\n encode,\n fixed,\n isLiteralPath: isLiteralConfigPath,\n isNonEmptyString,\n nullOrType,\n optionalProperty,\n presenceIssue,\n requiredAbsence,\n requiredText,\n textValue,\n };\n})();\n","export const DIAGNOSTIC_PREFIX = 'fafdiag:';\n","export const INVALID_CONFIG_PATH_SEGMENTS = new Set(['', '.', '..']);\n","import { INVALID_CONFIG_PATH_SEGMENTS } from './is-literal-config-path.constant.js';\n\nexport function isLiteralConfigPath(path: string): boolean {\n if (path === '.') {\n return true;\n }\n const segments = path.split('/');\n return segments.every(\n (segment) => !INVALID_CONFIG_PATH_SEGMENTS.has(segment)\n );\n}\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\n\nexport const configShape = (() => {\n const EMPTY_LIST = 'configuration/empty-list';\n const MISSING_ORIGIN = 'configuration/missing-origin';\n\n const SHARED_KEYS = [\n 'externalDependencies',\n 'foreignDomains',\n 'foreignNodes',\n 'horizontalHierarchies',\n 'localHorizontalHierarchies',\n 'mimeticPathStructures',\n 'publicRootNodes',\n 'roles',\n 'subGraphRoles',\n 'treeDependencies',\n ] as const;\n\n const shapeOf = (keys: readonly string[]): z.ZodRawShape =>\n Object.fromEntries(keys.map((key) => [key, formFields.optionalProperty()]));\n\n const keysDiagnostic = (): string =>\n formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n });\n\n const fixedOrigin = (\n constraint: string,\n path: readonly PropertyKey[]\n ): { readonly message: string; readonly path: readonly PropertyKey[] } => ({\n message: formFields.fixed(constraint),\n path,\n });\n\n const soleOrigin = (\n value: unknown,\n key: 'rootFragments' | 'rootLayers'\n ): null | {\n readonly message: string;\n readonly path: readonly PropertyKey[];\n } =>\n Array.isArray(value) && value.length === 0\n ? fixedOrigin(EMPTY_LIST, [key])\n : null;\n\n const originIssue = (local: {\n readonly rootFragments?: unknown;\n readonly rootLayers?: unknown;\n }): null | {\n readonly message: string;\n readonly path: readonly PropertyKey[];\n } => {\n const hasLayers = local.rootLayers !== undefined;\n const hasFragments = local.rootFragments !== undefined;\n if (!hasLayers && !hasFragments) {\n return fixedOrigin(MISSING_ORIGIN, []);\n }\n if (hasLayers && hasFragments) {\n const areBothEmpty =\n Array.isArray(local.rootLayers) &&\n local.rootLayers.length === 0 &&\n Array.isArray(local.rootFragments) &&\n local.rootFragments.length === 0;\n return areBothEmpty ? fixedOrigin(MISSING_ORIGIN, []) : null;\n }\n return hasLayers\n ? soleOrigin(local.rootLayers, 'rootLayers')\n : soleOrigin(local.rootFragments, 'rootFragments');\n };\n\n const localObject = z\n .strictObject(\n {\n ...shapeOf(SHARED_KEYS),\n aliases: z.any().optional(),\n rootFragments: z.any().optional(),\n rootLayers: z.any().optional(),\n },\n {\n error: (issue) =>\n issue.code === 'unrecognized_keys'\n ? keysDiagnostic()\n : formFields.nullOrType(issue.input),\n }\n )\n .superRefine((local, context) => {\n const issue = originIssue(local);\n if (issue !== null) {\n context.addIssue({\n code: 'custom',\n message: issue.message,\n path: [...issue.path],\n });\n }\n });\n\n const commonObject = z.strictObject(\n {\n ...shapeOf(['aliases', ...SHARED_KEYS]),\n rootFragments: z.any().optional(),\n rootLayers: z.any().optional(),\n },\n {\n error: (issue) => {\n if (issue.code === 'unrecognized_keys') {\n return keysDiagnostic();\n }\n if (issue.input === undefined) {\n return formFields.fixed('configuration/explicit-undefined');\n }\n return formFields.nullOrType(issue.input);\n },\n }\n );\n\n const fafObject = z.strictObject(\n {\n common: commonObject.exactOptional(),\n locals: z\n .array(localObject, {\n error: (issue) =>\n issue.input === undefined\n ? formFields.requiredAbsence()\n : formFields.nullOrType(issue.input),\n })\n .readonly(),\n },\n {\n error: (issue) => {\n if (issue.code === 'unrecognized_keys') {\n return keysDiagnostic();\n }\n if (issue.input === undefined) {\n return formFields.requiredAbsence();\n }\n return formFields.nullOrType(issue.input);\n },\n }\n );\n\n return {\n root: z.strictObject(\n { faf: fafObject },\n {\n error: (issue) =>\n issue.code === 'unrecognized_keys'\n ? keysDiagnostic()\n : formFields.nullOrType(issue.input),\n }\n ),\n };\n})();\n","import { formFields } from '../../_validate-config-format@shared/_schemas/form-fields/index.js';\nimport { configShape } from './_schemas/config-shape/index.js';\n\nexport const configFormatSchema = configShape.root.refine(\n (value) => value.faf.locals.length > 0,\n {\n message: formFields.fixed('configuration/empty-list'),\n path: ['faf', 'locals'],\n }\n);\n","export const CONSTRAINT_DUPLICATE_ROLE_NAME =\n 'configuration/duplicate-role-name';\nexport const CONSTRAINT_DUPLICATE_CATEGORY = 'configuration/duplicate-category';\nexport const CONSTRAINT_ROLE_NAME_CONFLICT = 'configuration/role-name-conflict';\nexport const CONSTRAINT_DUPLICATE_IMPLICIT_EXT =\n 'configuration/duplicate-implicit-extension';\nexport const CONSTRAINT_IMPLICIT_EXT_PREFIX =\n 'configuration/implicit-extension-role-name-prefix';\n","import type {\n TConfigConstraint,\n TConfigOutcome,\n} from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TExtensionEntry,\n TRoleEntry,\n TRolesValidationResult,\n TSubGraphRoleEntry,\n} from '../../_validate-config-format@shared/_types/validate-config-format.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n CONSTRAINT_DUPLICATE_CATEGORY,\n CONSTRAINT_DUPLICATE_IMPLICIT_EXT,\n CONSTRAINT_DUPLICATE_ROLE_NAME,\n CONSTRAINT_IMPLICIT_EXT_PREFIX,\n CONSTRAINT_ROLE_NAME_CONFLICT,\n} from './check-catalog-invariants.constant.js';\n\nexport function checkCatalogInvariants(\n roleValidation: TRolesValidationResult,\n subGraphEntries: readonly TSubGraphRoleEntry[]\n): readonly TConfigOutcome[] {\n const outcomes: TConfigOutcome[] = [];\n const addOutcome = (\n propertyPath: string,\n constraint: TConfigConstraint,\n detail: string\n ): void => {\n outcomes.push(\n createOutcome(constraint, {\n detail,\n propertyPath,\n })\n );\n };\n\n const checkDuplicatesInMap = (\n entries: readonly { readonly name: string; readonly path: string }[],\n constraint: TConfigConstraint,\n messagePrefix: string\n ): Map<string, string[]> => {\n const map = new Map<string, string[]>();\n for (const entry of entries) {\n const list = map.get(entry.name);\n if (list === undefined) {\n map.set(entry.name, [entry.path]);\n } else {\n list.push(entry.path);\n }\n }\n\n for (const [name, paths] of map) {\n if (paths.length > 1) {\n for (const targetPath of paths.slice(1)) {\n addOutcome(targetPath, constraint, `${messagePrefix} \"${name}\".`);\n }\n }\n }\n\n return map;\n };\n\n const roleNameEntries = roleValidation.roleEntries.map((r: TRoleEntry) => ({\n name: r.name,\n path: `${r.path}.name`,\n }));\n const roleNamesMap = checkDuplicatesInMap(\n roleNameEntries,\n CONSTRAINT_DUPLICATE_ROLE_NAME,\n 'Duplicate role name'\n );\n\n const categoryEntries = roleValidation.roleEntries.map((r: TRoleEntry) => ({\n name: r.category,\n path: `${r.path}.category`,\n }));\n checkDuplicatesInMap(\n categoryEntries,\n CONSTRAINT_DUPLICATE_CATEGORY,\n 'Category is already assigned to another role'\n );\n\n const subGraphNameEntries = subGraphEntries.map((s: TSubGraphRoleEntry) => ({\n name: s.name,\n path: `${s.path}.name`,\n }));\n const subGraphNamesMap = checkDuplicatesInMap(\n subGraphNameEntries,\n CONSTRAINT_DUPLICATE_ROLE_NAME,\n 'Duplicate sub-graph role name'\n );\n\n for (const entry of subGraphEntries) {\n if (roleNamesMap.has(entry.name)) {\n addOutcome(\n `${entry.path}.name`,\n CONSTRAINT_ROLE_NAME_CONFLICT,\n `Sub-graph role \"${entry.name}\" conflicts with standard role name.`\n );\n }\n }\n\n const extensionMap = new Map<string, TExtensionEntry>();\n for (const entry of roleValidation.extensionEntries) {\n const existing = extensionMap.get(entry.extension);\n if (existing === undefined) {\n extensionMap.set(entry.extension, entry);\n } else {\n addOutcome(\n entry.path,\n CONSTRAINT_DUPLICATE_IMPLICIT_EXT,\n `Implicit extension \"${entry.extension}\" is already associated with role \"${existing.roleName}\".`\n );\n }\n }\n\n const allCatalogNames = new Set<string>([\n ...roleNamesMap.keys(),\n ...subGraphNamesMap.keys(),\n ]);\n\n for (const entry of roleValidation.extensionEntries) {\n const afterDot = entry.extension.slice(1);\n const dotIndex = afterDot.indexOf('.');\n const firstSegment =\n dotIndex === -1 ? afterDot : afterDot.slice(0, dotIndex);\n\n if (allCatalogNames.has(firstSegment)) {\n addOutcome(\n entry.path,\n CONSTRAINT_IMPLICIT_EXT_PREFIX,\n `First segment \"${firstSegment}\" of implicit extension \"${entry.extension}\" cannot match a role name.`\n );\n }\n }\n return outcomes;\n}\n","import type { TFAFConfig } from '../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\n\nexport function isFafConfig(\n _candidate: unknown,\n outcomeCount: number\n): _candidate is TFAFConfig {\n return outcomeCount === 0;\n}\n","export const readConfigValue = (() => {\n const isStringKeyedRecord = (\n value: unknown,\n key: string\n ): value is Record<string, unknown> => {\n const objectValue =\n typeof value === 'object' && value !== null && !Array.isArray(value)\n ? value\n : null;\n return objectValue !== null && Object.hasOwn(objectValue, key);\n };\n\n return function readConfigValue(\n value: unknown,\n segments: readonly PropertyKey[]\n ): unknown {\n let current = value;\n for (const segment of segments) {\n if (typeof segment === 'number' && Array.isArray(current)) {\n current = current[segment];\n continue;\n }\n if (\n typeof segment !== 'string' ||\n !isStringKeyedRecord(current, segment)\n ) {\n return undefined;\n }\n current = current[segment];\n }\n return current;\n };\n})();\n","import type {\n TAbsentDiagnostic,\n TFixedDiagnostic,\n} from '../../../../_types/config-diagnostic.type.js';\n\nexport function chooseAbsentDiagnostic(\n diagnostic: TAbsentDiagnostic,\n isEmptyArray: boolean,\n hasExplicitKey: boolean\n): TFixedDiagnostic {\n if (isEmptyArray && diagnostic.emptyList !== null) {\n return diagnostic.emptyList;\n }\n if (hasExplicitKey) {\n return diagnostic.explicit;\n }\n return diagnostic.missing;\n}\n","import type { TConfigDiagnostic } from '../../../../../../_types/config-diagnostic.type.js';\n\nexport function isConfigDiagnostic(value: unknown): value is TConfigDiagnostic {\n const isObject = typeof value === 'object' && value !== null;\n const record = isObject && !Array.isArray(value) ? value : null;\n if (record === null || !('kind' in record)) {\n return false;\n }\n const kind = record.kind;\n const kinds = new Set(['absent', 'fixed', 'keys']);\n return typeof kind === 'string' && kinds.has(kind);\n}\n","import type { TConfigDiagnostic } from '../../../../_types/config-diagnostic.type.js';\n\nimport { assertInvariant } from '../../../../../../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { DIAGNOSTIC_PREFIX } from '../../../../_constants/config-diagnostic.constant.js';\nimport { isConfigDiagnostic } from './_utils/is-config-diagnostic/index.js';\n\nexport function decodeConfigDiagnostic(message: string): TConfigDiagnostic {\n assertInvariant(\n message.startsWith(DIAGNOSTIC_PREFIX),\n 'Zod issue is missing a configuration diagnostic.'\n );\n const parsed: unknown = JSON.parse(message.slice(DIAGNOSTIC_PREFIX.length));\n assertInvariant(\n isConfigDiagnostic(parsed),\n 'Configuration diagnostic payload is invalid.'\n );\n return parsed;\n}\n","export function formatIssuePath(segments: readonly PropertyKey[]): string {\n let path = '';\n for (const segment of segments) {\n if (typeof segment === 'number') {\n path += `[${segment}]`;\n } else if (typeof segment === 'string' && path.length === 0) {\n path += segment;\n } else {\n path += `.${String(segment)}`;\n }\n }\n return path;\n}\n","export function hasExplicitProperty(\n parent: null | object,\n key: PropertyKey | undefined\n): boolean {\n return (\n parent !== null &&\n !Array.isArray(parent) &&\n typeof key === 'string' &&\n Object.hasOwn(parent, key)\n );\n}\n","export function joinPropertyPath(prefix: string, relativePath: string): string {\n if (relativePath.length === 0) {\n return prefix;\n }\n if (prefix.length === 0) {\n return relativePath;\n }\n return relativePath.startsWith('[')\n ? `${prefix}${relativePath}`\n : `${prefix}.${relativePath}`;\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TFixedDiagnostic } from '../../../../_types/config-diagnostic.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function toFixedOutcome(\n diagnostic: TFixedDiagnostic,\n propertyPath: string\n): TConfigOutcome {\n return createOutcome(diagnostic.constraint, {\n propertyPath,\n });\n}\n","import type { ZodError } from 'zod';\n\nimport type { TConfigOutcome } from '../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { assertInvariant } from '../../../../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { readConfigValue } from './_schemas/read-config-value/index.js';\nimport { chooseAbsentDiagnostic } from './_utils/choose-absent-diagnostic/index.js';\nimport { decodeConfigDiagnostic } from './_utils/decode-config-diagnostic/index.js';\nimport { formatIssuePath } from './_utils/format-issue-path/index.js';\nimport { hasExplicitProperty } from './_utils/has-explicit-property/index.js';\nimport { joinPropertyPath } from './_utils/join-property-path/index.js';\nimport { toFixedOutcome } from './_utils/to-fixed-outcome/index.js';\n\nexport function translateConfigIssues(\n issues: readonly ZodError['issues'][number][],\n input: unknown,\n basePath: string\n): readonly TConfigOutcome[] {\n const pathOf = (segments: readonly PropertyKey[]): string =>\n joinPropertyPath(basePath, formatIssuePath(segments));\n\n return issues.flatMap((issue) => {\n const diagnostic = decodeConfigDiagnostic(issue.message);\n const propertyPath = pathOf(issue.path);\n if (diagnostic.kind === 'keys') {\n assertInvariant(\n issue.code === 'unrecognized_keys',\n 'Key diagnostic requires unrecognized keys.'\n );\n return issue.keys.map((key) =>\n toFixedOutcome(\n {\n constraint: diagnostic.constraint,\n kind: 'fixed',\n },\n joinPropertyPath(propertyPath, key)\n )\n );\n }\n if (diagnostic.kind === 'fixed') {\n return [toFixedOutcome(diagnostic, propertyPath)];\n }\n const parent = readConfigValue(input, issue.path.slice(0, -1));\n const parentObject = typeof parent === 'object' ? parent : null;\n const isEmptyArray = Array.isArray(parent) && parent.length === 0;\n const chosen = chooseAbsentDiagnostic(\n diagnostic,\n isEmptyArray,\n hasExplicitProperty(parentObject, issue.path.at(-1))\n );\n return [\n toFixedOutcome(\n chosen,\n isEmptyArray ? pathOf(issue.path.slice(0, -1)) : propertyPath\n ),\n ];\n });\n}\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\nimport {\n CONSTRAINT_EMPTY_STRING,\n CONSTRAINT_INVALID_ALIAS_KEY,\n CONSTRAINT_INVALID_LITERAL_PATH,\n CONSTRAINT_INVALID_TYPE,\n CONSTRAINT_NULL_FORBIDDEN,\n} from './aliases-schema.constant.js';\n\nexport const aliasesSchema = z\n .record(\n z.string(),\n z\n .string({\n error: (issue) =>\n formFields.fixed(\n issue.input === null\n ? CONSTRAINT_NULL_FORBIDDEN\n : CONSTRAINT_INVALID_TYPE\n ),\n })\n .min(1, {\n error: () => formFields.fixed(CONSTRAINT_EMPTY_STRING),\n }),\n {\n error: (issue) =>\n formFields.fixed(\n issue.input === null\n ? CONSTRAINT_NULL_FORBIDDEN\n : CONSTRAINT_INVALID_TYPE\n ),\n }\n )\n .superRefine((aliases, context) => {\n for (const [key, value] of Object.entries(aliases)) {\n if (key.length === 0) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(CONSTRAINT_EMPTY_STRING),\n path: [],\n });\n }\n if (key.endsWith('/')) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(CONSTRAINT_INVALID_ALIAS_KEY),\n path: [key],\n });\n }\n if (key.includes('*')) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(CONSTRAINT_INVALID_ALIAS_KEY),\n path: [key],\n });\n }\n if (value.length > 0 && !formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(CONSTRAINT_INVALID_LITERAL_PATH),\n path: [key],\n });\n }\n }\n });\n","export const CONSTRAINT_EMPTY_STRING = 'configuration/empty-string';\nexport const CONSTRAINT_INVALID_ALIAS_KEY = 'configuration/invalid-alias-key';\nexport const CONSTRAINT_INVALID_LITERAL_PATH =\n 'configuration/invalid-literal-path';\nexport const CONSTRAINT_INVALID_TYPE = 'configuration/invalid-type';\nexport const CONSTRAINT_NULL_FORBIDDEN = 'configuration/null-forbidden';\n","import type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { aliasesSchema } from './_schemas/aliases-schema/index.js';\n\nexport function validateAliases(\n aliases: unknown,\n basePath: string\n): readonly TConfigOutcome[] {\n const parsed = aliasesSchema.safeParse(aliases);\n return parsed.success\n ? []\n : translateConfigIssues(\n parsed.error.issues,\n aliases,\n `${basePath}.aliases`\n );\n}\n","import type {\n TConfigConstraint,\n TConfigOutcome,\n} from '../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { formFields } from '../../_schemas/form-fields/index.js';\n\nexport const collectStringDuplicates = (\n items: readonly unknown[],\n seen: Set<string>,\n pathAt: (index: number) => string,\n constraint: TConfigConstraint\n): readonly TConfigOutcome[] => {\n const outcomes: TConfigOutcome[] = [];\n for (const [index, item] of items.entries()) {\n if (formFields.isNonEmptyString(item)) {\n if (seen.has(item)) {\n const propertyPath = pathAt(index);\n outcomes.push(\n createOutcome(constraint, {\n propertyPath,\n })\n );\n } else {\n seen.add(item);\n }\n }\n }\n return outcomes;\n};\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\n\nexport const dependenciesSchema = (() => {\n const EMPTY_LIST = 'configuration/empty-list';\n const INVALID_PATH = 'configuration/invalid-literal-path';\n const INVALID_TYPE = 'configuration/invalid-type';\n const NULL_FORBIDDEN = 'configuration/null-forbidden';\n\n const pathItem = formFields.textValue().superRefine((value, context) => {\n if (!formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_PATH),\n });\n }\n });\n\n const requiredEndpoint = (): z.ZodType<readonly string[]> =>\n z\n .array(pathItem, {\n error: (issue) => {\n if (issue.input === undefined) {\n return formFields.requiredAbsence();\n }\n if (issue.input === null) {\n return formFields.fixed(NULL_FORBIDDEN);\n }\n return formFields.fixed(INVALID_TYPE);\n },\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n });\n\n const pairSchema = z.strictObject(\n {\n from: requiredEndpoint(),\n to: requiredEndpoint(),\n },\n {\n error: (issue) => {\n if (issue.code === 'unrecognized_keys') {\n return formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n });\n }\n return formFields.nullOrType(issue.input);\n },\n }\n );\n\n const pairList = z.array(pairSchema, {\n error: (issue) =>\n formFields.fixed(issue.input === null ? NULL_FORBIDDEN : INVALID_TYPE),\n });\n\n return {\n pairs: pairList,\n publicRootNodes: z.array(pathItem, {\n error: () => formFields.fixed(INVALID_TYPE),\n }),\n };\n})();\n","import type { ZodError } from 'zod';\n\nimport type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { collectStringDuplicates } from '../../_validate-config-format@shared/_utils/collect-string-duplicates/index.js';\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { dependenciesSchema } from './_schemas/dependencies-schema/index.js';\n\nexport const validateDependencies = (() => {\n type TSchema = {\n safeParse: (\n value: unknown\n ) => { error: ZodError; success: false } | { success: true };\n };\n\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n const parseProperty = (\n schema: TSchema,\n value: unknown,\n propertyPath: string\n ): readonly TConfigOutcome[] => {\n const parsed = schema.safeParse(value);\n return parsed.success\n ? []\n : translateConfigIssues(parsed.error.issues, value, propertyPath);\n };\n\n const pathDuplicates = (\n paths: unknown,\n pathsPath: string\n ): readonly TConfigOutcome[] =>\n Array.isArray(paths)\n ? collectStringDuplicates(\n paths,\n new Set<string>(),\n (index) => `${pathsPath}[${index}]`,\n 'configuration/duplicate-element'\n )\n : [];\n\n const pairDuplicates = (\n pairs: unknown,\n listPath: string\n ): readonly TConfigOutcome[] => {\n if (!Array.isArray(pairs)) {\n return [];\n }\n const outcomes: TConfigOutcome[] = [];\n for (const [index, pair] of pairs.entries()) {\n if (!isRecord(pair)) {\n continue;\n }\n const pairPath = `${listPath}[${index}]`;\n outcomes.push(\n ...pathDuplicates(pair['from'], `${pairPath}.from`),\n ...pathDuplicates(pair['to'], `${pairPath}.to`)\n );\n }\n return outcomes;\n };\n\n const readList = (\n config: Record<string, unknown>,\n key: string,\n schema: TSchema,\n basePath: string,\n duplicates: (\n value: unknown,\n propertyPath: string\n ) => readonly TConfigOutcome[]\n ): readonly TConfigOutcome[] => {\n if (!Object.hasOwn(config, key) || config[key] === undefined) {\n return [];\n }\n const propertyPath = `${basePath}.${key}`;\n return [\n ...parseProperty(schema, config[key], propertyPath),\n ...duplicates(config[key], propertyPath),\n ];\n };\n\n return function validateDependencies(\n config: Record<string, unknown>,\n basePath: string\n ): readonly TConfigOutcome[] {\n return [\n ...readList(\n config,\n 'publicRootNodes',\n dependenciesSchema.publicRootNodes,\n basePath,\n pathDuplicates\n ),\n ...readList(\n config,\n 'treeDependencies',\n dependenciesSchema.pairs,\n basePath,\n pairDuplicates\n ),\n ...readList(\n config,\n 'externalDependencies',\n dependenciesSchema.pairs,\n basePath,\n pairDuplicates\n ),\n ];\n };\n})();\n","export const SLASH = '/';\nexport const REGEX_SPECIAL_CHARS = /[.+^$()[\\]{}|\\\\]/gu;\nexport const ASTERISK_REGEX = /\\*/gu;\nexport const QUESTION_REGEX = /\\?/gu;\n","import type { TForeignPatternMatcher } from '../../_compile-foreign-pattern@shared/_types/compile-foreign-pattern.type.js';\n\nimport {\n ASTERISK_REGEX,\n QUESTION_REGEX,\n REGEX_SPECIAL_CHARS,\n SLASH,\n} from './create-foreign-file-name-matcher.constant.js';\n\nexport function createForeignFileNameMatcher(\n pattern: string\n): TForeignPatternMatcher {\n const escaped = pattern\n .replaceAll(REGEX_SPECIAL_CHARS, '\\\\$&')\n .replaceAll(ASTERISK_REGEX, '.*')\n .replaceAll(QUESTION_REGEX, '.');\n const regex = new RegExp(`^${escaped}$`, 'u');\n\n return (relativePath: string): boolean => {\n const fileName = relativePath.slice(relativePath.lastIndexOf(SLASH) + 1);\n return regex.test(fileName);\n };\n}\n","export const GLOBSTAR = '**';\nexport const SLASH = '/';\nexport const REGEX_SPECIAL_CHARS = /[.+^$()[\\]{}|\\\\]/gu;\nexport const ASTERISK_REGEX = /\\*/gu;\nexport const QUESTION_REGEX = /\\?/gu;\nexport const CONSECUTIVE_GLOBSTARS_REGEX = /\\*\\*(\\/\\*\\*)+/gu;\n","import type { TForeignPatternMatcher } from '../../_compile-foreign-pattern@shared/_types/compile-foreign-pattern.type.js';\n\nimport {\n ASTERISK_REGEX,\n CONSECUTIVE_GLOBSTARS_REGEX,\n GLOBSTAR,\n QUESTION_REGEX,\n REGEX_SPECIAL_CHARS,\n SLASH,\n} from './create-foreign-path-matcher.constant.js';\n\nexport function createForeignPathMatcher(\n pattern: string\n): TForeignPatternMatcher {\n const normalized = pattern.replaceAll(CONSECUTIVE_GLOBSTARS_REGEX, '**');\n if (normalized === GLOBSTAR) {\n return (relativePath: string): boolean => relativePath.length > 0;\n }\n\n const segments = normalized.split(SLASH);\n const hasLeadingGlobstar = segments[0] === GLOBSTAR;\n const hasTrailingGlobstar = segments.at(-1) === GLOBSTAR;\n\n let regexString = hasLeadingGlobstar ? '^(?:.+/)?' : '^';\n let wasPreviousGlobstar = hasLeadingGlobstar;\n let isFirstNormalSegment = true;\n\n const startIndex = hasLeadingGlobstar ? 1 : 0;\n const endIndex = hasTrailingGlobstar ? -1 : segments.length;\n const innerSegments = segments.slice(startIndex, endIndex);\n\n for (const segment of innerSegments) {\n if (segment === GLOBSTAR) {\n wasPreviousGlobstar = true;\n continue;\n }\n let separator = '';\n if (!isFirstNormalSegment) {\n separator = wasPreviousGlobstar ? '/(?:.+/)?' : SLASH;\n }\n const escaped = segment\n .replaceAll(REGEX_SPECIAL_CHARS, '\\\\$&')\n .replaceAll(ASTERISK_REGEX, '[^/]*')\n .replaceAll(QUESTION_REGEX, '[^/]');\n regexString += separator + escaped;\n wasPreviousGlobstar = false;\n isFirstNormalSegment = false;\n }\n\n regexString += hasTrailingGlobstar ? '(?:/.+)$' : '$';\n const regex = new RegExp(regexString, 'u');\n return (relativePath: string): boolean => regex.test(relativePath);\n}\n","export const SLASH = '/';\nexport const BRACE_REGEX = /[{}]/u;\nexport const REGEX_SHAPE_PATTERN = /^\\^|\\$$|^\\/.+\\/$/u;\nexport const INVALID_GLOBSTAR_REGEX = /(?:[^*]\\*\\*|\\*\\*[^*]|\\*{3,})/u;\nexport const DOT_SEGMENTS = new Set(['.', '..']);\n","import type { TForeignPatternRejectReason } from '../../_compile-foreign-pattern@shared/_types/compile-foreign-pattern.type.js';\n\nimport {\n BRACE_REGEX,\n DOT_SEGMENTS,\n INVALID_GLOBSTAR_REGEX,\n REGEX_SHAPE_PATTERN,\n SLASH,\n} from './validate-foreign-pattern.constant.js';\n\nexport function validateForeignPattern(\n pattern: string\n): null | TForeignPatternRejectReason {\n if (pattern.length === 0) {\n return 'empty-pattern';\n }\n if (pattern.startsWith('!')) {\n return 'negation';\n }\n if (BRACE_REGEX.test(pattern)) {\n return 'brace-expansion';\n }\n if (REGEX_SHAPE_PATTERN.test(pattern)) {\n return 'regular-expression';\n }\n if (pattern.startsWith(SLASH)) {\n return 'absolute-pattern';\n }\n\n const segments = pattern.split(SLASH);\n for (const segment of segments) {\n if (segment.length === 0) {\n return 'empty-segment';\n }\n if (DOT_SEGMENTS.has(segment)) {\n return 'dot-segment';\n }\n if (INVALID_GLOBSTAR_REGEX.test(segment)) {\n return 'invalid-globstar';\n }\n }\n\n return null;\n}\n","export const SLASH = '/';\n","import type { TCompileForeignPatternResult } from './compile-foreign-pattern.type.js';\n\nimport { createForeignFileNameMatcher } from './_utils/create-foreign-file-name-matcher/index.js';\nimport { createForeignPathMatcher } from './_utils/create-foreign-path-matcher/index.js';\nimport { validateForeignPattern } from './_utils/validate-foreign-pattern/index.js';\nimport { SLASH } from './compile-foreign-pattern.constant.js';\n\nexport function compileForeignPattern(\n pattern: string\n): TCompileForeignPatternResult {\n const reason = validateForeignPattern(pattern);\n if (reason !== null) {\n return {\n ok: false,\n reason,\n };\n }\n\n return {\n matcher: pattern.includes(SLASH)\n ? createForeignPathMatcher(pattern)\n : createForeignFileNameMatcher(pattern),\n ok: true,\n };\n}\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\n\nexport const foreignNodesSchema = (() => {\n const EMPTY_LIST = 'configuration/empty-list';\n const INVALID_PATH = 'configuration/invalid-literal-path';\n const INVALID_TYPE = 'configuration/invalid-type';\n\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n const literalPath = formFields.textValue().superRefine((value, context) => {\n if (!formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_PATH),\n });\n }\n });\n\n const fullPathArray = (): z.ZodType<readonly string[]> =>\n z\n .array(literalPath, {\n error: (issue) =>\n issue.input === undefined\n ? formFields.requiredAbsence()\n : formFields.fixed(INVALID_TYPE),\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n });\n\n const patternItem = formFields.textValue();\n\n const familySchema = z.strictObject(\n {\n paths: fullPathArray(),\n patterns: z\n .array(patternItem, {\n error: (issue) =>\n issue.input === undefined\n ? formFields.requiredAbsence()\n : formFields.fixed(INVALID_TYPE),\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n }),\n },\n {\n error: (issue) =>\n issue.code === 'unrecognized_keys'\n ? formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n })\n : formFields.fixed(INVALID_TYPE),\n }\n );\n\n const foreignString = formFields.textValue().superRefine((value, context) => {\n if (!formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_PATH),\n });\n }\n });\n\n const foreignNodeItem = z.unknown().superRefine((item, context) => {\n if (item === null) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed('configuration/null-forbidden'),\n });\n return;\n }\n if (typeof item === 'string') {\n const parsed = foreignString.safeParse(item);\n if (!parsed.success) {\n for (const issue of parsed.error.issues) {\n context.addIssue({ ...issue, path: [...issue.path] });\n }\n }\n return;\n }\n if (isRecord(item)) {\n const parsed = familySchema.safeParse(item);\n if (!parsed.success) {\n for (const issue of parsed.error.issues) {\n context.addIssue({ ...issue, path: [...issue.path] });\n }\n }\n return;\n }\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_TYPE),\n });\n });\n\n const loosePathList = z.array(literalPath, {\n error: () => formFields.fixed(INVALID_TYPE),\n });\n\n return {\n domains: loosePathList,\n nodes: z.array(foreignNodeItem, {\n error: () => formFields.fixed(INVALID_TYPE),\n }),\n };\n})();\n","import type { ZodError } from 'zod';\n\nimport type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { compileForeignPattern } from '../../../../../../_verify-project@shared/_utils/compile-foreign-pattern/index.js';\nimport { collectStringDuplicates } from '../../_validate-config-format@shared/_utils/collect-string-duplicates/index.js';\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { foreignNodesSchema } from './_schemas/foreign-nodes-schema/index.js';\n\nexport const validateForeignNodes = (() => {\n type TSchema = {\n safeParse: (\n value: unknown\n ) => { error: ZodError; success: false } | { success: true };\n };\n\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n const parseProperty = (\n schema: TSchema,\n value: unknown,\n propertyPath: string\n ): readonly TConfigOutcome[] => {\n const parsed = schema.safeParse(value);\n return parsed.success\n ? []\n : translateConfigIssues(parsed.error.issues, value, propertyPath);\n };\n\n const pathDuplicates = (\n paths: unknown,\n pathsPath: string\n ): readonly TConfigOutcome[] =>\n Array.isArray(paths)\n ? collectStringDuplicates(\n paths,\n new Set<string>(),\n (index) => `${pathsPath}[${index}]`,\n 'configuration/duplicate-element'\n )\n : [];\n\n const patternOutcomes = (\n patterns: unknown,\n patternsPath: string\n ): readonly TConfigOutcome[] => {\n if (!Array.isArray(patterns)) {\n return [];\n }\n const outcomes: TConfigOutcome[] = [\n ...collectStringDuplicates(\n patterns,\n new Set<string>(),\n (index) => `${patternsPath}[${index}]`,\n 'configuration/duplicate-element'\n ),\n ];\n for (const [index, pattern] of patterns.entries()) {\n if (\n typeof pattern === 'string' &&\n pattern.length > 0 &&\n !compileForeignPattern(pattern).ok\n ) {\n outcomes.push(\n createOutcome('configuration/invalid-foreign-pattern', {\n propertyPath: `${patternsPath}[${index}]`,\n })\n );\n }\n }\n return outcomes;\n };\n\n const familyOutcomes = (\n nodes: unknown,\n nodesPath: string\n ): readonly TConfigOutcome[] => {\n if (!Array.isArray(nodes)) {\n return [];\n }\n const outcomes: TConfigOutcome[] = [];\n for (const [index, item] of nodes.entries()) {\n if (!isRecord(item)) {\n continue;\n }\n\n const itemPath = `${nodesPath}[${index}]`;\n outcomes.push(\n ...pathDuplicates(item['paths'], `${itemPath}.paths`),\n ...patternOutcomes(item['patterns'], `${itemPath}.patterns`)\n );\n }\n return outcomes;\n };\n\n return function validateForeignNodes(\n config: Record<string, unknown>,\n basePath: string\n ): readonly TConfigOutcome[] {\n const outcomes: TConfigOutcome[] = [];\n if (config['foreignDomains'] !== undefined) {\n const domainsPath = `${basePath}.foreignDomains`;\n outcomes.push(\n ...parseProperty(\n foreignNodesSchema.domains,\n config['foreignDomains'],\n domainsPath\n ),\n ...pathDuplicates(config['foreignDomains'], domainsPath)\n );\n }\n if (config['foreignNodes'] !== undefined) {\n const nodesPath = `${basePath}.foreignNodes`;\n const nodes = config['foreignNodes'];\n outcomes.push(\n ...parseProperty(foreignNodesSchema.nodes, nodes, nodesPath),\n ...pathDuplicates(nodes, nodesPath),\n ...familyOutcomes(nodes, nodesPath)\n );\n }\n return outcomes;\n };\n})();\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\n\nexport const hierarchiesSchema = (() => {\n const EMPTY_LIST = 'configuration/empty-list';\n const EMPTY_TIER = 'configuration/empty-tier';\n const INVALID_PATH = 'configuration/invalid-literal-path';\n\n const hierarchyItemSchema = formFields.textValue();\n\n const tierSchema = z\n .array(hierarchyItemSchema, {\n error: (issue) => formFields.nullOrType(issue.input),\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_TIER),\n });\n\n const hierarchySchema = z.array(tierSchema, {\n error: (issue) => formFields.nullOrType(issue.input),\n });\n\n const requiredHierarchySchema = z.array(tierSchema, {\n error: (issue) =>\n issue.input === undefined\n ? formFields.requiredAbsence()\n : formFields.nullOrType(issue.input),\n });\n\n const horizontalHierarchiesSchema = z.array(hierarchySchema, {\n error: (issue) => formFields.nullOrType(issue.input),\n });\n\n const pathItemSchema = formFields\n .textValue()\n .superRefine((value, context) => {\n if (!formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_PATH),\n });\n }\n });\n\n const requiredPaths = z\n .array(pathItemSchema, {\n error: (issue) =>\n issue.input === undefined\n ? formFields.requiredAbsence()\n : formFields.nullOrType(issue.input),\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n });\n\n const localHierarchySchema = z.strictObject(\n {\n hierarchies: requiredHierarchySchema,\n paths: requiredPaths,\n },\n {\n error: (issue) =>\n issue.code === 'unrecognized_keys'\n ? formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n })\n : formFields.nullOrType(issue.input),\n }\n );\n\n const localHorizontalHierarchiesSchema = z.array(localHierarchySchema, {\n error: (issue) => formFields.nullOrType(issue.input),\n });\n\n return {\n horizontal: horizontalHierarchiesSchema,\n local: localHorizontalHierarchiesSchema,\n };\n})();\n","import type { ZodType } from 'zod';\n\nimport type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { collectStringDuplicates } from '../../_validate-config-format@shared/_utils/collect-string-duplicates/index.js';\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { hierarchiesSchema } from './_schemas/hierarchies-schema/index.js';\n\nexport const validateHierarchies = (() => {\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n const parseProperty = (\n schema: ZodType,\n value: unknown,\n propertyPath: string\n ): readonly TConfigOutcome[] => {\n const parsed = schema.safeParse(value);\n return parsed.success\n ? []\n : translateConfigIssues(parsed.error.issues, value, propertyPath);\n };\n\n const hierarchyDuplicates = (\n hierarchy: unknown,\n hierarchyPath: string\n ): readonly TConfigOutcome[] => {\n if (!Array.isArray(hierarchy)) {\n return [];\n }\n const seen = new Set<string>();\n const outcomes: TConfigOutcome[] = [];\n for (const [tierIndex, tier] of hierarchy.entries()) {\n if (!Array.isArray(tier)) {\n continue;\n }\n outcomes.push(\n ...collectStringDuplicates(\n tier,\n seen,\n (index) => `${hierarchyPath}[${tierIndex}][${index}]`,\n 'configuration/duplicate-element'\n )\n );\n }\n return outcomes;\n };\n\n const pathDuplicates = (\n paths: unknown,\n pathsPath: string\n ): readonly TConfigOutcome[] =>\n Array.isArray(paths)\n ? collectStringDuplicates(\n paths,\n new Set<string>(),\n (index) => `${pathsPath}[${index}]`,\n 'configuration/duplicate-element'\n )\n : [];\n\n const present = (record: Record<string, unknown>, key: string): unknown =>\n Object.hasOwn(record, key) && record[key] !== undefined\n ? record[key]\n : undefined;\n\n const localOutcomes = (\n local: unknown,\n basePath: string\n ): readonly TConfigOutcome[] => {\n if (local === undefined) {\n return [];\n }\n const propertyPath = `${basePath}.localHorizontalHierarchies`;\n const outcomes: TConfigOutcome[] = [\n ...parseProperty(hierarchiesSchema.local, local, propertyPath),\n ];\n if (!Array.isArray(local)) {\n return outcomes;\n }\n for (const [index, item] of local.entries()) {\n if (!isRecord(item)) {\n continue;\n }\n\n const itemPath = `${propertyPath}[${index}]`;\n outcomes.push(\n ...pathDuplicates(item['paths'], `${itemPath}.paths`),\n ...hierarchyDuplicates(item['hierarchies'], `${itemPath}.hierarchies`)\n );\n }\n return outcomes;\n };\n\n return function validateHierarchies(\n config: Record<string, unknown>,\n basePath: string\n ): readonly TConfigOutcome[] {\n const outcomes: TConfigOutcome[] = [];\n const horizontal = present(config, 'horizontalHierarchies');\n if (horizontal !== undefined) {\n const propertyPath = `${basePath}.horizontalHierarchies`;\n outcomes.push(\n ...parseProperty(hierarchiesSchema.horizontal, horizontal, propertyPath)\n );\n if (Array.isArray(horizontal)) {\n for (const [index, hierarchy] of horizontal.entries()) {\n outcomes.push(\n ...hierarchyDuplicates(hierarchy, `${propertyPath}[${index}]`)\n );\n }\n }\n }\n outcomes.push(\n ...localOutcomes(present(config, 'localHorizontalHierarchies'), basePath)\n );\n return outcomes;\n };\n})();\n","import { z } from 'zod';\n\nimport type {\n TConfigConstraint,\n TConfigOutcome,\n} from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { formFields } from '../../_validate-config-format@shared/_schemas/form-fields/index.js';\nimport { collectStringDuplicates } from '../../_validate-config-format@shared/_utils/collect-string-duplicates/index.js';\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { mimeticStructuresSchema } from './_schemas/mimetic-structures-schema/index.js';\nimport { isKebabCase } from './_utils/is-kebab-case/index.js';\n\nexport const validateMimeticStructures = (() => {\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n const actionGrammar = z.string().superRefine((value, context) => {\n if (!isKebabCase(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed('configuration/invalid-action-name'),\n });\n }\n });\n\n const actionOutcomes = (\n actions: unknown,\n actionsPath: string\n ): readonly TConfigOutcome[] => {\n if (!Array.isArray(actions)) {\n return [];\n }\n const outcomes: TConfigOutcome[] = [];\n for (const [index, action] of actions.entries()) {\n if (typeof action !== 'string' || action.length === 0) {\n continue;\n }\n const parsed = actionGrammar.safeParse(action);\n if (!parsed.success) {\n outcomes.push(\n ...translateConfigIssues(\n parsed.error.issues,\n action,\n `${actionsPath}[${index}]`\n )\n );\n }\n }\n return outcomes;\n };\n\n const listDuplicates = (\n items: unknown,\n listPath: string,\n seen: Set<string>,\n constraint: TConfigConstraint\n ): readonly TConfigOutcome[] =>\n Array.isArray(items)\n ? collectStringDuplicates(\n items,\n seen,\n (index) => `${listPath}[${index}]`,\n constraint\n )\n : [];\n\n return function validateMimeticStructures(\n mimeticStructures: unknown,\n basePath: string\n ): readonly TConfigOutcome[] {\n if (mimeticStructures === undefined) {\n return [];\n }\n const propertyPath = `${basePath}.mimeticPathStructures`;\n const parsed = mimeticStructuresSchema.safeParse(mimeticStructures);\n const outcomes: TConfigOutcome[] = parsed.success\n ? []\n : [\n ...translateConfigIssues(\n parsed.error.issues,\n mimeticStructures,\n propertyPath\n ),\n ];\n if (!Array.isArray(mimeticStructures)) {\n return outcomes;\n }\n const seenPaths = new Set<string>();\n for (const [index, item] of mimeticStructures.entries()) {\n if (!isRecord(item)) {\n continue;\n }\n const itemPath = `${propertyPath}[${index}]`;\n outcomes.push(\n ...listDuplicates(\n item['paths'],\n `${itemPath}.paths`,\n new Set<string>(),\n 'configuration/duplicate-element'\n ),\n ...listDuplicates(\n item['paths'],\n `${itemPath}.paths`,\n seenPaths,\n 'configuration/duplicate-mimetic-path'\n ),\n ...listDuplicates(\n item['actions'],\n `${itemPath}.actions`,\n new Set<string>(),\n 'configuration/duplicate-element'\n ),\n ...actionOutcomes(item['actions'], `${itemPath}.actions`)\n );\n }\n return outcomes;\n };\n})();\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\n\nexport const mimeticStructuresSchema = (() => {\n const EMPTY_LIST = 'configuration/empty-list';\n const INVALID_PATH = 'configuration/invalid-literal-path';\n\n const pathItem = formFields.textValue().superRefine((value, context) => {\n if (!formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_PATH),\n });\n }\n });\n\n const actionItem = formFields.textValue();\n\n const structureSchema = z.strictObject(\n {\n actions: z\n .array(actionItem, {\n error: (issue) => formFields.presenceIssue(issue.input),\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n })\n .exactOptional(),\n paths: z\n .array(pathItem, {\n error: (issue) =>\n issue.input === undefined\n ? formFields.requiredAbsence()\n : formFields.nullOrType(issue.input),\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n }),\n },\n {\n error: (issue) =>\n issue.code === 'unrecognized_keys'\n ? formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n })\n : formFields.nullOrType(issue.input),\n }\n );\n\n return z.array(structureSchema, {\n error: (issue) => formFields.nullOrType(issue.input),\n });\n})();\n","export const KEBAB_CASE_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;\n","import { KEBAB_CASE_PATTERN } from './is-kebab-case.constant.js';\n\nexport function isKebabCase(candidate: string): boolean {\n return KEBAB_CASE_PATTERN.test(candidate);\n}\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\n\nexport const rolesSchema = (() => {\n const EMPTY_LIST = 'configuration/empty-list';\n const INVALID_TYPE = 'configuration/invalid-type';\n\n const roleObjectSchema = z.strictObject(\n {\n allowMultipleSymbols: z\n .boolean({\n error: (issue) => formFields.presenceIssue(issue.input),\n })\n .exactOptional(),\n category: formFields.requiredText(),\n implicitRoleExtensions: z\n .array(formFields.textValue(), {\n error: (issue) => formFields.nullOrType(issue.input),\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n })\n .exactOptional(),\n isCategoryNode: z\n .boolean({\n error: (issue) => formFields.presenceIssue(issue.input),\n })\n .exactOptional(),\n name: formFields.requiredText(),\n },\n {\n error: (issue) => {\n if (issue.code === 'unrecognized_keys') {\n return formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n });\n }\n if (Array.isArray(issue.input)) {\n return formFields.fixed(INVALID_TYPE);\n }\n return formFields.nullOrType(issue.input);\n },\n }\n );\n\n const roleGroupSchema = z.array(roleObjectSchema).min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n });\n\n const roleItemSchema = z.unknown().superRefine((item, context) => {\n const parsed = Array.isArray(item)\n ? roleGroupSchema.safeParse(item)\n : roleObjectSchema.safeParse(item);\n if (!parsed.success) {\n for (const issue of parsed.error.issues) {\n context.addIssue({ ...issue, path: [...issue.path] });\n }\n }\n });\n\n return z.array(roleItemSchema, {\n error: (issue) => formFields.nullOrType(issue.input),\n });\n})();\n","export const CONSTRAINT_CATEGORY_NODE_MISMATCH =\n 'configuration/implicit-extension-category-node-mismatch';\nexport const CONSTRAINT_DUPLICATE_ELEMENT = 'configuration/duplicate-element';\nexport const CONSTRAINT_INVALID_IMPLICIT_EXT =\n 'configuration/invalid-implicit-extension';\n\nexport const FORBIDDEN_CODE_EXTENSIONS = new Set([\n '.cjs',\n '.cts',\n '.js',\n '.jsx',\n '.mjs',\n '.mts',\n '.ts',\n '.tsx',\n]);\n\nexport const GLOB_PATTERN_CHARACTERS = /[*?[\\]{}!]/;\n","import type {\n TConfigConstraint,\n TConfigOutcome,\n} from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TExtensionEntry,\n TRoleEntry,\n TRolesValidationResult,\n} from '../../_validate-config-format@shared/_types/validate-config-format.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { rolesSchema } from './_schemas/roles-schema/index.js';\nimport {\n CONSTRAINT_CATEGORY_NODE_MISMATCH,\n CONSTRAINT_DUPLICATE_ELEMENT,\n CONSTRAINT_INVALID_IMPLICIT_EXT,\n FORBIDDEN_CODE_EXTENSIONS,\n GLOB_PATTERN_CHARACTERS,\n} from './validate-roles.constant.js';\n\nexport const validateRoles = (() => {\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n const extensionOutcome = (\n propertyPath: string,\n constraint: TConfigConstraint\n ): TConfigOutcome =>\n createOutcome(constraint, {\n propertyPath,\n });\n\n const extensionFormatOutcomes = (\n extension: string,\n extensionPath: string\n ): readonly TConfigOutcome[] => {\n const outcomes: TConfigOutcome[] = [];\n if (!extension.startsWith('.')) {\n outcomes.push(\n extensionOutcome(extensionPath, CONSTRAINT_INVALID_IMPLICIT_EXT)\n );\n }\n if (extension.includes('/')) {\n outcomes.push(\n extensionOutcome(extensionPath, CONSTRAINT_INVALID_IMPLICIT_EXT)\n );\n }\n if (GLOB_PATTERN_CHARACTERS.test(extension)) {\n outcomes.push(\n extensionOutcome(extensionPath, CONSTRAINT_INVALID_IMPLICIT_EXT)\n );\n }\n if (FORBIDDEN_CODE_EXTENSIONS.has(extension)) {\n outcomes.push(\n extensionOutcome(extensionPath, CONSTRAINT_INVALID_IMPLICIT_EXT)\n );\n }\n return outcomes;\n };\n\n const readIdentity = (\n record: Record<string, unknown>\n ): null | { category: string; name: string } => {\n const { category, name } = record;\n const isName = typeof name === 'string' && name.length > 0;\n const isCategory = typeof category === 'string' && category.length > 0;\n return isName && isCategory ? { category, name } : null;\n };\n\n const recordExtension = (\n extension: unknown,\n extensionPath: string,\n seen: Set<string>,\n identity: null | { category: string; name: string },\n extensionEntries: TExtensionEntry[],\n outcomes: TConfigOutcome[]\n ): void => {\n if (typeof extension !== 'string' || extension.length === 0) {\n return;\n }\n if (seen.has(extension)) {\n outcomes.push(\n extensionOutcome(extensionPath, CONSTRAINT_DUPLICATE_ELEMENT)\n );\n return;\n }\n seen.add(extension);\n const formatOutcomes = extensionFormatOutcomes(extension, extensionPath);\n outcomes.push(...formatOutcomes);\n if (identity !== null && formatOutcomes.length === 0) {\n extensionEntries.push({\n extension,\n path: extensionPath,\n roleName: identity.name,\n });\n }\n };\n\n const collectRole = (\n record: Record<string, unknown>,\n rolePath: string,\n roleEntries: TRoleEntry[],\n extensionEntries: TExtensionEntry[],\n outcomes: TConfigOutcome[]\n ): void => {\n const identity = readIdentity(record);\n if (identity !== null) {\n roleEntries.push({ ...identity, path: rolePath });\n }\n const extensions = record['implicitRoleExtensions'];\n if (!Array.isArray(extensions) || extensions.length === 0) {\n return;\n }\n if (record['isCategoryNode'] === false) {\n outcomes.push(\n extensionOutcome(\n `${rolePath}.isCategoryNode`,\n CONSTRAINT_CATEGORY_NODE_MISMATCH\n )\n );\n }\n const seen = new Set<string>();\n for (const [index, extension] of extensions.entries()) {\n recordExtension(\n extension,\n `${rolePath}.implicitRoleExtensions[${index}]`,\n seen,\n identity,\n extensionEntries,\n outcomes\n );\n }\n };\n\n const collectGroup = (\n item: readonly unknown[],\n itemPath: string,\n roleEntries: TRoleEntry[],\n extensionEntries: TExtensionEntry[],\n outcomes: TConfigOutcome[]\n ): void => {\n for (const [subIndex, subItem] of item.entries()) {\n if (isRecord(subItem)) {\n collectRole(\n subItem,\n `${itemPath}[${subIndex}]`,\n roleEntries,\n extensionEntries,\n outcomes\n );\n }\n }\n };\n\n const collectRoles = (\n roles: readonly unknown[],\n rolesPath: string\n ): TRolesValidationResult & {\n readonly outcomes: readonly TConfigOutcome[];\n } => {\n const roleEntries: TRoleEntry[] = [];\n const extensionEntries: TExtensionEntry[] = [];\n const outcomes: TConfigOutcome[] = [];\n for (const [index, item] of roles.entries()) {\n const itemPath = `${rolesPath}[${index}]`;\n if (Array.isArray(item)) {\n collectGroup(item, itemPath, roleEntries, extensionEntries, outcomes);\n }\n if (!Array.isArray(item) && isRecord(item)) {\n collectRole(item, itemPath, roleEntries, extensionEntries, outcomes);\n }\n }\n return { extensionEntries, outcomes, roleEntries };\n };\n\n return function validateRoles(\n roles: unknown,\n basePath: string\n ): TRolesValidationResult & { readonly outcomes: readonly TConfigOutcome[] } {\n if (roles === undefined) {\n return { extensionEntries: [], outcomes: [], roleEntries: [] };\n }\n const rolesPath = `${basePath}.roles`;\n const parsed = rolesSchema.safeParse(roles);\n const formOutcomes = parsed.success\n ? []\n : translateConfigIssues(parsed.error.issues, roles, rolesPath);\n if (!Array.isArray(roles)) {\n return { extensionEntries: [], outcomes: formOutcomes, roleEntries: [] };\n }\n const collected = collectRoles(roles, rolesPath);\n return {\n extensionEntries: collected.extensionEntries,\n outcomes: [...formOutcomes, ...collected.outcomes],\n roleEntries: collected.roleEntries,\n };\n };\n})();\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\n\nexport const rootFragmentsSchema = (() => {\n const EMPTY_LIST = 'configuration/empty-list';\n const EMPTY_TIER = 'configuration/empty-tier';\n const INVALID_FILE = 'configuration/invalid-file-name';\n const INVALID_PATH = 'configuration/invalid-literal-path';\n const INVALID_TYPE = 'configuration/invalid-type';\n const NULL_FORBIDDEN = 'configuration/null-forbidden';\n\n const fileName = (): z.ZodType<string> =>\n formFields.textValue().superRefine((value, context) => {\n if (value.includes('/') || !formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_FILE),\n });\n }\n });\n\n const literalPath = formFields.textValue().superRefine((value, context) => {\n if (!formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_PATH),\n });\n }\n });\n\n const nonEmptyNames = (\n item: z.ZodType<string>\n ): z.ZodType<readonly string[]> =>\n z\n .array(item, {\n error: (issue) => {\n if (issue.input === undefined) {\n return formFields.requiredAbsence();\n }\n if (issue.input === null) {\n return formFields.fixed(NULL_FORBIDDEN);\n }\n return formFields.fixed(INVALID_TYPE);\n },\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_LIST),\n });\n\n const edgeSchema = z.strictObject(\n {\n from: nonEmptyNames(fileName()),\n to: nonEmptyNames(literalPath),\n },\n {\n error: (issue) =>\n issue.code === 'unrecognized_keys'\n ? formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n })\n : formFields.nullOrType(issue.input),\n }\n );\n\n const tierSchema = z\n .array(fileName(), {\n error: (issue) => formFields.nullOrType(issue.input),\n })\n .min(1, {\n error: () => formFields.fixed(EMPTY_TIER),\n });\n\n const fragmentShape = {\n dependencyEdges: z\n .array(edgeSchema, {\n error: (issue) => formFields.presenceIssue(issue.input),\n })\n .exactOptional(),\n path: formFields.requiredText().superRefine((value, context) => {\n if (value.length > 0 && !formFields.isLiteralPath(value)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(INVALID_PATH),\n });\n }\n }),\n rootNodes: z.array(tierSchema, {\n error: (issue) =>\n issue.input === undefined\n ? formFields.requiredAbsence()\n : formFields.nullOrType(issue.input),\n }),\n };\n\n const rootFragmentSchema: z.ZodType = z.lazy(() =>\n z.strictObject(\n {\n ...fragmentShape,\n subRootFragments: z.array(rootFragmentSchema).exactOptional(),\n },\n {\n error: (issue) =>\n issue.code === 'unrecognized_keys'\n ? formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n })\n : formFields.nullOrType(issue.input),\n }\n )\n );\n\n return z.array(rootFragmentSchema, {\n error: (issue) => formFields.nullOrType(issue.input),\n });\n})();\n","import type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { collectStringDuplicates } from '../../_validate-config-format@shared/_utils/collect-string-duplicates/index.js';\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { rootFragmentsSchema } from './_schemas/root-fragments-schema/index.js';\n\nexport const validateRootFragments = (() => {\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n const duplicates = (\n items: unknown,\n pathAt: (index: number) => string\n ): readonly TConfigOutcome[] =>\n Array.isArray(items)\n ? collectStringDuplicates(\n items,\n new Set<string>(),\n pathAt,\n 'configuration/duplicate-element'\n )\n : [];\n\n const edgeDuplicates = (\n edges: unknown,\n edgesPath: string\n ): readonly TConfigOutcome[] => {\n if (!Array.isArray(edges)) {\n return [];\n }\n const outcomes: TConfigOutcome[] = [];\n for (const [index, edge] of edges.entries()) {\n if (!isRecord(edge)) {\n continue;\n }\n const edgePath = `${edgesPath}[${index}]`;\n outcomes.push(\n ...duplicates(\n edge['from'],\n (itemIndex) => `${edgePath}.from[${itemIndex}]`\n ),\n ...duplicates(edge['to'], (itemIndex) => `${edgePath}.to[${itemIndex}]`)\n );\n }\n return outcomes;\n };\n\n const fragmentDuplicates = (\n fragments: readonly unknown[],\n fragmentsPath: string\n ): readonly TConfigOutcome[] => {\n const outcomes: TConfigOutcome[] = [];\n for (const [index, fragment] of fragments.entries()) {\n if (!isRecord(fragment) || !Array.isArray(fragment['rootNodes'])) {\n continue;\n }\n const fragmentPath = `${fragmentsPath}[${index}]`;\n const seen = new Set<string>();\n const rootNodes = fragment['rootNodes'];\n for (const [tierIndex, tier] of rootNodes.entries()) {\n if (!Array.isArray(tier)) {\n continue;\n }\n outcomes.push(\n ...collectStringDuplicates(\n tier,\n seen,\n (itemIndex) =>\n `${fragmentPath}.rootNodes[${tierIndex}][${itemIndex}]`,\n 'configuration/duplicate-element'\n )\n );\n }\n outcomes.push(\n ...edgeDuplicates(\n fragment['dependencyEdges'],\n `${fragmentPath}.dependencyEdges`\n )\n );\n if (Array.isArray(fragment['subRootFragments'])) {\n outcomes.push(\n ...fragmentDuplicates(\n fragment['subRootFragments'],\n `${fragmentPath}.rootFragments`\n )\n );\n }\n }\n return outcomes;\n };\n\n return function validateRootFragments(\n rootFragments: unknown,\n basePath: string\n ): readonly TConfigOutcome[] {\n if (rootFragments === undefined) {\n return [];\n }\n const propertyPath = `${basePath}.rootFragments`;\n const parsed = rootFragmentsSchema.safeParse(rootFragments);\n const formOutcomes = parsed.success\n ? []\n : translateConfigIssues(parsed.error.issues, rootFragments, propertyPath);\n return Array.isArray(rootFragments)\n ? [...formOutcomes, ...fragmentDuplicates(rootFragments, propertyPath)]\n : formOutcomes;\n };\n})();\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\nimport {\n CONSTRAINT_EMPTY_STRING,\n CONSTRAINT_INVALID_LITERAL_PATH,\n CONSTRAINT_INVALID_TYPE,\n CONSTRAINT_NULL_FORBIDDEN,\n} from './root-layers-schema.constant.js';\n\nexport const rootLayersSchema = z.array(\n z\n .string({\n error: (issue) =>\n formFields.fixed(\n issue.input === null\n ? CONSTRAINT_NULL_FORBIDDEN\n : CONSTRAINT_INVALID_TYPE\n ),\n })\n .min(1, {\n error: () => formFields.fixed(CONSTRAINT_EMPTY_STRING),\n })\n .superRefine((item, context) => {\n if (item.length > 0 && !formFields.isLiteralPath(item)) {\n context.addIssue({\n code: 'custom',\n message: formFields.fixed(CONSTRAINT_INVALID_LITERAL_PATH),\n });\n }\n }),\n {\n error: (issue) =>\n formFields.fixed(\n issue.input === null\n ? CONSTRAINT_NULL_FORBIDDEN\n : CONSTRAINT_INVALID_TYPE\n ),\n }\n);\n","export const CONSTRAINT_EMPTY_STRING = 'configuration/empty-string';\nexport const CONSTRAINT_INVALID_LITERAL_PATH =\n 'configuration/invalid-literal-path';\nexport const CONSTRAINT_INVALID_TYPE = 'configuration/invalid-type';\nexport const CONSTRAINT_NULL_FORBIDDEN = 'configuration/null-forbidden';\n","import type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { rootLayersSchema } from './_schemas/root-layers-schema/index.js';\n\nexport function validateRootLayers(\n rootLayers: unknown,\n basePath: string\n): readonly TConfigOutcome[] {\n if (rootLayers === undefined) {\n return [];\n }\n const parsed = rootLayersSchema.safeParse(rootLayers);\n const outcomes = parsed.success\n ? []\n : translateConfigIssues(\n parsed.error.issues,\n rootLayers,\n `${basePath}.rootLayers`\n );\n if (!Array.isArray(rootLayers)) {\n return outcomes;\n }\n const seen = new Set<string>();\n const duplicates: TConfigOutcome[] = [];\n for (const [index, item] of rootLayers.entries()) {\n if (typeof item !== 'string' || item.length === 0) {\n continue;\n }\n if (seen.has(item)) {\n duplicates.push(\n createOutcome('configuration/duplicate-element', {\n propertyPath: `${basePath}.rootLayers[${index}]`,\n })\n );\n } else {\n seen.add(item);\n }\n }\n return [...outcomes, ...duplicates];\n}\n","import { z } from 'zod';\n\nimport { formFields } from '../../../../_validate-config-format@shared/_schemas/form-fields/index.js';\n\nexport const subGraphRolesSchema = (() => {\n const subGraphRoleSchema = z.strictObject(\n {\n name: formFields.requiredText(),\n },\n {\n error: (issue) =>\n issue.code === 'unrecognized_keys'\n ? formFields.encode({\n constraint: 'configuration/unknown-property',\n kind: 'keys',\n })\n : formFields.nullOrType(issue.input),\n }\n );\n\n return z.array(subGraphRoleSchema, {\n error: (issue) => formFields.nullOrType(issue.input),\n });\n})();\n","import type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TSubGraphRoleEntry } from '../../_validate-config-format@shared/_types/validate-config-format.type.js';\n\nimport { translateConfigIssues } from '../../_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { subGraphRolesSchema } from './_schemas/sub-graph-roles-schema/index.js';\n\nexport const validateSubGraphRoles = (() => {\n const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n const collectEntries = (\n subGraphRoles: readonly unknown[],\n subGraphPath: string\n ): readonly TSubGraphRoleEntry[] => {\n const entries: TSubGraphRoleEntry[] = [];\n for (const [index, item] of subGraphRoles.entries()) {\n if (\n !isRecord(item) ||\n typeof item['name'] !== 'string' ||\n item['name'].length === 0\n ) {\n continue;\n }\n entries.push({ name: item['name'], path: `${subGraphPath}[${index}]` });\n }\n return entries;\n };\n\n return function validateSubGraphRoles(\n subGraphRoles: unknown,\n basePath: string\n ): {\n readonly entries: readonly TSubGraphRoleEntry[];\n readonly outcomes: readonly TConfigOutcome[];\n } {\n if (subGraphRoles === undefined) {\n return { entries: [], outcomes: [] };\n }\n const subGraphPath = `${basePath}.subGraphRoles`;\n const parsed = subGraphRolesSchema.safeParse(subGraphRoles);\n const outcomes = parsed.success\n ? []\n : translateConfigIssues(parsed.error.issues, subGraphRoles, subGraphPath);\n const entries = Array.isArray(subGraphRoles)\n ? collectEntries(subGraphRoles, subGraphPath)\n : [];\n return { entries, outcomes };\n };\n})();\n","export const CONSTRAINT_SCOPE_MISMATCH = 'configuration/scope-mismatch';\n","import type { TFAFConfig } from '../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type {\n TConfigOutcome,\n TResult,\n} from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { isPlainRecord } from '../../../../../../_session@shared/_utils/is-plain-record/index.js';\nimport { configFormatSchema } from './_schemas/config-format-schema/index.js';\nimport { checkCatalogInvariants } from './_utils/check-catalog-invariants/index.js';\nimport { isFafConfig } from './_utils/is-faf-config/index.js';\nimport { validateAliases } from './_utils/validate-aliases/index.js';\nimport { validateDependencies } from './_utils/validate-dependencies/index.js';\nimport { validateForeignNodes } from './_utils/validate-foreign-nodes/index.js';\nimport { validateHierarchies } from './_utils/validate-hierarchies/index.js';\nimport { validateMimeticStructures } from './_utils/validate-mimetic-structures/index.js';\nimport { validateRoles } from './_utils/validate-roles/index.js';\nimport { validateRootFragments } from './_utils/validate-root-fragments/index.js';\nimport { validateRootLayers } from './_utils/validate-root-layers/index.js';\nimport { validateSubGraphRoles } from './_utils/validate-sub-graph-roles/index.js';\nimport { translateConfigIssues } from './_validate-config-format@shared/_utils/translate-config-issues/index.js';\nimport { CONSTRAINT_SCOPE_MISMATCH } from './validate-config-format.constant.js';\n\nexport const validateConfigFormat = (() => {\n const scopeOutcome = (propertyPath: string): TConfigOutcome =>\n createOutcome(CONSTRAINT_SCOPE_MISMATCH, {\n propertyPath,\n });\n\n const pushShared = (\n record: Record<string, unknown>,\n basePath: string,\n outcomes: TConfigOutcome[]\n ): void => {\n const roles = validateRoles(record['roles'], basePath);\n const subGraphs = validateSubGraphRoles(record['subGraphRoles'], basePath);\n outcomes.push(\n ...roles.outcomes,\n ...subGraphs.outcomes,\n ...checkCatalogInvariants(roles, subGraphs.entries),\n ...validateForeignNodes(record, basePath),\n ...validateHierarchies(record, basePath),\n ...validateDependencies(record, basePath),\n ...validateMimeticStructures(record['mimeticPathStructures'], basePath)\n );\n };\n\n const collectCommon = (common: unknown, outcomes: TConfigOutcome[]): void => {\n if (!isPlainRecord(common)) {\n return;\n }\n for (const key of ['rootLayers', 'rootFragments']) {\n if (Object.hasOwn(common, key)) {\n outcomes.push(scopeOutcome(`faf.common.${key}`));\n }\n }\n if (common['aliases'] !== undefined) {\n outcomes.push(...validateAliases(common['aliases'], 'faf.common'));\n }\n pushShared(common, 'faf.common', outcomes);\n };\n\n const collectLocal = (\n local: unknown,\n localPath: string,\n outcomes: TConfigOutcome[]\n ): void => {\n if (!isPlainRecord(local)) {\n return;\n }\n if ('aliases' in local) {\n outcomes.push(scopeOutcome(`${localPath}.aliases`));\n }\n outcomes.push(\n ...validateRootLayers(local['rootLayers'], localPath),\n ...validateRootFragments(local['rootFragments'], localPath)\n );\n pushShared(local, localPath, outcomes);\n };\n\n const collectBody = (\n raw: Record<string, unknown>,\n outcomes: TConfigOutcome[]\n ): void => {\n if (!isPlainRecord(raw['faf'])) {\n return;\n }\n const faf = raw['faf'];\n collectCommon(faf['common'], outcomes);\n const locals = faf['locals'];\n if (!Array.isArray(locals)) {\n return;\n }\n for (const [index, local] of locals.entries()) {\n collectLocal(local, `faf.locals[${index}]`, outcomes);\n }\n };\n\n return function validateConfigFormat(raw: unknown): TResult<TFAFConfig> {\n const shaped = configFormatSchema.safeParse(raw);\n const outcomes: TConfigOutcome[] = shaped.success\n ? []\n : [...translateConfigIssues(shaped.error.issues, raw, '')];\n if (isPlainRecord(raw)) {\n collectBody(raw, outcomes);\n }\n return shaped.success && outcomes.length === 0 && isFafConfig(raw, 0)\n ? { ok: true, value: raw }\n : { ok: false, outcomes };\n };\n})();\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TInventoryItem } from '../../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TDirectoryReferenceCheck } from '../../../../_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function rejectDirectoryScope(\n check: TDirectoryReferenceCheck,\n item: TInventoryItem,\n _family?: TConfigOutcome['family']\n): readonly TConfigOutcome[] {\n if (item.treeOrigin === null) {\n return [\n createOutcome('configuration/reference-outside-trees', {\n detail: `${check.label} \"${check.path}\" must be inside a Fractal Tree of this configuration.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n const owned = check.context.ownedOrigins.get(item.treeOrigin);\n if (check.scope.kind === 'common') {\n if (owned !== undefined) {\n return [];\n }\n return [\n createOutcome('configuration/reference-outside-trees', {\n detail: `${check.label} \"${check.path}\" is outside the Fractal Trees of this configuration.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n if (owned !== undefined && owned.localIndex === check.scope.localIndex) {\n return [];\n }\n\n return [\n createOutcome('configuration/reference-outside-local-scope', {\n detail: `${check.label} \"${check.path}\" belongs to tree \"${item.treeOrigin}\" outside this local configuration.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TDirectoryReferenceCheck } from '../../_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { rejectDirectoryScope } from './_utils/reject-directory-scope/index.js';\n\nexport function rejectDirectoryInScope(\n check: TDirectoryReferenceCheck\n): readonly TConfigOutcome[] {\n const id = check.context.inventory.pathToId.get(check.path);\n if (id === undefined) {\n return [\n createOutcome('configuration/non-existent-path', {\n detail: `${check.label} \"${check.path}\" does not exist under configuration base \"${check.context.baseDirectory}\".`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n const item = check.context.inventory.items[id];\n if (item === undefined) {\n return [\n createOutcome('configuration/expected-directory', {\n detail: `${check.label} \"${check.path}\" is not a resolved directory in the inventory.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n if (item.kind !== 'directory') {\n return [\n createOutcome('configuration/expected-directory', {\n detail: `${check.label} \"${check.path}\" must be a directory.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n return rejectDirectoryScope(check, item);\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { rejectDirectoryInScope } from '../../../../../../_validate-config-references@shared/_utils/reject-directory-in-scope/index.js';\n\nexport function rejectForeignDomain(\n path: string,\n propertyPath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const directoryOutcomes = rejectDirectoryInScope({\n context,\n label: 'Foreign domain',\n path,\n propertyPath,\n scope,\n });\n if (!context.ownedOrigins.has(path)) {\n return directoryOutcomes;\n }\n\n return [\n ...directoryOutcomes,\n createOutcome('configuration/origin-designated-foreign-domain', {\n element: path,\n propertyPath,\n }),\n ];\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TInventoryItem } from '../../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TFileReferenceCheck } from '../../../../_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function rejectFileScope(\n check: TFileReferenceCheck,\n item: TInventoryItem,\n _family?: TConfigOutcome['family']\n): readonly TConfigOutcome[] {\n if (item.treeOrigin === null) {\n return [\n createOutcome('configuration/reference-outside-trees', {\n detail: `${check.label} \"${check.path}\" must be inside a Fractal Tree of this configuration.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n const owned = check.context.ownedOrigins.get(item.treeOrigin);\n if (check.scope.kind === 'common') {\n if (owned !== undefined) {\n return [];\n }\n return [\n createOutcome('configuration/reference-outside-trees', {\n detail: `${check.label} \"${check.path}\" is outside the Fractal Trees of this configuration.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n if (owned !== undefined && owned.localIndex === check.scope.localIndex) {\n return [];\n }\n\n return [\n createOutcome('configuration/reference-outside-local-scope', {\n detail: `${check.label} \"${check.path}\" belongs to tree \"${item.treeOrigin}\" outside this local configuration.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TFileReferenceCheck } from '../../_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { rejectFileScope } from './_utils/reject-file-scope/index.js';\n\nexport function rejectFileInScope(\n check: TFileReferenceCheck\n): readonly TConfigOutcome[] {\n const id = check.context.inventory.pathToId.get(check.path);\n if (id === undefined) {\n return [\n createOutcome('configuration/non-existent-path', {\n detail: `${check.label} \"${check.path}\" does not exist under configuration base \"${check.context.baseDirectory}\".`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n const item = check.context.inventory.items[id];\n if (item === undefined) {\n return [\n createOutcome('configuration/expected-file', {\n detail: `${check.label} \"${check.path}\" is not a resolved file in the inventory.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n if (item.kind !== 'file') {\n return [\n createOutcome('configuration/expected-file', {\n detail: `${check.label} \"${check.path}\" must be a file.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n return rejectFileScope(check, item);\n}\n","import type { TFAFForeignNodeFamily } from '../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectDirectoryInScope } from '../../../../../../_validate-config-references@shared/_utils/reject-directory-in-scope/index.js';\nimport { rejectFileInScope } from '../../../../../../_validate-config-references@shared/_utils/reject-file-in-scope/index.js';\n\nexport function rejectForeignNodeEntry(\n entry: string | TFAFForeignNodeFamily,\n propertyPath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n if (typeof entry === 'string') {\n return rejectFileInScope({\n context,\n label: 'Foreign node',\n path: entry,\n propertyPath,\n scope,\n });\n }\n\n return entry.paths.flatMap((path, index) =>\n rejectDirectoryInScope({\n context,\n label: 'Foreign family path',\n path,\n propertyPath: `${propertyPath}.paths[${index}]`,\n scope,\n })\n );\n}\n","import type { TFAFForeignNodeFamily } from '../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectForeignDomain } from './_utils/reject-foreign-domain/index.js';\nimport { rejectForeignNodeEntry } from './_utils/reject-foreign-node-entry/index.js';\n\nexport function validateForeignSection(\n domains: readonly string[] | undefined,\n nodes: readonly (string | TFAFForeignNodeFamily)[] | undefined,\n basePath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const domainOutcomes = (domains ?? []).flatMap((path, index) =>\n rejectForeignDomain(\n path,\n `${basePath}.foreignDomains[${index}]`,\n scope,\n context\n )\n );\n const nodeOutcomes = (nodes ?? []).flatMap((entry, index) =>\n rejectForeignNodeEntry(\n entry,\n `${basePath}.foreignNodes[${index}]`,\n scope,\n context\n )\n );\n return [...domainOutcomes, ...nodeOutcomes];\n}\n","import type { TFAFConfig } from '../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { validateForeignSection } from './_utils/validate-foreign-section/index.js';\n\nexport function validateForeignReferences(\n config: TFAFConfig,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const commonOutcomes = validateForeignSection(\n config.faf.common?.foreignDomains,\n config.faf.common?.foreignNodes,\n 'faf.common',\n { kind: 'common' },\n context\n );\n const localOutcomes = config.faf.locals.flatMap((local, localIndex) =>\n validateForeignSection(\n local.foreignDomains,\n local.foreignNodes,\n `faf.locals[${localIndex}]`,\n { kind: 'local', localIndex },\n context\n )\n );\n return [...commonOutcomes, ...localOutcomes];\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectFileInScope } from '../../../../../../_validate-config-references@shared/_utils/reject-file-in-scope/index.js';\n\nexport function rejectExternalSource(\n path: string,\n propertyPath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return rejectFileInScope({\n context,\n label: 'External dependency source',\n path,\n propertyPath,\n scope,\n });\n}\n","export function isAliasReference(\n path: string,\n prefixes: readonly string[]\n): boolean {\n return prefixes.some(\n (prefix) => path === prefix || path.startsWith(`${prefix}/`)\n );\n}\n","export function isLibraryPath(path: string): boolean {\n return path.split('/').includes('node_modules');\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { isAliasReference } from './_utils/is-alias-reference/index.js';\nimport { isLibraryPath } from './_utils/is-library-path/index.js';\n\nexport function rejectExternalTarget(\n path: string,\n propertyPath: string,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n if (isAliasReference(path, context.aliasPrefixes)) {\n return [\n createOutcome('configuration/external-dependency-to-alias', {\n element: path,\n propertyPath,\n }),\n ];\n }\n if (isLibraryPath(path)) {\n return [\n createOutcome('configuration/external-dependency-to-library', {\n element: path,\n propertyPath,\n }),\n ];\n }\n\n const id = context.inventory.pathToId.get(path);\n if (id === undefined) {\n return [\n createOutcome('configuration/non-existent-path', {\n detail: `External dependency target \"${path}\" does not exist under configuration base \"${context.baseDirectory}\".`,\n element: path,\n propertyPath,\n }),\n ];\n }\n const item = context.inventory.items[id];\n if (item === undefined) {\n return [\n createOutcome('configuration/expected-file', {\n detail: `External dependency target \"${path}\" is not a resolved file in the inventory.`,\n element: path,\n propertyPath,\n }),\n ];\n }\n if (item.kind !== 'file') {\n return [\n createOutcome('configuration/expected-file', {\n detail: `External dependency target \"${path}\" must be a file.`,\n element: path,\n propertyPath,\n }),\n ];\n }\n if (item.treeOrigin !== null) {\n return [\n createOutcome('configuration/external-dependency-to-inside-tree', {\n element: path,\n propertyPath,\n }),\n ];\n }\n return [];\n}\n","import type { TFAFExternalDependency } from '../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectExternalSource } from './_utils/reject-external-source/index.js';\nimport { rejectExternalTarget } from './_utils/reject-external-target/index.js';\n\nexport function rejectExternalDependencies(\n dependencies: readonly TFAFExternalDependency[],\n basePath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return dependencies.flatMap((dependency, index) => {\n const prefix = `${basePath}[${index}]`;\n return [\n ...dependency.from.flatMap((path, fromIndex) =>\n rejectExternalSource(\n path,\n `${prefix}.from[${fromIndex}]`,\n scope,\n context\n )\n ),\n ...dependency.to.flatMap((path, toIndex) =>\n rejectExternalTarget(path, `${prefix}.to[${toIndex}]`, context)\n ),\n ];\n });\n}\n","export const UNASSIGNED_LOCAL_INDEX = -1;\n\nexport const CONSTRAINT_NON_EXISTENT_PATH =\n 'configuration/non-existent-path' as const;\nexport const CONSTRAINT_EXPECTED_DIRECTORY =\n 'configuration/expected-directory' as const;\nexport const CONSTRAINT_EXPECTED_FILE = 'configuration/expected-file' as const;\nexport const CONSTRAINT_REFERENCE_OUTSIDE_TREES =\n 'configuration/reference-outside-trees' as const;\nexport const CONSTRAINT_REFERENCE_OUTSIDE_LOCAL_SCOPE =\n 'configuration/reference-outside-local-scope' as const;\nexport const CONSTRAINT_ORIGIN_CONTAINED_IN_OTHER_TREE =\n 'configuration/origin-contained-in-other-tree' as const;\nexport const CONSTRAINT_ORIGIN_DESIGNATED_FOREIGN_DOMAIN =\n 'configuration/origin-designated-foreign-domain' as const;\nexport const CONSTRAINT_NESTED_ROOT_FRAGMENT_NOT_DIRECT_CHILD =\n 'configuration/nested-root-fragment-not-direct-child' as const;\nexport const CONSTRAINT_ROOT_NODE_NOT_DIRECT_CHILD =\n 'configuration/root-node-not-direct-child' as const;\nexport const CONSTRAINT_INVALID_ROOT_DEPENDENCY_FROM =\n 'configuration/invalid-root-dependency-from' as const;\nexport const CONSTRAINT_INVALID_ROOT_DEPENDENCY_TO =\n 'configuration/invalid-root-dependency-to' as const;\nexport const CONSTRAINT_ROOT_DEPENDENCY_SAME_FRAGMENT =\n 'configuration/root-dependency-same-fragment' as const;\nexport const CONSTRAINT_ROOT_DEPENDENCY_DIFFERENT_TREE =\n 'configuration/root-dependency-different-tree' as const;\nexport const CONSTRAINT_DUPLICATE_MIMETIC_PATH =\n 'configuration/duplicate-mimetic-path' as const;\nexport const CONSTRAINT_PUBLIC_ROOT_NODE_NOT_ENUMERATED =\n 'configuration/public-root-node-not-enumerated' as const;\nexport const CONSTRAINT_PUBLIC_ROOT_NODES_IN_ROOT_LAYER_TREE =\n 'configuration/public-root-nodes-in-root-layer-tree' as const;\nexport const CONSTRAINT_TREE_DEPENDENCY_NOT_TREE_ORIGIN =\n 'configuration/tree-dependency-not-tree-origin' as const;\nexport const CONSTRAINT_TREE_DEPENDENCY_FROM_OUTSIDE_SCOPE =\n 'configuration/tree-dependency-from-outside-scope' as const;\nexport const CONSTRAINT_TREE_DEPENDENCY_SELF =\n 'configuration/tree-dependency-self' as const;\nexport const CONSTRAINT_EXTERNAL_DEPENDENCY_TO_INSIDE_TREE =\n 'configuration/external-dependency-to-inside-tree' as const;\nexport const CONSTRAINT_EXTERNAL_DEPENDENCY_TO_LIBRARY =\n 'configuration/external-dependency-to-library' as const;\nexport const CONSTRAINT_EXTERNAL_DEPENDENCY_TO_ALIAS =\n 'configuration/external-dependency-to-alias' as const;\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function rejectPublicRootNode(\n path: string,\n propertyPath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const id = context.inventory.pathToId.get(path);\n if (id === undefined) {\n return [\n createOutcome('configuration/non-existent-path', {\n detail: `Public root node \"${path}\" does not exist under configuration base \"${context.baseDirectory}\".`,\n element: path,\n propertyPath,\n }),\n ];\n }\n const item = context.inventory.items[id];\n if (item === undefined) {\n return [\n createOutcome('configuration/expected-file', {\n detail: `Public root node \"${path}\" is not a resolved file in the inventory.`,\n element: path,\n propertyPath,\n }),\n ];\n }\n if (item.kind !== 'file') {\n return [\n createOutcome('configuration/expected-file', {\n detail: `Public root node \"${path}\" must be a file.`,\n element: path,\n propertyPath,\n }),\n ];\n }\n\n const location = context.enumeratedRootNodes.get(path);\n if (location === undefined) {\n return [\n createOutcome('configuration/public-root-node-not-enumerated', {\n element: path,\n propertyPath,\n }),\n ];\n }\n if (scope.kind === 'common') {\n return [];\n }\n\n const owned = context.ownedOrigins.get(location.treeOrigin);\n if (owned !== undefined && owned.localIndex === scope.localIndex) {\n return [];\n }\n return [\n createOutcome('configuration/reference-outside-local-scope', {\n detail: `Public root node \"${path}\" belongs to tree \"${location.treeOrigin}\" outside this local configuration.`,\n element: path,\n propertyPath,\n }),\n ];\n}\n","import type { TFAFLocalConfig } from '../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\n\nexport function hasOnlyRootLayers(local: TFAFLocalConfig): boolean {\n const hasFragments = (local.rootFragments?.length ?? 0) > 0;\n const hasLayers = (local.rootLayers?.length ?? 0) > 0;\n return !hasFragments && hasLayers;\n}\n","import type { TFAFLocalConfig } from '../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { CONSTRAINT_PUBLIC_ROOT_NODES_IN_ROOT_LAYER_TREE } from '../../../../_validate-config-references@shared/_constants/reference-constraints.constant.js';\nimport { rejectPublicRootNode } from '../../_validate-frontier-references@shared/_utils/reject-public-root-node/index.js';\nimport { hasOnlyRootLayers } from './_utils/has-only-root-layers/index.js';\n\nexport function rejectLocalPublicRootNodes(\n local: TFAFLocalConfig,\n localIndex: number,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const nodes = local.publicRootNodes ?? [];\n const basePath = `faf.locals[${localIndex}].publicRootNodes`;\n if (hasOnlyRootLayers(local)) {\n return nodes.map((path, index) =>\n createOutcome(CONSTRAINT_PUBLIC_ROOT_NODES_IN_ROOT_LAYER_TREE, {\n element: path,\n propertyPath: `${basePath}[${index}]`,\n })\n );\n }\n\n return nodes.flatMap((path, index) =>\n rejectPublicRootNode(\n path,\n `${basePath}[${index}]`,\n { kind: 'local', localIndex },\n context\n )\n );\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectPublicRootNode } from '../../_validate-frontier-references@shared/_utils/reject-public-root-node/index.js';\n\nexport function rejectPublicRootNodeList(\n nodes: readonly string[],\n basePath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return nodes.flatMap((path, index) =>\n rejectPublicRootNode(path, `${basePath}[${index}]`, scope, context)\n );\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TOwnedOrigin,\n TScopeBinding,\n} from '../../../../../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function rejectTreeDependencySource(\n path: string,\n propertyPath: string,\n scope: TScopeBinding,\n owned: TOwnedOrigin | undefined,\n _family?: TConfigOutcome['family']\n): readonly TConfigOutcome[] {\n if (owned === undefined) {\n return [\n createOutcome('configuration/tree-dependency-not-tree-origin', {\n element: path,\n propertyPath,\n }),\n ];\n }\n if (scope.kind !== 'local') {\n return [];\n }\n if (owned.localIndex !== scope.localIndex) {\n return [\n createOutcome('configuration/tree-dependency-from-outside-scope', {\n element: path,\n propertyPath,\n }),\n ];\n }\n return [];\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { rejectTreeDependencySource } from './_utils/reject-tree-dependency-source/index.js';\n\nexport function rejectTreeDependencyEnd(\n path: string,\n propertyPath: string,\n role: 'source' | 'target',\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const id = context.inventory.pathToId.get(path);\n if (id === undefined) {\n return [\n createOutcome('configuration/non-existent-path', {\n detail: `Tree dependency ${role} \"${path}\" does not exist under configuration base \"${context.baseDirectory}\".`,\n element: path,\n propertyPath,\n }),\n ];\n }\n const item = context.inventory.items[id];\n if (item === undefined) {\n return [\n createOutcome('configuration/expected-directory', {\n detail: `Tree dependency ${role} \"${path}\" is not a resolved directory in the inventory.`,\n element: path,\n propertyPath,\n }),\n ];\n }\n if (item.kind !== 'directory') {\n return [\n createOutcome('configuration/expected-directory', {\n detail: `Tree dependency ${role} \"${path}\" must be a directory.`,\n element: path,\n propertyPath,\n }),\n ];\n }\n\n const owned = context.ownedOrigins.get(path);\n if (role === 'source') {\n return rejectTreeDependencySource(path, propertyPath, scope, owned);\n }\n if (owned !== undefined || item.treeOrigin === path) {\n return [];\n }\n return [\n createOutcome('configuration/tree-dependency-not-tree-origin', {\n element: path,\n propertyPath,\n }),\n ];\n}\n","import type { TFAFTreeDependency } from '../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { rejectTreeDependencyEnd } from './_utils/reject-tree-dependency-end/index.js';\n\nexport function rejectOneTreeDependency(\n dependency: TFAFTreeDependency,\n prefix: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const fromOutcomes = dependency.from.flatMap((path, index) =>\n rejectTreeDependencyEnd(\n path,\n `${prefix}.from[${index}]`,\n 'source',\n scope,\n context\n )\n );\n const toOutcomes = dependency.to.flatMap((path, index) =>\n rejectTreeDependencyEnd(\n path,\n `${prefix}.to[${index}]`,\n 'target',\n scope,\n context\n )\n );\n const selfOutcomes: TConfigOutcome[] = [];\n for (const [index, path] of dependency.to.entries()) {\n if (dependency.from.includes(path)) {\n selfOutcomes.push(\n createOutcome('configuration/tree-dependency-self', {\n element: path,\n propertyPath: `${prefix}.to[${index}]`,\n })\n );\n }\n }\n return [...fromOutcomes, ...toOutcomes, ...selfOutcomes];\n}\n","import type { TFAFTreeDependency } from '../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectOneTreeDependency } from './_utils/reject-one-tree-dependency/index.js';\n\nexport function rejectTreeDependencies(\n dependencies: readonly TFAFTreeDependency[],\n basePath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return dependencies.flatMap((dependency, index) =>\n rejectOneTreeDependency(dependency, `${basePath}[${index}]`, scope, context)\n );\n}\n","import type { TFAFConfig } from '../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectExternalDependencies } from './_utils/reject-external-dependencies/index.js';\nimport { rejectLocalPublicRootNodes } from './_utils/reject-local-public-root-nodes/index.js';\nimport { rejectPublicRootNodeList } from './_utils/reject-public-root-node-list/index.js';\nimport { rejectTreeDependencies } from './_utils/reject-tree-dependencies/index.js';\n\nexport function validateFrontierReferences(\n config: TFAFConfig,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const commonPublic = rejectPublicRootNodeList(\n config.faf.common?.publicRootNodes ?? [],\n 'faf.common.publicRootNodes',\n { kind: 'common' },\n context\n );\n const commonTrees = rejectTreeDependencies(\n config.faf.common?.treeDependencies ?? [],\n 'faf.common.treeDependencies',\n { kind: 'common' },\n context\n );\n const commonExternal = rejectExternalDependencies(\n config.faf.common?.externalDependencies ?? [],\n 'faf.common.externalDependencies',\n { kind: 'common' },\n context\n );\n const localOutcomes = config.faf.locals.flatMap((local, localIndex) => {\n const scope = { kind: 'local' as const, localIndex };\n const base = `faf.locals[${localIndex}]`;\n return [\n ...rejectLocalPublicRootNodes(local, localIndex, context),\n ...rejectTreeDependencies(\n local.treeDependencies ?? [],\n `${base}.treeDependencies`,\n scope,\n context\n ),\n ...rejectExternalDependencies(\n local.externalDependencies ?? [],\n `${base}.externalDependencies`,\n scope,\n context\n ),\n ];\n });\n return [...commonPublic, ...commonTrees, ...commonExternal, ...localOutcomes];\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TOriginDirectoryCheck } from '../../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function rejectOriginDirectory(\n check: TOriginDirectoryCheck\n): readonly TConfigOutcome[] {\n const id = check.context.inventory.pathToId.get(check.path);\n if (id === undefined) {\n return [\n createOutcome('configuration/non-existent-path', {\n detail: `${check.label} \"${check.path}\" does not exist under configuration base \"${check.context.baseDirectory}\".`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n const item = check.context.inventory.items[id];\n if (item === undefined) {\n return [\n createOutcome('configuration/expected-directory', {\n detail: `${check.label} \"${check.path}\" is not a resolved directory in the inventory.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n if (item.kind !== 'directory') {\n return [\n createOutcome('configuration/expected-directory', {\n detail: `${check.label} \"${check.path}\" must be a directory.`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n if (item.treeOrigin !== null && item.treeOrigin !== check.path) {\n return [\n createOutcome('configuration/origin-contained-in-other-tree', {\n detail: `${check.label} \"${check.path}\" is contained in tree \"${item.treeOrigin}\".`,\n element: check.path,\n propertyPath: check.propertyPath,\n }),\n ];\n }\n\n return [];\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function rejectDependencyFrom(\n fromNames: readonly string[],\n currentNames: ReadonlySet<string>,\n _fragmentPath: string,\n edgePrefix: string\n): readonly TConfigOutcome[] {\n const outcomes: TConfigOutcome[] = [];\n for (const [index, name] of fromNames.entries()) {\n if (!currentNames.has(name)) {\n outcomes.push(\n createOutcome('configuration/invalid-root-dependency-from', {\n element: name,\n propertyPath: `${edgePrefix}.from[${index}]`,\n })\n );\n }\n }\n return outcomes;\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\n\nexport function rejectDependencyTo(\n toPaths: readonly string[],\n fragmentPath: string,\n treeOrigin: string,\n edgePrefix: string,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return toPaths.flatMap((toPath, index): readonly TConfigOutcome[] => {\n const propertyPath = `${edgePrefix}.to[${index}]`;\n const location = context.enumeratedRootNodes.get(toPath);\n if (location === undefined) {\n return [\n createOutcome('configuration/invalid-root-dependency-to', {\n element: toPath,\n propertyPath,\n }),\n ];\n }\n if (location.treeOrigin !== treeOrigin) {\n return [\n createOutcome('configuration/root-dependency-different-tree', {\n detail: `Root dependency target \"${toPath}\" belongs to tree \"${location.treeOrigin}\", not \"${treeOrigin}\".`,\n element: toPath,\n propertyPath,\n }),\n ];\n }\n if (location.rootFragmentPath === fragmentPath) {\n return [\n createOutcome('configuration/root-dependency-same-fragment', {\n detail: `Root dependency target \"${toPath}\" belongs to the same root fragment \"${fragmentPath}\".`,\n element: toPath,\n propertyPath,\n }),\n ];\n }\n return [];\n });\n}\n","import type { TFAFRootFragment } from '../../../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectDependencyFrom } from './_utils/reject-dependency-from/index.js';\nimport { rejectDependencyTo } from './_utils/reject-dependency-to/index.js';\n\nexport function rejectDependencyEdges(\n fragment: TFAFRootFragment,\n treeOrigin: string,\n pathPrefix: string,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const edges = fragment.dependencyEdges ?? [];\n const currentNames = new Set(fragment.rootNodes.flat());\n return edges.flatMap((edge, edgeIndex) => {\n const edgePrefix = `${pathPrefix}.dependencyEdges[${edgeIndex}]`;\n return [\n ...rejectDependencyFrom(\n edge.from,\n currentNames,\n fragment.path,\n edgePrefix\n ),\n ...rejectDependencyTo(\n edge.to,\n fragment.path,\n treeOrigin,\n edgePrefix,\n context\n ),\n ];\n });\n}\n","import type { TInventory } from '../../../../../../../../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function isPhysicalDirectChild(\n inventory: TInventory,\n childPath: string,\n parentPath: string\n): boolean {\n const childId = inventory.pathToId.get(childPath);\n if (childId === undefined) {\n return true;\n }\n\n const parentId = inventory.pathToId.get(parentPath);\n if (parentId === undefined) {\n return false;\n }\n\n const child = inventory.items[childId];\n if (child === undefined) {\n return true;\n }\n\n const parent = inventory.items[parentId];\n return parent !== undefined && child.parentId === parent.id;\n}\n","export function isStringDirectChild(\n childPath: string,\n parentPath: string\n): boolean {\n if (parentPath === '.') {\n return childPath.length > 0 && !childPath.includes('/');\n }\n\n const prefix = `${parentPath}/`;\n return (\n childPath.startsWith(prefix) &&\n !childPath.slice(prefix.length).includes('/')\n );\n}\n","import type { TInventory } from '../../../../../../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { isPhysicalDirectChild } from './_utils/is-physical-direct-child/index.js';\nimport { isStringDirectChild } from './_utils/is-string-direct-child/index.js';\n\nexport function isDirectChildDirectory(\n inventory: TInventory,\n childPath: string,\n parentPath: string\n): boolean {\n return (\n isStringDirectChild(childPath, parentPath) &&\n isPhysicalDirectChild(inventory, childPath, parentPath)\n );\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { rejectDirectoryInScope } from '../../../../../../../../_validate-config-references@shared/_utils/reject-directory-in-scope/index.js';\nimport { isDirectChildDirectory } from '../../_validate-root-fragment-tree@shared/_utils/is-direct-child-directory/index.js';\n\nexport function rejectNestedRootFragment(\n childPath: string,\n parentPath: string,\n propertyPath: string,\n localIndex: number,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const directoryOutcomes = rejectDirectoryInScope({\n context,\n label: 'Nested root fragment',\n path: childPath,\n propertyPath,\n scope: { kind: 'local', localIndex },\n });\n if (isDirectChildDirectory(context.inventory, childPath, parentPath)) {\n return directoryOutcomes;\n }\n\n return [\n ...directoryOutcomes,\n createOutcome('configuration/nested-root-fragment-not-direct-child', {\n element: childPath,\n propertyPath,\n }),\n ];\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { rejectFileInScope } from '../../../../../../../../../../_validate-config-references@shared/_utils/reject-file-in-scope/index.js';\nimport { isDirectChildDirectory } from '../../../../_validate-root-fragment-tree@shared/_utils/is-direct-child-directory/index.js';\n\nexport function rejectOneRootNode(\n fragmentPath: string,\n name: string,\n propertyPath: string,\n localIndex: number,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const fullPath = fragmentPath === '.' ? name : `${fragmentPath}/${name}`;\n const fileOutcomes = rejectFileInScope({\n context,\n label: 'Root node',\n path: fullPath,\n propertyPath,\n scope: { kind: 'local', localIndex },\n });\n if (isDirectChildDirectory(context.inventory, fullPath, fragmentPath)) {\n return fileOutcomes;\n }\n\n return [\n ...fileOutcomes,\n createOutcome('configuration/root-node-not-direct-child', {\n element: fullPath,\n propertyPath,\n }),\n ];\n}\n","import type { TFAFRootFragment } from '../../../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectOneRootNode } from './_utils/reject-one-root-node/index.js';\n\nexport function rejectRootNodes(\n fragment: TFAFRootFragment,\n pathPrefix: string,\n localIndex: number,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return fragment.rootNodes.flatMap((tier, tierIndex) =>\n tier.flatMap((name, nodeIndex) =>\n rejectOneRootNode(\n fragment.path,\n name,\n `${pathPrefix}.rootNodes[${tierIndex}][${nodeIndex}]`,\n localIndex,\n context\n )\n )\n );\n}\n","import type { TFAFRootFragment } from '../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectOriginDirectory } from '../../_validate-local-roots@shared/_utils/reject-origin-directory/index.js';\nimport { rejectDependencyEdges } from './_utils/reject-dependency-edges/index.js';\nimport { rejectNestedRootFragment } from './_utils/reject-nested-root-fragment/index.js';\nimport { rejectRootNodes } from './_utils/reject-root-nodes/index.js';\n\nexport function validateRootFragmentTree(\n fragment: TFAFRootFragment,\n parentPath: null | string,\n treeOrigin: string,\n localIndex: number,\n pathPrefix: string,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const pathOutcomes =\n parentPath === null\n ? rejectOriginDirectory({\n context,\n label: 'Declared root fragment directory',\n path: fragment.path,\n propertyPath: `${pathPrefix}.path`,\n })\n : rejectNestedRootFragment(\n fragment.path,\n parentPath,\n `${pathPrefix}.path`,\n localIndex,\n context\n );\n const children = fragment.subRootFragments ?? [];\n const childOutcomes = children.flatMap((child, index) =>\n validateRootFragmentTree(\n child,\n fragment.path,\n treeOrigin,\n localIndex,\n `${pathPrefix}.subRootFragments[${index}]`,\n context\n )\n );\n return [\n ...pathOutcomes,\n ...rejectRootNodes(fragment, pathPrefix, localIndex, context),\n ...rejectDependencyEdges(fragment, treeOrigin, pathPrefix, context),\n ...childOutcomes,\n ];\n}\n","import type { TFAFLocalConfig } from '../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { validateRootFragmentTree } from './_utils/validate-root-fragment-tree/index.js';\nimport { rejectOriginDirectory } from './_validate-local-roots@shared/_utils/reject-origin-directory/index.js';\n\nexport function validateLocalRoots(\n local: TFAFLocalConfig,\n localIndex: number,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const layers = local.rootLayers ?? [];\n const layerOutcomes = layers.flatMap((path, layerIndex) =>\n rejectOriginDirectory({\n context,\n label: 'Origin directory',\n path,\n propertyPath: `faf.locals[${localIndex}].rootLayers[${layerIndex}]`,\n })\n );\n const fragments = local.rootFragments ?? [];\n const fragmentOutcomes = fragments.flatMap((fragment, fragmentIndex) =>\n validateRootFragmentTree(\n fragment,\n null,\n fragment.path,\n localIndex,\n `faf.locals[${localIndex}].rootFragments[${fragmentIndex}]`,\n context\n )\n );\n return [...layerOutcomes, ...fragmentOutcomes];\n}\n","import type { TFAFConfig } from '../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { validateLocalRoots } from './_utils/validate-local-roots/index.js';\n\nexport function validateRootReferences(\n config: TFAFConfig,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return config.faf.locals.flatMap((local, localIndex) =>\n validateLocalRoots(local, localIndex, context)\n );\n}\n","import type { TFAFLocalHorizontalHierarchy } from '../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectDirectoryInScope } from '../../../../../../_validate-config-references@shared/_utils/reject-directory-in-scope/index.js';\n\nexport function rejectHierarchyPaths(\n hierarchies: readonly TFAFLocalHorizontalHierarchy[],\n basePath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return hierarchies.flatMap((entry, entryIndex) =>\n entry.paths.flatMap((path, pathIndex) =>\n rejectDirectoryInScope({\n context,\n label: 'Hierarchy directory',\n path,\n propertyPath: `${basePath}[${entryIndex}].paths[${pathIndex}]`,\n scope,\n })\n )\n );\n}\n","import type { TFAFMimeticPathStructure } from '../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { rejectDirectoryInScope } from '../../../../../../_validate-config-references@shared/_utils/reject-directory-in-scope/index.js';\n\nexport function rejectMimeticStructures(\n structures: readonly TFAFMimeticPathStructure[],\n basePath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const seen = new Set<string>();\n const outcomes: TConfigOutcome[] = [];\n for (const [structIndex, structure] of structures.entries()) {\n for (const [pathIndex, path] of structure.paths.entries()) {\n const propertyPath = `${basePath}[${structIndex}].paths[${pathIndex}]`;\n if (seen.has(path)) {\n outcomes.push(\n createOutcome('configuration/duplicate-mimetic-path', {\n element: path,\n propertyPath,\n })\n );\n } else {\n seen.add(path);\n }\n outcomes.push(\n ...rejectDirectoryInScope({\n context,\n label: 'Mimetic path',\n path,\n propertyPath,\n scope,\n })\n );\n }\n }\n return outcomes;\n}\n","import type {\n TFAFLocalHorizontalHierarchy,\n TFAFMimeticPathStructure,\n} from '../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TReferenceContext,\n TScopeBinding,\n} from '../../../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { rejectHierarchyPaths } from './_utils/reject-hierarchy-paths/index.js';\nimport { rejectMimeticStructures } from './_utils/reject-mimetic-structures/index.js';\n\nexport function validateStructuralSection(\n hierarchies: readonly TFAFLocalHorizontalHierarchy[] | undefined,\n structures: readonly TFAFMimeticPathStructure[] | undefined,\n basePath: string,\n scope: TScopeBinding,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n return [\n ...rejectHierarchyPaths(\n hierarchies ?? [],\n `${basePath}.localHorizontalHierarchies`,\n scope,\n context\n ),\n ...rejectMimeticStructures(\n structures ?? [],\n `${basePath}.mimeticPathStructures`,\n scope,\n context\n ),\n ];\n}\n","import type { TFAFConfig } from '../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TReferenceContext } from '../../_validate-config-references@shared/_types/reference-context.type.js';\n\nimport { validateStructuralSection } from './_utils/validate-structural-section/index.js';\n\nexport function validateStructuralReferences(\n config: TFAFConfig,\n context: TReferenceContext\n): readonly TConfigOutcome[] {\n const commonOutcomes = validateStructuralSection(\n config.faf.common?.localHorizontalHierarchies,\n config.faf.common?.mimeticPathStructures,\n 'faf.common',\n { kind: 'common' },\n context\n );\n const localOutcomes = config.faf.locals.flatMap((local, localIndex) =>\n validateStructuralSection(\n local.localHorizontalHierarchies,\n local.mimeticPathStructures,\n `faf.locals[${localIndex}]`,\n { kind: 'local', localIndex },\n context\n )\n );\n return [...commonOutcomes, ...localOutcomes];\n}\n","import type { TFAFRootFragment } from '../../../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TEnumeratedRootNode } from '../../../../../../_types/reference-context.type.js';\n\nexport function collectFragmentRootNodes(\n fragment: TFAFRootFragment,\n treeOrigin: string\n): ReadonlyMap<string, TEnumeratedRootNode> {\n const directEntries = fragment.rootNodes.flatMap((tier) =>\n tier.map((name) => {\n const fullPath =\n fragment.path === '.' ? name : `${fragment.path}/${name}`;\n const location: TEnumeratedRootNode = {\n rootFragmentPath: fragment.path,\n treeOrigin,\n };\n return [fullPath, location] as const;\n })\n );\n const children = fragment.subRootFragments ?? [];\n const nestedEntries = children.flatMap((child) => [\n ...collectFragmentRootNodes(child, treeOrigin),\n ]);\n return new Map([...directEntries, ...nestedEntries]);\n}\n","import type { TFAFConfig } from '../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TEnumeratedRootNode } from '../../../../_types/reference-context.type.js';\n\nimport { collectFragmentRootNodes } from './_utils/collect-fragment-root-nodes/index.js';\n\nexport function collectEnumeratedRootNodes(\n config: TFAFConfig\n): ReadonlyMap<string, TEnumeratedRootNode> {\n const maps = config.faf.locals.flatMap((local) => {\n const fragments = local.rootFragments ?? [];\n return fragments.map((fragment) =>\n collectFragmentRootNodes(fragment, fragment.path)\n );\n });\n const entries = maps.flatMap((nodes) => [...nodes]);\n return new Map(entries);\n}\n","import type { TFAFConfig } from '../../../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TEffectiveDeclarations } from '../../../../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TOwnedOrigin } from '../../../../_types/reference-context.type.js';\n\nimport { UNASSIGNED_LOCAL_INDEX } from '../../../../_constants/reference-constraints.constant.js';\n\nexport function collectOwnedOrigins(\n config: TFAFConfig,\n declarations: TEffectiveDeclarations\n): ReadonlyMap<string, TOwnedOrigin> {\n const entries: [string, TOwnedOrigin][] = [];\n for (const [localIndex, local] of config.faf.locals.entries()) {\n const layers = local.rootLayers ?? [];\n for (const path of layers) {\n entries.push([path, { localIndex, originKind: 'root-layer' }]);\n }\n const fragments = local.rootFragments ?? [];\n for (const fragment of fragments) {\n entries.push([\n fragment.path,\n { localIndex, originKind: 'root-fragment' },\n ]);\n }\n }\n\n for (const tree of declarations.trees) {\n const isAlreadyOwned = entries.some(([path]) => path === tree.originPath);\n if (!isAlreadyOwned) {\n entries.push([\n tree.originPath,\n {\n localIndex: UNASSIGNED_LOCAL_INDEX,\n originKind: tree.originKind,\n },\n ]);\n }\n }\n\n return new Map(entries);\n}\n","import type { TFAFConfig } from '../../../../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TEffectiveDeclarations } from '../../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventory } from '../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TReferenceContext } from '../../_types/reference-context.type.js';\n\nimport { toPosixPath } from '../../../../../../../../../_session@shared/_utils/to-posix-path/index.js';\nimport { collectEnumeratedRootNodes } from './_utils/collect-enumerated-root-nodes/index.js';\nimport { collectOwnedOrigins } from './_utils/collect-owned-origins/index.js';\n\nexport function createReferenceContext(\n config: TFAFConfig,\n declarations: TEffectiveDeclarations,\n inventory: TInventory\n): TReferenceContext {\n return {\n aliasPrefixes: declarations.aliases.map((alias) => alias.prefix),\n baseDirectory: toPosixPath(declarations.baseDirectory),\n enumeratedRootNodes: collectEnumeratedRootNodes(config),\n inventory,\n ownedOrigins: collectOwnedOrigins(config, declarations),\n };\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function sortConfigOutcomes(\n outcomes: readonly TConfigOutcome[]\n): readonly TConfigOutcome[] {\n const copy = [...outcomes];\n copy.sort((left, right) => {\n const pathComparison = compareOrdinal(\n left.propertyPath,\n right.propertyPath\n );\n if (pathComparison !== 0) {\n return pathComparison;\n }\n const constraintComparison = compareOrdinal(\n left.constraint,\n right.constraint\n );\n return constraintComparison === 0\n ? compareOrdinal(left.element, right.element)\n : constraintComparison;\n });\n return copy;\n}\n","import type { TFAFConfig } from '../../../../../../../../../../_src@shared/_types/faf-config.type.js';\nimport type { TConfigOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TEffectiveDeclarations } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { validateForeignReferences } from './_utils/validate-foreign-references/index.js';\nimport { validateFrontierReferences } from './_utils/validate-frontier-references/index.js';\nimport { validateRootReferences } from './_utils/validate-root-references/index.js';\nimport { validateStructuralReferences } from './_utils/validate-structural-references/index.js';\nimport { createReferenceContext } from './_validate-config-references@shared/_utils/create-reference-context/index.js';\nimport { sortConfigOutcomes } from './_validate-config-references@shared/_utils/sort-config-outcomes/index.js';\n\nexport function validateConfigReferences(\n config: TFAFConfig,\n declarations: TEffectiveDeclarations,\n inventory: TInventory\n): readonly TConfigOutcome[] {\n const context = createReferenceContext(config, declarations, inventory);\n return sortConfigOutcomes([\n ...validateRootReferences(config, context),\n ...validateForeignReferences(config, context),\n ...validateStructuralReferences(config, context),\n ...validateFrontierReferences(config, context),\n ]);\n}\n","import nodePath from 'node:path';\n\nimport type { TSourceLocation } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TAnchoredOutcome,\n TAnchorOutcomesInput,\n TAnchorOutcomesResult,\n} from './anchor-outcomes.type.js';\n\nimport { toPosixPath } from '../../../../_session@shared/_utils/to-posix-path/index.js';\nimport { compareAnchoredOutcomes } from './_utils/compare-anchored-outcomes/index.js';\nimport { selectAnchorPath } from './_utils/select-anchor-path/index.js';\n\nexport function anchorOutcomes(\n input: TAnchorOutcomesInput\n): TAnchorOutcomesResult {\n const fileStart: TSourceLocation = { column: 1, line: 1 };\n const anchored: TAnchoredOutcome[] = [];\n for (const outcome of input.outcomes) {\n const anchorPath = selectAnchorPath({\n baseDirectory: input.baseDirectory,\n configPath: input.configPath,\n inventory: input.inventory,\n model: input.model,\n outcome,\n });\n const elementRelative = toPosixPath(\n nodePath.isAbsolute(outcome.element)\n ? nodePath.relative(input.baseDirectory, outcome.element)\n : outcome.element\n );\n const anchorRelative = toPosixPath(\n nodePath.relative(input.baseDirectory, anchorPath)\n );\n const isSameFile = elementRelative === anchorRelative;\n anchored.push({\n anchorPath,\n outcome,\n position:\n isSameFile && outcome.position !== undefined\n ? outcome.position\n : fileStart,\n });\n }\n anchored.sort(compareAnchoredOutcomes);\n const byFile = new Map<string, TAnchoredOutcome[]>();\n for (const item of anchored) {\n const existing = byFile.get(item.anchorPath) ?? [];\n byFile.set(item.anchorPath, [...existing, item]);\n }\n return { byFile, outcomes: anchored };\n}\n","import type { TAnchoredOutcome } from '../../../../../../_session@shared/_types/anchored-outcome.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function compareAnchoredOutcomes(\n left: TAnchoredOutcome,\n right: TAnchoredOutcome\n): number {\n const pathComparison = compareOrdinal(left.anchorPath, right.anchorPath);\n if (pathComparison !== 0) {\n return pathComparison;\n }\n const constraintComparison = compareOrdinal(\n left.outcome.constraint,\n right.outcome.constraint\n );\n if (constraintComparison !== 0) {\n return constraintComparison;\n }\n const elementComparison = compareOrdinal(\n left.outcome.element,\n right.outcome.element\n );\n if (elementComparison !== 0) {\n return elementComparison;\n }\n const positionComparison = compareSourceLocations(\n left.position,\n right.position\n );\n return positionComparison === 0\n ? compareOrdinal(left.outcome.message, right.outcome.message)\n : positionComparison;\n}\n","import nodePath from 'node:path';\n\nimport type { TSelectAnchorPathInput } from './select-anchor-path.type.js';\n\nimport { isLintablePath } from './_select-anchor-path@shared/_utils/is-lintable-path/index.js';\nimport { anchorDomainPath } from './_utils/anchor-domain-path/index.js';\nimport { findInventoryItem } from './_utils/find-inventory-item/index.js';\n\nexport function selectAnchorPath(input: TSelectAnchorPathInput): string {\n if (\n input.outcome.family === 'configuration' ||\n input.inventory === undefined\n ) {\n return input.configPath;\n }\n const item = findInventoryItem(\n input.inventory,\n input.baseDirectory,\n input.outcome.element\n );\n if (item === undefined) {\n return input.configPath;\n }\n if (item.kind === 'file' && isLintablePath(item.path)) {\n return nodePath.resolve(input.baseDirectory, item.path);\n }\n const parent =\n item.parentId === null ? undefined : input.inventory.items[item.parentId];\n const domain = item.kind === 'directory' ? item : parent;\n if (domain === undefined) {\n return input.configPath;\n }\n const relativeAnchor = anchorDomainPath(input.inventory, input.model, domain);\n return relativeAnchor === undefined\n ? input.configPath\n : nodePath.resolve(input.baseDirectory, relativeAnchor);\n}\n","import nodePathPosix from 'node:path/posix';\n\nimport { LINTABLE_EXTENSIONS } from '../../../../../../../../../../../../../_src@shared/_constants/faf.constant.js';\n\nexport function isLintablePath(filePath: string): boolean {\n const extension = nodePathPosix.extname(filePath);\n return LINTABLE_EXTENSIONS.some((candidate) => candidate === extension);\n}\n","import type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { compareOrdinal } from '../../../../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { isLintablePath } from '../../../../_select-anchor-path@shared/_utils/is-lintable-path/index.js';\n\nexport function lintableChildren(\n inventory: TInventory,\n parentId: number\n): readonly TInventoryItem[] {\n const children: TInventoryItem[] = [];\n for (const item of inventory.items) {\n if (\n item.parentId === parentId &&\n item.kind === 'file' &&\n isLintablePath(item.path)\n ) {\n children.push(item);\n }\n }\n const ordered = [...children];\n ordered.sort((left, right) => compareOrdinal(left.path, right.path));\n return ordered;\n}\n","import type { TTaxonomyModel } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { lintableChildren } from './_utils/lintable-children/index.js';\n\nexport function anchorDomainPath(\n inventory: TInventory,\n model: TTaxonomyModel | undefined,\n domain: TInventoryItem\n): string | undefined {\n let current: TInventoryItem | undefined = domain;\n while (current !== undefined) {\n const children = lintableChildren(inventory, current.id);\n const classification = model?.byPath.get(current.path);\n const isFragment = classification?.domainKind === 'fragment';\n const master =\n isFragment && model !== undefined\n ? children.find(\n (child) => model.byItemId.get(child.id)?.nodeKind === 'master-node'\n )\n : undefined;\n if (master !== undefined) {\n return master.path;\n }\n const firstChild = children[0];\n if (firstChild !== undefined) {\n return firstChild.path;\n }\n current =\n current.parentId === null ? undefined : inventory.items[current.parentId];\n }\n return undefined;\n}\n","import nodePath from 'node:path';\n\nimport type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { toPosixPath } from '../../../../../../../../_session@shared/_utils/to-posix-path/index.js';\n\nexport function findInventoryItem(\n inventory: TInventory,\n baseDirectory: string,\n element: string\n): TInventoryItem | undefined {\n const normalizedId = inventory.pathToId.get(toPosixPath(element));\n if (normalizedId !== undefined) {\n return inventory.items[normalizedId];\n }\n if (!nodePath.isAbsolute(element)) {\n return undefined;\n }\n const relativeId = inventory.pathToId.get(\n toPosixPath(nodePath.relative(baseDirectory, element))\n );\n return relativeId === undefined ? undefined : inventory.items[relativeId];\n}\n","import type {\n TDependencyGraph,\n TEdgeMetadata,\n TLibraryNote,\n TVertexNature,\n} from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TPendingEdge } from '../../_build-dependency-graph@shared/_types/pending-edge.type.js';\n\nexport function assembleDependencyGraph(\n paths: readonly string[],\n natures: readonly TVertexNature[],\n edges: readonly TPendingEdge[],\n libraryNotes: readonly TLibraryNote[]\n): TDependencyGraph {\n const emptyEdges = (): TPendingEdge[] => [];\n const groups = Array.from(paths, (path) => ({\n edges: emptyEdges(),\n path,\n }));\n for (const edge of edges) {\n const group = groups.at(edge.sourceVertex);\n if (group === undefined) {\n continue;\n }\n group.edges.push(edge);\n }\n\n const destinationVertices: number[] = [];\n const edgeMetadata: TEdgeMetadata[] = [];\n const rowOffsets = new Int32Array(paths.length + 1);\n const edgesBySourcePath = new Map<string, readonly number[]>();\n const pathToVertex = new Map<string, number>();\n let edgeIndex = 0;\n for (const [vertex, group] of groups.entries()) {\n rowOffsets[vertex] = edgeIndex;\n pathToVertex.set(group.path, vertex);\n const indices: number[] = [];\n for (const edge of group.edges) {\n destinationVertices.push(edge.destinationVertex);\n edgeMetadata.push(edge.metadata);\n indices.push(edgeIndex);\n edgeIndex += 1;\n }\n edgesBySourcePath.set(group.path, indices);\n }\n rowOffsets[paths.length] = edgeIndex;\n\n const libraryNotesBySourcePath = new Map<string, number[]>();\n for (const [index, note] of libraryNotes.entries()) {\n const existing = libraryNotesBySourcePath.get(note.sourcePath);\n if (existing === undefined) {\n libraryNotesBySourcePath.set(note.sourcePath, [index]);\n } else {\n existing.push(index);\n }\n }\n\n return {\n columnTargets: Int32Array.from(destinationVertices),\n edgeCount: destinationVertices.length,\n edgeMetadata,\n edgesBySourcePath,\n libraryNotes,\n libraryNotesBySourcePath,\n pathToVertex,\n rowOffsets,\n vertexCount: paths.length,\n vertexNatures: natures,\n vertexToPath: paths,\n };\n}\n","import type { TModuleRecord } from '../../../../../../_session@shared/_types/module-record.type.js';\nimport type {\n TImportResolution,\n TVertexNature,\n} from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function collectGraphVertices(\n inventory: TInventory,\n records: ReadonlyMap<string, TModuleRecord>,\n resolutions: ReadonlyMap<string, readonly TImportResolution[]>\n): {\n readonly natures: readonly TVertexNature[];\n readonly paths: readonly string[];\n readonly pathToVertex: ReadonlyMap<string, number>;\n} {\n const readVertexNature = (path: string): TVertexNature => {\n const itemId = inventory.pathToId.get(path);\n const item = itemId === undefined ? undefined : inventory.items[itemId];\n return item === undefined || item.treeOrigin === null\n ? { kind: 'external-local-file' }\n : { inventoryId: item.id, kind: 'tree-node' };\n };\n\n const paths = new Set<string>(records.keys());\n for (const sourceResolutions of resolutions.values()) {\n for (const resolution of sourceResolutions) {\n if (resolution.target.type === 'local-file') {\n paths.add(resolution.target.path);\n }\n }\n }\n const ordered = [...paths];\n ordered.sort(compareOrdinal);\n const pathToVertex = new Map<string, number>();\n const natures: TVertexNature[] = [];\n for (const [index, path] of ordered.entries()) {\n pathToVertex.set(path, index);\n natures.push(readVertexNature(path));\n }\n return { natures, paths: ordered, pathToVertex };\n}\n","import type {\n TModuleImport,\n TModuleRecord,\n} from '../../../../../../_session@shared/_types/module-record.type.js';\nimport type {\n TImportResolution,\n TLibraryNote,\n} from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TPendingEdge } from '../../_build-dependency-graph@shared/_types/pending-edge.type.js';\n\nexport function collectResolvedArcs(\n records: ReadonlyMap<string, TModuleRecord>,\n resolutions: ReadonlyMap<string, readonly TImportResolution[]>,\n paths: readonly string[],\n pathToVertex: ReadonlyMap<string, number>\n): {\n readonly edges: readonly TPendingEdge[];\n readonly libraryNotes: readonly TLibraryNote[];\n} {\n const edges: TPendingEdge[] = [];\n const libraryNotes: TLibraryNote[] = [];\n\n const appendResolvedImport = (\n sourcePath: string,\n sourceVertex: number,\n importIndex: number,\n importItem: TModuleImport,\n resolution: TImportResolution\n ): void => {\n if (importItem.specifier === null) {\n return;\n }\n const specifier = importItem.specifier;\n const shared = {\n aliasAlternatives: resolution.aliasAlternatives,\n aliasUsed: resolution.aliasUsed,\n importIndex,\n isTypeOnly: importItem.isTypeOnly,\n position: importItem.position,\n sourcePath,\n specifier,\n syntaxKind: importItem.kind,\n };\n if (resolution.target.type === 'external-library') {\n libraryNotes.push({\n ...shared,\n packageName: resolution.target.packageName,\n });\n return;\n }\n if (resolution.target.type !== 'local-file') {\n return;\n }\n const destinationVertex = pathToVertex.get(resolution.target.path);\n if (destinationVertex === undefined) {\n return;\n }\n edges.push({\n destinationVertex,\n metadata: {\n ...shared,\n destinationPath: resolution.target.path,\n },\n sourceVertex,\n });\n };\n\n for (const [sourceVertex, sourcePath] of paths.entries()) {\n const record = records.get(sourcePath);\n const sourceResolutions = resolutions.get(sourcePath);\n if (record === undefined || sourceResolutions === undefined) {\n continue;\n }\n const resolutionsByIndex = new Map<number, TImportResolution>();\n for (const resolution of sourceResolutions) {\n resolutionsByIndex.set(resolution.importIndex, resolution);\n }\n for (const [importIndex, importItem] of record.imports.entries()) {\n const resolution = resolutionsByIndex.get(importIndex);\n if (resolution === undefined) {\n continue;\n }\n appendResolvedImport(\n sourcePath,\n sourceVertex,\n importIndex,\n importItem,\n resolution\n );\n }\n }\n\n return { edges, libraryNotes };\n}\n","import type { TOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TModuleCollection } from '../../_verify-project@shared/_types/_aggregates/module-collection.type.js';\nimport type { TProjectBasis } from '../../_verify-project@shared/_types/_aggregates/project-basis.type.js';\nimport type { TTaxonomyModel } from '../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TDependencyGraph } from '../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\n\nimport { assembleDependencyGraph } from './_utils/assemble-dependency-graph/index.js';\nimport { collectGraphVertices } from './_utils/collect-graph-vertices/index.js';\nimport { collectResolvedArcs } from './_utils/collect-resolved-arcs/index.js';\n\nexport function buildDependencyGraph(\n basis: TProjectBasis,\n _taxonomy: TTaxonomyModel,\n modules: TModuleCollection\n): {\n readonly graph: TDependencyGraph;\n readonly outcomes: readonly TOutcome[];\n} {\n const vertices = collectGraphVertices(\n basis.inventory,\n modules.records,\n modules.resolutions\n );\n const arcs = collectResolvedArcs(\n modules.records,\n modules.resolutions,\n vertices.paths,\n vertices.pathToVertex\n );\n return {\n graph: assembleDependencyGraph(\n vertices.paths,\n vertices.natures,\n arcs.edges,\n arcs.libraryNotes\n ),\n outcomes: [],\n };\n}\n","import type { TRoleAttribution } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nexport const ABSENT_ROLE: TRoleAttribution = {\n kind: 'absent',\n roleName: null,\n};\n\nexport const ABSENT_ROLE_KIND = 'absent' as const;\n\nexport const ACCESS_NODE_FILE_NAME = 'index.ts';\n\nexport const DOMAIN_CATEGORY = 'category';\n\nexport const DOMAIN_FRAGMENT = 'fragment';\n\nexport const DOMAIN_FRACTAL_BRANCH = 'fractal-branch';\n\nexport const DOMAIN_LAYER = 'layer';\n\nexport const DOMAIN_PATH_SUB_CATEGORY = 'path-sub-category';\n\nexport const DOMAIN_ROOT_FRAGMENT = 'root-fragment';\n\nexport const DOMAIN_ROOT_LAYER = 'root-layer';\n\nexport const DOMAIN_SUB_CATEGORY = 'sub-category';\n\nexport const DOT_PATH = '.';\n\nexport const FORM_CATEGORY_NODES = 'category-nodes';\n\nexport const FORM_FRAGMENTS = 'fragments';\n\nexport const NODE_ACCESS = 'access-node';\n\nexport const NODE_CATEGORY = 'category-node';\n\nexport const NODE_FOREIGN = 'foreign-node';\n\nexport const NODE_FRAGMENT = 'fragment-node';\n\nexport const NODE_MASTER = 'master-node';\n\nexport const NODE_ROOT = 'root-node';\n\nexport const NODE_SUB_GRAPH = 'sub-graph-node';\n\nexport const NODE_UNAUTHORIZED = 'unauthorized-logical-node';\n\nexport const ROLE_EXPLICIT = 'explicit';\n\nexport const SHARED_SUFFIX = '@shared';\n\nexport const SLASH = '/';\n\nexport const UNDERSCORE = '_';\n","import type { TConfigOutcome } from '../../../../../../../../../_conformity@shared/_types/outcome.type.js';\n\nimport { compareOrdinal } from '../../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function compareConfigOutcomes(\n left: TConfigOutcome,\n right: TConfigOutcome\n): number {\n const byConstraint = compareOrdinal(left.constraint, right.constraint);\n if (byConstraint !== 0) {\n return byConstraint;\n }\n const byElement = compareOrdinal(left.element, right.element);\n return byElement === 0\n ? compareOrdinal(left.propertyPath, right.propertyPath)\n : byElement;\n}\n","import { SLASH } from '../../_constants/classification-constraints.constant.js';\n\nexport function readPathName(path: string): string {\n return path.slice(path.lastIndexOf(SLASH) + 1);\n}\n","import {\n DOT_PATH,\n SLASH,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\n\nexport function joinPosixPath(parentPath: string, name: string): string {\n return parentPath === DOT_PATH ? name : `${parentPath}${SLASH}${name}`;\n}\n","import { SLASH } from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\n\nexport function isPathInside(\n path: string,\n ancestorPaths: ReadonlySet<string>\n): boolean {\n for (const ancestorPath of ancestorPaths) {\n if (path === ancestorPath || path.startsWith(`${ancestorPath}${SLASH}`)) {\n return true;\n }\n }\n return false;\n}\n","import type { TConfigOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TEffectiveTree } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type {\n TGetRoleFromName,\n TTreeBuild,\n} from '../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport { createOutcome } from '../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { joinPosixPath } from './_utils/join-posix-path/index.js';\nimport { isPathInside } from './_utils/path-is-inside/index.js';\n\nexport function buildTreeContext(\n tree: TEffectiveTree,\n treeIndex: number,\n getRoleFromName: TGetRoleFromName,\n selection: {\n readonly foreignDomainPaths: ReadonlySet<string>;\n readonly foreignNodePaths: ReadonlySet<string>;\n }\n): TTreeBuild {\n const outcomes: TConfigOutcome[] = [];\n const foreignDomainPaths = new Set(selection.foreignDomainPaths);\n if (foreignDomainPaths.has(tree.originPath)) {\n foreignDomainPaths.delete(tree.originPath);\n outcomes.push(\n createOutcome('configuration/incompatible-foreign-origin', {\n element: tree.originPath,\n propertyPath: `trees[${treeIndex}].foreignDomains`,\n })\n );\n }\n\n const rootFragmentPropertyPaths = new Map<string, string>();\n const rootNodePropertyPaths = new Map<string, string>();\n const rootNodePaths = new Set<string>();\n\n const indexFragments = (\n fragments: TEffectiveTree['rootFragments'],\n propertyPath: string\n ): void => {\n for (const [index, fragment] of fragments.entries()) {\n const fragmentPropertyPath = `${propertyPath}[${index}]`;\n rootFragmentPropertyPaths.set(fragment.path, fragmentPropertyPath);\n for (const node of fragment.rootNodes) {\n const nodePath = joinPosixPath(fragment.path, node.name);\n rootNodePaths.add(nodePath);\n rootNodePropertyPaths.set(\n nodePath,\n `${fragmentPropertyPath}.rootNodes`\n );\n }\n indexFragments(\n fragment.subRootFragments,\n `${fragmentPropertyPath}.subRootFragments`\n );\n }\n };\n\n indexFragments(tree.rootFragments, `trees[${treeIndex}].rootFragments`);\n\n for (const [fragmentPath, propertyPath] of rootFragmentPropertyPaths) {\n if (isPathInside(fragmentPath, selection.foreignDomainPaths)) {\n outcomes.push(\n createOutcome('configuration/incompatible-root-in-foreign-domain', {\n element: fragmentPath,\n propertyPath,\n })\n );\n }\n }\n\n const seenMimeticPaths = new Set<string>();\n const mimeticPaths = new Set<string>();\n const mimeticPropertyPaths = new Map<string, string>();\n for (const [\n structureIndex,\n structure,\n ] of tree.mimeticPathStructures.entries()) {\n for (const [pathIndex, mimeticPath] of structure.paths.entries()) {\n const propertyPath = `trees[${treeIndex}].mimeticPathStructures[${structureIndex}].paths[${pathIndex}]`;\n if (seenMimeticPaths.has(mimeticPath)) {\n outcomes.push(\n createOutcome('configuration/duplicate-mimetic-path', {\n element: mimeticPath,\n propertyPath,\n })\n );\n mimeticPaths.delete(mimeticPath);\n mimeticPropertyPaths.delete(mimeticPath);\n } else {\n seenMimeticPaths.add(mimeticPath);\n mimeticPaths.add(mimeticPath);\n mimeticPropertyPaths.set(mimeticPath, propertyPath);\n }\n }\n }\n\n return {\n context: {\n catalog: tree.catalog,\n foreignDomainPaths,\n foreignNodePaths: selection.foreignNodePaths,\n getRoleFromName,\n mimeticPaths,\n originKind: tree.originKind,\n originPath: tree.originPath,\n rootFragmentPaths: new Set(rootFragmentPropertyPaths.keys()),\n rootNodePaths,\n },\n mimeticPropertyPaths,\n outcomes,\n rootFragmentPropertyPaths,\n rootNodePropertyPaths,\n };\n}\n","import type { TDirectoryClassification } from '../../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nexport function createDirectoryBase(\n parentFragmentPath: null | string\n): TDirectoryClassification {\n return {\n domainKind: null,\n form: null,\n imposedRoleName: null,\n isMimeticContext: false,\n isPathFragment: false,\n isPrivateCategory: false,\n isSubFragment: false,\n isSubLayer: false,\n parentFragmentPath,\n };\n}\n","import type {\n TDirectoryClassification,\n TDirectoryParent,\n TTreeClassificationContext,\n} from '../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n SHARED_SUFFIX,\n UNDERSCORE,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { createDirectoryBase } from '../../_classify-directory@shared/_utils/create-directory-base/index.js';\n\nexport function resolveDeclaredDirectory(\n path: string,\n parent: TDirectoryParent,\n context: TTreeClassificationContext\n): null | TDirectoryClassification {\n const enclosedFragmentPath =\n parent.domainKind === 'fragment' ? parent.path : parent.parentFragmentPath;\n const isForeign =\n context.foreignDomainPaths.has(path) ||\n parent.domainKind === 'foreign-domain';\n if (isForeign) {\n return {\n ...createDirectoryBase(enclosedFragmentPath),\n domainKind: 'foreign-domain',\n };\n }\n\n if (context.rootFragmentPaths.has(path)) {\n return {\n ...createDirectoryBase(null),\n domainKind: 'root-fragment',\n };\n }\n\n const name = readPathName(path);\n const isReservedBranch =\n name.startsWith(UNDERSCORE) && name.endsWith(SHARED_SUFFIX);\n if (!isReservedBranch) {\n return null;\n }\n\n const parentName = readPathName(parent.path);\n const scope = parentName.startsWith(UNDERSCORE)\n ? parentName.slice(1)\n : parentName;\n if (name !== `${UNDERSCORE}${scope}${SHARED_SUFFIX}`) {\n return createDirectoryBase(enclosedFragmentPath);\n }\n return {\n ...createDirectoryBase(enclosedFragmentPath),\n domainKind: 'fractal-branch',\n };\n}\n","import type {\n TDirectoryClassification,\n TDirectoryParent,\n TTreeClassificationContext,\n} from '../../../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n DOMAIN_CATEGORY,\n DOMAIN_FRAGMENT,\n DOMAIN_ROOT_FRAGMENT,\n FORM_FRAGMENTS,\n} from '../../../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { createDirectoryBase } from '../../../../_classify-directory@shared/_utils/create-directory-base/index.js';\n\nexport function resolveCatalogCategory(\n path: string,\n parent: TDirectoryParent,\n context: TTreeClassificationContext\n): null | TDirectoryClassification {\n const categoryRole = context.catalog.categoryToRole.get(readPathName(path));\n if (categoryRole === undefined) {\n return null;\n }\n const enclosedFragmentPath =\n parent.domainKind === DOMAIN_FRAGMENT\n ? parent.path\n : parent.parentFragmentPath;\n const isPrivateCategory =\n parent.domainKind === DOMAIN_FRAGMENT ||\n parent.domainKind === DOMAIN_ROOT_FRAGMENT;\n const isMimeticContext =\n categoryRole.form === FORM_FRAGMENTS && context.mimeticPaths.has(path);\n return {\n ...createDirectoryBase(enclosedFragmentPath),\n domainKind: DOMAIN_CATEGORY,\n form: categoryRole.form,\n imposedRoleName: categoryRole.name,\n isMimeticContext,\n isPrivateCategory,\n };\n}\n","import type {\n TDirectoryClassification,\n TDirectoryParent,\n} from '../../../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n DOMAIN_FRAGMENT,\n DOMAIN_PATH_SUB_CATEGORY,\n FORM_FRAGMENTS,\n UNDERSCORE,\n} from '../../../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { createDirectoryBase } from '../../../../_classify-directory@shared/_utils/create-directory-base/index.js';\n\nexport function resolveFragmentChild(\n path: string,\n parent: TDirectoryParent\n): null | TDirectoryClassification {\n if (\n readPathName(path).startsWith(UNDERSCORE) ||\n parent.form !== FORM_FRAGMENTS\n ) {\n return null;\n }\n return {\n ...createDirectoryBase(parent.parentFragmentPath),\n domainKind: DOMAIN_FRAGMENT,\n imposedRoleName: parent.imposedRoleName,\n isPathFragment:\n parent.domainKind === DOMAIN_PATH_SUB_CATEGORY || parent.isMimeticContext,\n isSubFragment: parent.parentFragmentPath !== null,\n };\n}\n","import type {\n TDirectoryClassification,\n TDirectoryParent,\n} from '../../../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n DOMAIN_FRACTAL_BRANCH,\n DOMAIN_LAYER,\n DOMAIN_ROOT_LAYER,\n UNDERSCORE,\n} from '../../../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { createDirectoryBase } from '../../../../_classify-directory@shared/_utils/create-directory-base/index.js';\n\nexport function resolveLayerChild(\n path: string,\n parent: TDirectoryParent\n): null | TDirectoryClassification {\n if (!readPathName(path).startsWith(UNDERSCORE)) {\n return null;\n }\n const isAdmitsLayers =\n parent.domainKind === DOMAIN_FRACTAL_BRANCH ||\n parent.domainKind === DOMAIN_LAYER ||\n parent.domainKind === DOMAIN_ROOT_LAYER;\n if (!isAdmitsLayers) {\n return null;\n }\n return {\n ...createDirectoryBase(parent.parentFragmentPath),\n domainKind: DOMAIN_LAYER,\n isSubLayer: parent.domainKind === DOMAIN_LAYER,\n };\n}\n","import type {\n TDirectoryClassification,\n TDirectoryParent,\n} from '../../../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n DOMAIN_PATH_SUB_CATEGORY,\n UNDERSCORE,\n} from '../../../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { createDirectoryBase } from '../../../../_classify-directory@shared/_utils/create-directory-base/index.js';\n\nexport function resolveMimeticChild(\n path: string,\n parent: TDirectoryParent\n): null | TDirectoryClassification {\n const name = readPathName(path);\n if (!parent.isMimeticContext || !name.startsWith(UNDERSCORE)) {\n return null;\n }\n return {\n ...createDirectoryBase(parent.parentFragmentPath),\n domainKind: DOMAIN_PATH_SUB_CATEGORY,\n form: parent.form,\n imposedRoleName: parent.imposedRoleName,\n isMimeticContext: true,\n };\n}\n","import type {\n TDirectoryClassification,\n TDirectoryParent,\n} from '../../../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n DOMAIN_CATEGORY,\n DOMAIN_SUB_CATEGORY,\n UNDERSCORE,\n} from '../../../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { createDirectoryBase } from '../../../../_classify-directory@shared/_utils/create-directory-base/index.js';\n\nexport function resolveSubCategoryChild(\n path: string,\n parent: TDirectoryParent\n): null | TDirectoryClassification {\n if (!readPathName(path).startsWith(UNDERSCORE) || parent.isMimeticContext) {\n return null;\n }\n const isAdmitsSubCategories =\n parent.domainKind === DOMAIN_CATEGORY ||\n parent.domainKind === DOMAIN_SUB_CATEGORY;\n if (!isAdmitsSubCategories) {\n return null;\n }\n return {\n ...createDirectoryBase(parent.parentFragmentPath),\n domainKind: DOMAIN_SUB_CATEGORY,\n form: parent.form,\n imposedRoleName: parent.imposedRoleName,\n };\n}\n","import type {\n TDirectoryClassification,\n TDirectoryParent,\n TTreeClassificationContext,\n} from '../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport { resolveCatalogCategory } from './_utils/resolve-catalog-category/index.js';\nimport { resolveFragmentChild } from './_utils/resolve-fragment-child/index.js';\nimport { resolveLayerChild } from './_utils/resolve-layer-child/index.js';\nimport { resolveMimeticChild } from './_utils/resolve-mimetic-child/index.js';\nimport { resolveSubCategoryChild } from './_utils/resolve-sub-category-child/index.js';\n\nexport function resolveStructuralDirectory(\n path: string,\n parent: TDirectoryParent,\n context: TTreeClassificationContext\n): null | TDirectoryClassification {\n const mimeticChild = resolveMimeticChild(path, parent);\n if (mimeticChild !== null) {\n return mimeticChild;\n }\n const category = resolveCatalogCategory(path, parent, context);\n if (category !== null) {\n return category;\n }\n const fragment = resolveFragmentChild(path, parent);\n if (fragment !== null) {\n return fragment;\n }\n const layer = resolveLayerChild(path, parent);\n return layer ?? resolveSubCategoryChild(path, parent);\n}\n","import type {\n TDirectoryParent,\n TTreeClassificationContext,\n} from '../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\nimport type { TDirectoryClassification } from './classify-directory.type.js';\n\nimport { createDirectoryBase } from './_classify-directory@shared/_utils/create-directory-base/index.js';\nimport { resolveDeclaredDirectory } from './_utils/resolve-declared-directory/index.js';\nimport { resolveStructuralDirectory } from './_utils/resolve-structural-directory/index.js';\n\nexport function classifyDirectory(\n path: string,\n parent: TDirectoryParent,\n context: TTreeClassificationContext\n): TDirectoryClassification {\n const declared = resolveDeclaredDirectory(path, parent, context);\n if (declared !== null) {\n return declared;\n }\n const structural = resolveStructuralDirectory(path, parent, context);\n if (structural !== null) {\n return structural;\n }\n if (parent.domainKind === 'fragment') {\n return createDirectoryBase(parent.path);\n }\n return createDirectoryBase(parent.parentFragmentPath);\n}\n","import type {\n TNodeKind,\n TRoleAttribution,\n} from '../../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TFileClassification } from '../../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nexport function blankFileFields(\n nodeKind: null | TNodeKind,\n role: TRoleAttribution,\n imposedRoleName: null | string,\n fragmentInternalRank: null | number,\n parentFragmentPath: null | string\n): TFileClassification['fields'] {\n return {\n domainKind: null,\n form: null,\n fragmentInternalRank,\n imposedRoleName,\n isPathFragment: false,\n isPrivateCategory: false,\n isSubFragment: false,\n isSubLayer: false,\n nodeKind,\n parentFragmentPath,\n role,\n };\n}\n","import type {\n TDirectoryParent,\n TFileClassification,\n TTreeClassificationContext,\n} from '../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n DOMAIN_CATEGORY,\n DOMAIN_SUB_CATEGORY,\n FORM_CATEGORY_NODES,\n NODE_CATEGORY,\n NODE_UNAUTHORIZED,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { blankFileFields } from '../../_classify-file@shared/_utils/blank-file-fields/index.js';\n\nexport function classifyCategoryFile(\n path: string,\n parent: TDirectoryParent,\n context: TTreeClassificationContext,\n parentFragmentPath: null | string\n): TFileClassification {\n const role = context.getRoleFromName(readPathName(path), context.catalog);\n const isCategoryContainer =\n parent.form === FORM_CATEGORY_NODES &&\n (parent.domainKind === DOMAIN_CATEGORY ||\n parent.domainKind === DOMAIN_SUB_CATEGORY);\n const isRoleMatches = role.roleName === parent.imposedRoleName;\n const nodeKind =\n isCategoryContainer && isRoleMatches ? NODE_CATEGORY : NODE_UNAUTHORIZED;\n return {\n conflict: null,\n fields: blankFileFields(\n nodeKind,\n role,\n parent.imposedRoleName,\n null,\n parentFragmentPath\n ),\n };\n}\n","import type {\n TFileClassification,\n TTreeClassificationContext,\n} from '../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n ABSENT_ROLE,\n NODE_FOREIGN,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { blankFileFields } from '../../_classify-file@shared/_utils/blank-file-fields/index.js';\n\nexport function classifyDesignatedFile(\n path: string,\n context: TTreeClassificationContext,\n parentFragmentPath: null | string\n): null | TFileClassification {\n const isDesignatedForeign = context.foreignNodePaths.has(path);\n const isDesignatedRoot = context.rootNodePaths.has(path);\n if (isDesignatedRoot && isDesignatedForeign) {\n return {\n conflict: 'contradictory-root-foreign',\n fields: blankFileFields(\n null,\n ABSENT_ROLE,\n null,\n null,\n parentFragmentPath\n ),\n };\n }\n if (!isDesignatedForeign) {\n return null;\n }\n return {\n conflict: null,\n fields: blankFileFields(\n NODE_FOREIGN,\n ABSENT_ROLE,\n null,\n null,\n parentFragmentPath\n ),\n };\n}\n","import { DOT_PATH } from '../../../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\n\nexport function fileStem(fileName: string): string {\n const dotIndex = fileName.indexOf(DOT_PATH);\n return dotIndex <= 0 ? fileName : fileName.slice(0, dotIndex);\n}\n","import type {\n TDirectoryParent,\n TFileClassification,\n TTreeClassificationContext,\n} from '../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n ABSENT_ROLE,\n ABSENT_ROLE_KIND,\n ACCESS_NODE_FILE_NAME,\n NODE_ACCESS,\n NODE_FRAGMENT,\n NODE_SUB_GRAPH,\n NODE_UNAUTHORIZED,\n ROLE_EXPLICIT,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { blankFileFields } from '../../_classify-file@shared/_utils/blank-file-fields/index.js';\nimport { fileStem } from './_utils/file-stem/index.js';\n\nexport function classifyFragmentFile(\n fileName: string,\n parent: TDirectoryParent,\n context: TTreeClassificationContext,\n parentFragmentPath: null | string\n): TFileClassification {\n const role = context.getRoleFromName(fileName, context.catalog);\n const isNameMatches = fileStem(fileName) === readPathName(parent.path);\n if (fileName === ACCESS_NODE_FILE_NAME && role.kind === ABSENT_ROLE_KIND) {\n return {\n conflict: null,\n fields: blankFileFields(\n NODE_ACCESS,\n ABSENT_ROLE,\n parent.imposedRoleName,\n context.catalog.topRank,\n parentFragmentPath\n ),\n };\n }\n const isSubGraph =\n isNameMatches &&\n role.kind === ROLE_EXPLICIT &&\n context.catalog.subGraphRoles.some((name) => name === role.roleName);\n if (isSubGraph) {\n return {\n conflict: null,\n fields: blankFileFields(\n NODE_SUB_GRAPH,\n role,\n parent.imposedRoleName,\n context.catalog.topRank,\n parentFragmentPath\n ),\n };\n }\n if (isNameMatches && role.kind === ROLE_EXPLICIT) {\n let rank: null | number = null;\n for (const candidate of context.catalog.roles) {\n if (candidate.name === role.roleName) {\n rank = candidate.rank;\n }\n }\n return {\n conflict: null,\n fields: blankFileFields(\n NODE_FRAGMENT,\n role,\n parent.imposedRoleName,\n rank,\n parentFragmentPath\n ),\n };\n }\n return {\n conflict: null,\n fields: blankFileFields(\n NODE_UNAUTHORIZED,\n role,\n parent.imposedRoleName,\n null,\n parentFragmentPath\n ),\n };\n}\n","import type { TFileClassification } from '../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n ABSENT_ROLE,\n NODE_ROOT,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { blankFileFields } from '../../_classify-file@shared/_utils/blank-file-fields/index.js';\n\nexport function classifyRootFragmentFile(\n path: string,\n rootNodePaths: ReadonlySet<string>,\n parentFragmentPath: null | string\n): TFileClassification {\n if (rootNodePaths.has(path)) {\n return {\n conflict: null,\n fields: blankFileFields(\n NODE_ROOT,\n ABSENT_ROLE,\n null,\n null,\n parentFragmentPath\n ),\n };\n }\n return {\n conflict: 'unenumerated-root-file',\n fields: blankFileFields(null, ABSENT_ROLE, null, null, parentFragmentPath),\n };\n}\n","import type {\n TDirectoryParent,\n TTreeClassificationContext,\n} from '../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\nimport type { TFileClassification } from './classify-file.type.js';\n\nimport {\n ABSENT_ROLE,\n DOMAIN_FRAGMENT,\n DOMAIN_ROOT_FRAGMENT,\n} from '../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { blankFileFields } from './_classify-file@shared/_utils/blank-file-fields/index.js';\nimport { classifyCategoryFile } from './_utils/classify-category-file/index.js';\nimport { classifyDesignatedFile } from './_utils/classify-designated-file/index.js';\nimport { classifyFragmentFile } from './_utils/classify-fragment-file/index.js';\nimport { classifyRootFragmentFile } from './_utils/classify-root-fragment-file/index.js';\n\nexport function classifyFile(\n path: string,\n parent: TDirectoryParent,\n context: TTreeClassificationContext\n): TFileClassification {\n const parentFragmentPath =\n parent.domainKind === DOMAIN_FRAGMENT\n ? parent.path\n : parent.parentFragmentPath;\n const designated = classifyDesignatedFile(path, context, parentFragmentPath);\n if (designated !== null) {\n return designated;\n }\n if (parent.domainKind === null) {\n return {\n conflict: null,\n fields: blankFileFields(\n null,\n ABSENT_ROLE,\n null,\n null,\n parentFragmentPath\n ),\n };\n }\n if (parent.domainKind === DOMAIN_ROOT_FRAGMENT) {\n return classifyRootFragmentFile(\n path,\n context.rootNodePaths,\n parentFragmentPath\n );\n }\n if (parent.domainKind === DOMAIN_FRAGMENT) {\n return classifyFragmentFile(\n readPathName(path),\n parent,\n context,\n parentFragmentPath\n );\n }\n return classifyCategoryFile(path, parent, context, parentFragmentPath);\n}\n","import type { TClassificationDraft } from '../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n NODE_FRAGMENT,\n ROLE_EXPLICIT,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\n\nexport function collectMasterIds(\n drafts: ReadonlyMap<number, TClassificationDraft>,\n childrenByParentId: ReadonlyMap<number, readonly number[]>\n): ReadonlySet<number> {\n const masterIds = new Set<number>();\n for (const draft of drafts.values()) {\n const childIds = childrenByParentId.get(draft.itemId);\n if (childIds === undefined || draft.domainKind !== 'fragment') {\n continue;\n }\n const matches = childIds.filter((childId) => {\n const child = drafts.get(childId);\n return (\n child !== undefined &&\n child.role.kind === ROLE_EXPLICIT &&\n child.nodeKind === NODE_FRAGMENT &&\n child.role.roleName === draft.imposedRoleName\n );\n });\n if (matches.length === 1) {\n for (const onlyMatch of matches) {\n masterIds.add(onlyMatch);\n }\n }\n }\n return masterIds;\n}\n","import type { TClassificationDraft } from '../../../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport {\n DOMAIN_CATEGORY,\n DOMAIN_SUB_CATEGORY,\n FORM_FRAGMENTS,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\n\nexport function collectParentCategoryIds(\n drafts: ReadonlyMap<number, TClassificationDraft>,\n childrenByParentId: ReadonlyMap<number, readonly number[]>,\n mimeticPaths: ReadonlySet<string>\n): ReadonlySet<number> {\n const parentCategoryIds = new Set<number>();\n for (const draft of drafts.values()) {\n if (draft.domainKind !== DOMAIN_CATEGORY) {\n continue;\n }\n const isMimeticParent =\n draft.form === FORM_FRAGMENTS && mimeticPaths.has(draft.path);\n const childIds = childrenByParentId.get(draft.itemId);\n const hasSubCategory =\n childIds !== undefined &&\n childIds.some((childId) => {\n const child = drafts.get(childId);\n return child !== undefined && child.domainKind === DOMAIN_SUB_CATEGORY;\n });\n if (isMimeticParent || hasSubCategory) {\n parentCategoryIds.add(draft.itemId);\n }\n }\n return parentCategoryIds;\n}\n","import type { TItemClassification } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TClassificationDraft } from '../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport { NODE_MASTER } from '../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { collectMasterIds } from './_utils/collect-master-ids/index.js';\nimport { collectParentCategoryIds } from './_utils/collect-parent-category-ids/index.js';\n\nexport function finalizeClassifications(\n drafts: ReadonlyMap<number, TClassificationDraft>,\n childrenByParentId: ReadonlyMap<number, readonly number[]>,\n mimeticPaths: ReadonlySet<string>\n): readonly TItemClassification[] {\n const masterIds = collectMasterIds(drafts, childrenByParentId);\n const parentCategoryIds = collectParentCategoryIds(\n drafts,\n childrenByParentId,\n mimeticPaths\n );\n const classifications: TItemClassification[] = [];\n for (const draft of drafts.values()) {\n const nodeKind = masterIds.has(draft.itemId) ? NODE_MASTER : draft.nodeKind;\n classifications.push({\n domainKind: draft.domainKind,\n entryKind: draft.entryKind,\n fragmentInternalRank: draft.fragmentInternalRank,\n imposedRoleName: draft.imposedRoleName,\n itemId: draft.itemId,\n nodeKind,\n path: draft.path,\n relationalQualifications: {\n isParentCategory: parentCategoryIds.has(draft.itemId),\n isPathFragment: draft.isPathFragment,\n isPrivateCategory: draft.isPrivateCategory,\n isSubFragment: draft.isSubFragment,\n isSubLayer: draft.isSubLayer,\n parentFragmentPath: draft.parentFragmentPath,\n },\n role: draft.role,\n });\n }\n classifications.sort((left, right) => left.itemId - right.itemId);\n return classifications;\n}\n","import type { TRoleAttribution } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nexport const ABSENT_ROLE_ATTRIBUTION: TRoleAttribution = {\n kind: 'absent',\n roleName: null,\n};\n\nexport const DOT = '.';\n","import type { TRoleAttribution } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveCatalog } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nimport { ABSENT_ROLE_ATTRIBUTION, DOT } from './get-role-from-name.constant.js';\n\nexport function getRoleFromName(\n fileName: string,\n catalog: TEffectiveCatalog\n): TRoleAttribution {\n const firstDotIndex = fileName.indexOf(DOT);\n if (firstDotIndex <= 0) {\n return ABSENT_ROLE_ATTRIBUTION;\n }\n\n const possibleImplicitExtension = fileName.slice(firstDotIndex);\n const implicitRole = catalog.extensionToRole.get(possibleImplicitExtension);\n if (implicitRole !== undefined) {\n return {\n kind: 'implicit',\n roleName: implicitRole.name,\n };\n }\n\n const afterName = fileName.slice(firstDotIndex + 1);\n const roleDotIndex = afterName.indexOf(DOT);\n if (roleDotIndex === -1) {\n return ABSENT_ROLE_ATTRIBUTION;\n }\n\n const roleCandidate = afterName.slice(0, roleDotIndex);\n const isRole =\n catalog.subGraphRoles.includes(roleCandidate) ||\n catalog.roles.some((role) => role.name === roleCandidate);\n\n if (!isRole) {\n return ABSENT_ROLE_ATTRIBUTION;\n }\n\n const extensionWithDot = afterName.slice(roleDotIndex);\n const extensionWithoutDot = afterName.slice(roleDotIndex + 1);\n\n const isSingleFinalSegment =\n extensionWithoutDot.length > 0 && !extensionWithoutDot.includes(DOT);\n\n const isImplicitExtensionSequence =\n catalog.extensionToRole.has(extensionWithDot);\n\n if (isSingleFinalSegment || isImplicitExtensionSequence) {\n return {\n kind: 'explicit',\n roleName: roleCandidate,\n };\n }\n\n return ABSENT_ROLE_ATTRIBUTION;\n}\n","import type { TInventoryItem } from '../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nexport function isDescendantOrSelf(\n candidate: TInventoryItem,\n ancestor: TInventoryItem\n): boolean {\n return (\n ancestor.preorderStart <= candidate.preorderStart &&\n candidate.preorderEnd <= ancestor.preorderEnd\n );\n}\n","import type { TInventoryItem } from '../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { isDescendantOrSelf } from '../../../../_select-foreign-nodes@shared/_utils/is-descendant-or-self/index.js';\n\nexport function appendDomainItems(\n domainItem: TInventoryItem,\n treeItems: readonly TInventoryItem[],\n domainItemIds: Set<number>,\n domainPaths: Set<string>,\n nodeItemIds: Set<number>,\n nodePaths: Set<string>\n): void {\n for (const item of treeItems) {\n if (!isDescendantOrSelf(item, domainItem)) {\n continue;\n }\n if (item.kind === 'directory') {\n domainItemIds.add(item.id);\n domainPaths.add(item.path);\n } else {\n nodeItemIds.add(item.id);\n nodePaths.add(item.path);\n }\n }\n}\n","import type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TCollectedForeignDomains } from './collect-foreign-domains.type.js';\n\nimport { isDescendantOrSelf } from '../../_select-foreign-nodes@shared/_utils/is-descendant-or-self/index.js';\nimport { appendDomainItems } from './_utils/append-domain-items/index.js';\n\nexport function collectForeignDomains(\n inventory: TInventory,\n treeItems: readonly TInventoryItem[],\n originItem: TInventoryItem,\n foreignDomains: readonly string[]\n): TCollectedForeignDomains {\n const domainItemIds = new Set<number>();\n const domainPaths = new Set<string>();\n const nodeItemIds = new Set<number>();\n const nodePaths = new Set<string>();\n\n for (const domainPath of foreignDomains) {\n const domainItemId = inventory.pathToId.get(domainPath);\n const domainItem =\n domainItemId === undefined ? undefined : inventory.items[domainItemId];\n if (\n domainItem !== undefined &&\n domainItem.kind === 'directory' &&\n isDescendantOrSelf(domainItem, originItem)\n ) {\n appendDomainItems(\n domainItem,\n treeItems,\n domainItemIds,\n domainPaths,\n nodeItemIds,\n nodePaths\n );\n }\n }\n\n return { domainItemIds, domainPaths, nodeItemIds, nodePaths };\n}\n","import type { TInventoryItem } from '../../../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TForeignPatternMatcher } from '../../../../../../../../../../_verify-project@shared/_utils/compile-foreign-pattern/index.js';\n\nimport {\n DOT_PATH,\n SLASH,\n} from '../../../../../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { isDescendantOrSelf } from '../../../../../../_select-foreign-nodes@shared/_utils/is-descendant-or-self/index.js';\n\nexport function recordScopeMatches(\n treeItems: readonly TInventoryItem[],\n scopeItem: TInventoryItem,\n scopePath: string,\n matchers: readonly TForeignPatternMatcher[],\n nodeItemIds: Set<number>,\n nodePaths: Set<string>\n): void {\n for (const item of treeItems) {\n const prefix = `${scopePath}${SLASH}`;\n const prefixedPath = item.path.startsWith(prefix)\n ? item.path.slice(prefix.length)\n : null;\n const relativePath = scopePath === DOT_PATH ? item.path : prefixedPath;\n if (\n relativePath === null ||\n item.kind !== 'file' ||\n !isDescendantOrSelf(item, scopeItem) ||\n matchers.every((matcher) => !matcher(relativePath))\n ) {\n continue;\n }\n nodeItemIds.add(item.id);\n nodePaths.add(item.path);\n }\n}\n","import type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TForeignPatternMatcher } from '../../../../../../../../_verify-project@shared/_utils/compile-foreign-pattern/index.js';\n\nimport { assertInvariant } from '../../../../../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { isDescendantOrSelf } from '../../../../_select-foreign-nodes@shared/_utils/is-descendant-or-self/index.js';\nimport { recordScopeMatches } from './_utils/record-scope-matches/index.js';\n\nexport function collectFamilyMatches(\n inventory: TInventory,\n treeItems: readonly TInventoryItem[],\n originItem: TInventoryItem,\n scopePaths: readonly string[],\n matchers: readonly TForeignPatternMatcher[],\n nodeItemIds: Set<number>,\n nodePaths: Set<string>\n): void {\n for (const scopePath of scopePaths) {\n const scopeItemId = inventory.pathToId.get(scopePath);\n if (scopeItemId === undefined) {\n continue;\n }\n const scopeItem = inventory.items[scopeItemId];\n assertInvariant(scopeItem !== undefined, 'scope id is indexed');\n if (isDescendantOrSelf(scopeItem, originItem)) {\n recordScopeMatches(\n treeItems,\n scopeItem,\n scopePath,\n matchers,\n nodeItemIds,\n nodePaths\n );\n }\n }\n}\n","import type { TForeignPatternMatcher } from '../../../../../../../../_verify-project@shared/_utils/compile-foreign-pattern/index.js';\n\nimport { compileForeignPattern } from '../../../../../../../../_verify-project@shared/_utils/compile-foreign-pattern/index.js';\n\nexport function compileFamilyMatchers(\n patterns: readonly string[]\n): readonly TForeignPatternMatcher[] {\n const matchers: TForeignPatternMatcher[] = [];\n for (const pattern of patterns) {\n const compiled = compileForeignPattern(pattern);\n if (compiled.ok) {\n matchers.push(compiled.matcher);\n }\n }\n return matchers;\n}\n","import type { TEffectiveForeignFamily } from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TCollectedForeignFamilies } from './collect-foreign-families.type.js';\n\nimport { collectFamilyMatches } from './_utils/collect-family-matches/index.js';\nimport { compileFamilyMatchers } from './_utils/compile-family-matchers/index.js';\n\nexport function collectForeignFamilies(\n inventory: TInventory,\n treeItems: readonly TInventoryItem[],\n originItem: TInventoryItem,\n families: readonly TEffectiveForeignFamily[]\n): TCollectedForeignFamilies {\n const nodeItemIds = new Set<number>();\n const nodePaths = new Set<string>();\n\n for (const family of families) {\n collectFamilyMatches(\n inventory,\n treeItems,\n originItem,\n family.paths,\n compileFamilyMatchers(family.patterns),\n nodeItemIds,\n nodePaths\n );\n }\n\n return { nodeItemIds, nodePaths };\n}\n","import type {\n TInventory,\n TInventoryItem,\n} from '../../../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TCollectedIndividualForeignNodes } from './collect-individual-foreign-nodes.type.js';\n\nimport { isDescendantOrSelf } from '../../_select-foreign-nodes@shared/_utils/is-descendant-or-self/index.js';\n\nexport function collectIndividualForeignNodes(\n inventory: TInventory,\n originItem: TInventoryItem,\n individualPaths: readonly string[]\n): TCollectedIndividualForeignNodes {\n const nodeItemIds = new Set<number>();\n const nodePaths = new Set<string>();\n\n for (const filePath of individualPaths) {\n const fileItemId = inventory.pathToId.get(filePath);\n const fileItem =\n fileItemId === undefined ? undefined : inventory.items[fileItemId];\n if (\n !(\n fileItem !== undefined &&\n fileItem.kind === 'file' &&\n isDescendantOrSelf(fileItem, originItem)\n )\n ) {\n continue;\n }\n\n nodeItemIds.add(fileItem.id);\n nodePaths.add(fileItem.path);\n }\n\n return { nodeItemIds, nodePaths };\n}\n","export const EMPTY_FOREIGN_SELECTION = {\n foreignDomainItemIds: new Set<number>(),\n foreignDomainPaths: new Set<string>(),\n foreignNodeItemIds: new Set<number>(),\n foreignNodePaths: new Set<string>(),\n};\n","import type { TEffectiveTree } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type { TForeignSelection } from './select-foreign-nodes.type.js';\n\nimport { assertInvariant } from '../../../../_verify-project@shared/_utils/assert-invariant/index.js';\nimport { collectForeignDomains } from './_utils/collect-foreign-domains/index.js';\nimport { collectForeignFamilies } from './_utils/collect-foreign-families/index.js';\nimport { collectIndividualForeignNodes } from './_utils/collect-individual-foreign-nodes/index.js';\nimport { EMPTY_FOREIGN_SELECTION } from './select-foreign-nodes.constant.js';\n\nexport function selectForeignNodes(\n inventory: TInventory,\n tree: TEffectiveTree\n): TForeignSelection {\n const originItemId = inventory.pathToId.get(tree.originPath);\n if (originItemId === undefined) {\n return EMPTY_FOREIGN_SELECTION;\n }\n const originItem = inventory.items[originItemId];\n assertInvariant(originItem !== undefined, 'origin id is indexed');\n if (originItem.kind !== 'directory') {\n return EMPTY_FOREIGN_SELECTION;\n }\n\n const domains = collectForeignDomains(\n inventory,\n inventory.items,\n originItem,\n tree.foreignDomains\n );\n const individuals = collectIndividualForeignNodes(\n inventory,\n originItem,\n tree.foreignNodes.individualPaths\n );\n const families = collectForeignFamilies(\n inventory,\n inventory.items,\n originItem,\n tree.foreignNodes.families\n );\n\n return {\n foreignDomainItemIds: domains.domainItemIds,\n foreignDomainPaths: domains.domainPaths,\n foreignNodeItemIds: new Set([\n ...domains.nodeItemIds,\n ...individuals.nodeItemIds,\n ...families.nodeItemIds,\n ]),\n foreignNodePaths: new Set([\n ...domains.nodePaths,\n ...individuals.nodePaths,\n ...families.nodePaths,\n ]),\n };\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TItemClassification } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n NODE_ACCESS,\n NODE_FOREIGN,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\n\nexport function verifyExternalSources(\n byPath: ReadonlyMap<string, TItemClassification>,\n tree: TEffectiveTree,\n treeIndex: number\n): readonly TConfigOutcome[] {\n const outcomes: TConfigOutcome[] = [];\n for (const [pairIndex, pair] of tree.externalDependencyPairs.entries()) {\n const classification = byPath.get(pair.from);\n if (classification === undefined) {\n continue;\n }\n const isRejectedSource =\n classification.domainKind !== null ||\n classification.nodeKind === NODE_ACCESS ||\n classification.nodeKind === NODE_FOREIGN;\n if (isRejectedSource) {\n outcomes.push(\n createOutcome('configuration/invalid-external-dependency-source', {\n element: pair.from,\n propertyPath: `trees[${treeIndex}].externalDependencyPairs[${pairIndex}].from`,\n })\n );\n }\n }\n return outcomes;\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TItemClassification } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n DOMAIN_CATEGORY,\n FORM_FRAGMENTS,\n} from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { readPathName } from '../../../../_classify-taxonomy@shared/_utils/read-path-name/index.js';\n\nexport function verifyMimeticPaths(\n byPath: ReadonlyMap<string, TItemClassification>,\n tree: TEffectiveTree,\n mimeticPropertyPaths: ReadonlyMap<string, string>\n): readonly TConfigOutcome[] {\n const outcomes: TConfigOutcome[] = [];\n for (const [mimeticPath, propertyPath] of mimeticPropertyPaths) {\n const classification = byPath.get(mimeticPath);\n if (classification === undefined) {\n continue;\n }\n const role = tree.catalog.categoryToRole.get(readPathName(mimeticPath));\n const isValidParent =\n classification.domainKind === DOMAIN_CATEGORY &&\n role?.form === FORM_FRAGMENTS;\n if (!isValidParent) {\n outcomes.push(\n createOutcome('configuration/incompatible-mimetic-designation', {\n element: mimeticPath,\n propertyPath,\n })\n );\n }\n }\n return outcomes;\n}\n","import type { TConfigOutcome } from '../../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TItemClassification } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nimport { createOutcome } from '../../../../../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport { NODE_ROOT } from '../../../../_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\n\nexport function verifyPublicRootNodes(\n byPath: ReadonlyMap<string, TItemClassification>,\n tree: TEffectiveTree,\n treeIndex: number\n): readonly TConfigOutcome[] {\n const outcomes: TConfigOutcome[] = [];\n for (const [nodeIndex, nodePath] of tree.publicRootNodes.entries()) {\n const classification = byPath.get(nodePath);\n if (classification !== undefined && classification.nodeKind !== NODE_ROOT) {\n outcomes.push(\n createOutcome('configuration/invalid-public-root-node', {\n element: nodePath,\n propertyPath: `trees[${treeIndex}].publicRootNodes[${nodeIndex}]`,\n })\n );\n }\n }\n return outcomes;\n}\n","import type { TConfigOutcome } from '../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TItemClassification } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type { TTreeBuild } from '../../_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport { verifyExternalSources } from './_utils/verify-external-sources/index.js';\nimport { verifyMimeticPaths } from './_utils/verify-mimetic-paths/index.js';\nimport { verifyPublicRootNodes } from './_utils/verify-public-root-nodes/index.js';\n\nexport function verifyClassificationReferences(\n classifications: readonly TItemClassification[],\n tree: TEffectiveTree,\n treeIndex: number,\n treeBuild: TTreeBuild\n): readonly TConfigOutcome[] {\n const byPath = new Map(\n classifications.map((classification) => [\n classification.path,\n classification,\n ])\n );\n return [\n ...verifyMimeticPaths(byPath, tree, treeBuild.mimeticPropertyPaths),\n ...verifyExternalSources(byPath, tree, treeIndex),\n ...verifyPublicRootNodes(byPath, tree, treeIndex),\n ];\n}\n","import type { TConfigOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TItemClassification } from '../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TEffectiveTree } from '../../_verify-project@shared/_types/_primitives/declarations.type.js';\nimport type {\n TInventory,\n TInventoryItem,\n} from '../../_verify-project@shared/_types/_primitives/inventory.type.js';\nimport type {\n TClassificationDraft,\n TClassifyTaxonomyInput,\n TDirectoryParent,\n TTaxonomyClassification,\n} from './_classify-taxonomy@shared/_types/classify-taxonomy.type.js';\n\nimport { createOutcome } from '../../../../../../_conformity@shared/_utils/create-outcome/index.js';\nimport {\n ABSENT_ROLE,\n DOMAIN_FRAGMENT,\n UNDERSCORE,\n} from './_classify-taxonomy@shared/_constants/classification-constraints.constant.js';\nimport { compareConfigOutcomes } from './_classify-taxonomy@shared/_utils/compare-config-outcomes/index.js';\nimport { readPathName } from './_classify-taxonomy@shared/_utils/read-path-name/index.js';\nimport { buildTreeContext } from './_utils/build-tree-context/index.js';\nimport { classifyDirectory } from './_utils/classify-directory/index.js';\nimport { classifyFile } from './_utils/classify-file/index.js';\nimport { finalizeClassifications } from './_utils/finalize-classifications/index.js';\nimport { getRoleFromName } from './_utils/get-role-from-name/index.js';\nimport { selectForeignNodes } from './_utils/select-foreign-nodes/index.js';\nimport { verifyClassificationReferences } from './_utils/verify-classification-references/index.js';\n\nexport function classifyTaxonomy(\n input: TClassifyTaxonomyInput\n): TTaxonomyClassification {\n const classifications: TItemClassification[] = [];\n const outcomes: TConfigOutcome[] = [];\n\n const classifyOneTree = (\n inventory: TInventory,\n tree: TEffectiveTree,\n treeIndex: number\n ): void => {\n const originId = inventory.pathToId.get(tree.originPath);\n if (originId === undefined) {\n return;\n }\n const originItem = inventory.items[originId];\n if (originItem === undefined || originItem.kind !== 'directory') {\n return;\n }\n const selection = selectForeignNodes(inventory, tree);\n const treeBuild = buildTreeContext(\n tree,\n treeIndex,\n getRoleFromName,\n selection\n );\n outcomes.push(...treeBuild.outcomes);\n const drafts = new Map<number, TClassificationDraft>();\n const childrenByParentId = new Map<number, number[]>();\n drafts.set(originItem.id, {\n domainKind: tree.originKind,\n entryKind: originItem.kind,\n form: null,\n fragmentInternalRank: null,\n imposedRoleName: null,\n isPathFragment: false,\n isPrivateCategory: false,\n isSubFragment: false,\n isSubLayer: false,\n itemId: originItem.id,\n nodeKind: null,\n parentFragmentPath: null,\n path: originItem.path,\n role: ABSENT_ROLE,\n });\n\n const childrenOf = (parentId: number): readonly TInventoryItem[] =>\n inventory.items.filter((item) => item.parentId === parentId);\n\n const recordFile = (\n child: TInventoryItem,\n parent: TDirectoryParent\n ): void => {\n const classified = classifyFile(child.path, parent, treeBuild.context);\n if (classified.conflict !== null) {\n const isContradictory =\n classified.conflict === 'contradictory-root-foreign';\n const propertyPath = isContradictory\n ? (treeBuild.rootNodePropertyPaths.get(child.path) ??\n `trees[${treeIndex}].rootFragments`)\n : (treeBuild.rootFragmentPropertyPaths.get(parent.path) ??\n `trees[${treeIndex}].rootFragments`);\n outcomes.push(\n createOutcome(\n isContradictory\n ? 'configuration/contradictory-root-foreign'\n : 'configuration/unenumerated-root-file',\n {\n element: child.path,\n propertyPath,\n }\n )\n );\n }\n drafts.set(child.id, {\n ...classified.fields,\n entryKind: child.kind,\n itemId: child.id,\n path: child.path,\n });\n };\n\n const recordUndeclaredFrontier = (\n child: TInventoryItem,\n parent: TDirectoryParent\n ): void => {\n const fragmentPropertyPath = treeBuild.rootFragmentPropertyPaths.get(\n parent.path\n );\n const fragmentBase =\n fragmentPropertyPath ?? `trees[${treeIndex}].rootFragments`;\n const propertyPath = `${fragmentBase}.subRootFragments`;\n outcomes.push(\n createOutcome('configuration/undeclared-sub-root-fragment', {\n element: child.path,\n propertyPath,\n })\n );\n drafts.set(child.id, {\n domainKind: null,\n entryKind: child.kind,\n form: null,\n fragmentInternalRank: null,\n imposedRoleName: null,\n isPathFragment: false,\n isPrivateCategory: false,\n isSubFragment: false,\n isSubLayer: false,\n itemId: child.id,\n nodeKind: null,\n parentFragmentPath: parent.parentFragmentPath,\n path: child.path,\n role: ABSENT_ROLE,\n });\n };\n\n const visit = (item: TInventoryItem, parent: TDirectoryParent): void => {\n for (const child of childrenOf(item.id)) {\n const recordedIds = childrenByParentId.get(item.id);\n const siblingIds =\n recordedIds === undefined ? [child.id] : [...recordedIds, child.id];\n childrenByParentId.set(item.id, siblingIds);\n if (child.kind === 'file') {\n recordFile(child, parent);\n } else {\n const name = readPathName(child.path);\n const isUndeclaredFrontier =\n parent.domainKind === 'root-fragment' &&\n !name.startsWith(UNDERSCORE) &&\n !treeBuild.context.rootFragmentPaths.has(child.path) &&\n !treeBuild.context.foreignDomainPaths.has(child.path);\n if (isUndeclaredFrontier) {\n recordUndeclaredFrontier(child, parent);\n visit(child, {\n domainKind: null,\n form: null,\n imposedRoleName: null,\n isMimeticContext: false,\n parentFragmentPath: parent.parentFragmentPath,\n path: child.path,\n });\n } else {\n const classification = classifyDirectory(\n child.path,\n parent,\n treeBuild.context\n );\n drafts.set(child.id, {\n domainKind: classification.domainKind,\n entryKind: child.kind,\n form: classification.form,\n fragmentInternalRank: null,\n imposedRoleName: classification.imposedRoleName,\n isPathFragment: classification.isPathFragment,\n isPrivateCategory: classification.isPrivateCategory,\n isSubFragment: classification.isSubFragment,\n isSubLayer: classification.isSubLayer,\n itemId: child.id,\n nodeKind: null,\n parentFragmentPath: classification.parentFragmentPath,\n path: child.path,\n role: ABSENT_ROLE,\n });\n const nextFragmentPath =\n classification.domainKind === DOMAIN_FRAGMENT\n ? child.path\n : classification.parentFragmentPath;\n visit(child, {\n domainKind: classification.domainKind,\n form: classification.form,\n imposedRoleName: classification.imposedRoleName,\n isMimeticContext: classification.isMimeticContext,\n parentFragmentPath: nextFragmentPath,\n path: child.path,\n });\n }\n }\n }\n };\n\n visit(originItem, {\n domainKind: tree.originKind,\n form: null,\n imposedRoleName: null,\n isMimeticContext: false,\n parentFragmentPath: null,\n path: originItem.path,\n });\n const finalized = finalizeClassifications(\n drafts,\n childrenByParentId,\n treeBuild.context.mimeticPaths\n );\n classifications.push(...finalized);\n outcomes.push(\n ...verifyClassificationReferences(finalized, tree, treeIndex, treeBuild)\n );\n };\n\n for (const [treeIndex, tree] of input.declarations.trees.entries()) {\n classifyOneTree(input.inventory, tree, treeIndex);\n }\n\n outcomes.sort(compareConfigOutcomes);\n return {\n model: {\n byItemId: new Map(\n classifications.map((classification) => [\n classification.itemId,\n classification,\n ])\n ),\n byPath: new Map(\n classifications.map((classification) => [\n classification.path,\n classification,\n ])\n ),\n classifications,\n },\n outcomes,\n };\n}\n","import nodePath from 'node:path';\n\nimport type { TCollectExternalFilesInput } from './collect-external-files.type.js';\n\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function collectExternalFiles(\n input: TCollectExternalFilesInput\n): readonly string[] {\n const externalFilesSet = new Set<string>([\n nodePath.resolve(input.baseDirectory, 'package.json'),\n ]);\n\n for (const item of input.inventory.items) {\n if (item.kind === 'file' && item.treeOrigin === null) {\n externalFilesSet.add(nodePath.resolve(input.baseDirectory, item.path));\n }\n }\n\n for (const modulePath of input.modules.records.keys()) {\n const absolute = nodePath.resolve(input.baseDirectory, modulePath);\n const isUnderTree = input.treeOrigins.some(\n (origin) =>\n absolute === origin || absolute.startsWith(`${origin}${nodePath.sep}`)\n );\n if (!isUnderTree) {\n externalFilesSet.add(absolute);\n }\n }\n\n const externalFiles = [...externalFilesSet];\n externalFiles.sort(compareOrdinal);\n return externalFiles;\n}\n","import type { TDependencyGraph } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TExternalCrossing } from '../../../../_verify-project@shared/_types/_compounds/external-crossing.type.js';\nimport type {\n TCandidateCrossing,\n TDestinationEntry,\n TIndexedExternalSubgraph,\n} from '../../_derive-external-crossings@shared/_types/indexed-subgraph.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { compareSourceLocations } from '../../../../_verify-project@shared/_utils/compare-source-locations/index.js';\n\nexport function findDestinationCrossings(\n destination: TDestinationEntry,\n indexed: TIndexedExternalSubgraph,\n graph: TDependencyGraph\n): readonly TExternalCrossing[] {\n const readPath = (vertex: number): string => graph.vertexToPath[vertex] ?? '';\n\n const runBackwardBfs = (): {\n readonly distanceToDestination: Int32Array;\n readonly nextInPath: Int32Array;\n readonly reachedExternal: readonly number[];\n } => {\n const distanceToDestination = new Int32Array(graph.vertexCount).fill(-1);\n const nextInPath = new Int32Array(graph.vertexCount);\n\n distanceToDestination[destination.destinationVertex] = 0;\n for (const externalSource of destination.externalSources) {\n distanceToDestination[externalSource] = 1;\n nextInPath[externalSource] = destination.destinationVertex;\n }\n\n let currentDistance = 2;\n\n const expandNextLevel = (level: readonly number[]): readonly number[] => {\n const candidateMap = new Map<number, number>();\n\n for (const u of level) {\n const reverseList = indexed.reverseExternalEdges[u];\n if (reverseList === undefined) {\n continue;\n }\n for (const v of reverseList) {\n if (distanceToDestination[v] !== -1) {\n continue;\n }\n const existing = candidateMap.get(v);\n if (\n existing === undefined ||\n compareOrdinal(readPath(u), readPath(existing)) < 0\n ) {\n candidateMap.set(v, u);\n }\n }\n }\n\n const nextLevel: number[] = [];\n for (const [v, bestNext] of candidateMap) {\n distanceToDestination[v] = currentDistance;\n nextInPath[v] = bestNext;\n nextLevel.push(v);\n }\n return nextLevel;\n };\n\n const reachedExternal: number[] = [...destination.externalSources];\n let currentLevel: readonly number[] = destination.externalSources;\n\n while (currentLevel.length > 0) {\n currentLevel = expandNextLevel(currentLevel);\n reachedExternal.push(...currentLevel);\n currentDistance += 1;\n }\n\n return { distanceToDestination, nextInPath, reachedExternal };\n };\n\n const compareCandidates = (\n candidate: TCandidateCrossing,\n current: TCandidateCrossing\n ): number => {\n if (candidate.distance !== current.distance) {\n return candidate.distance - current.distance;\n }\n if (candidate.externalStart !== current.externalStart) {\n return compareOrdinal(\n readPath(candidate.externalStart),\n readPath(current.externalStart)\n );\n }\n const positionComparison = compareSourceLocations(\n candidate.metadata.position,\n current.metadata.position\n );\n return positionComparison === 0\n ? candidate.metadata.importIndex - current.metadata.importIndex\n : positionComparison;\n };\n\n const collectBestCandidates = (\n distanceToDestination: Int32Array,\n reachedExternal: readonly number[]\n ): ReadonlyMap<number, TCandidateCrossing> => {\n const bestBySource = new Map<number, TCandidateCrossing>();\n\n for (const x of reachedExternal) {\n const treeEdges = indexed.treeEdgesByExternal[x];\n const distance = distanceToDestination[x];\n if (treeEdges === undefined || distance === undefined) {\n continue;\n }\n for (const edge of treeEdges) {\n const candidate: TCandidateCrossing = {\n distance,\n externalStart: x,\n metadata: edge.metadata,\n };\n const existing = bestBySource.get(edge.sourceVertex);\n if (\n existing === undefined ||\n compareCandidates(candidate, existing) < 0\n ) {\n bestBySource.set(edge.sourceVertex, candidate);\n }\n }\n }\n\n return bestBySource;\n };\n\n const reconstructCrossings = (\n bestBySource: ReadonlyMap<number, TCandidateCrossing>,\n nextInPath: Int32Array\n ): readonly TExternalCrossing[] => {\n const destinationPath = readPath(destination.destinationVertex);\n\n const reconstructChain = (\n sourceVertex: number,\n start: number\n ): readonly string[] => {\n const chain: string[] = [readPath(sourceVertex)];\n let current = start;\n while (current !== destination.destinationVertex) {\n chain.push(readPath(current));\n const next = nextInPath[current];\n if (next === undefined) {\n break;\n }\n current = next;\n }\n chain.push(destinationPath);\n return chain;\n };\n\n const crossings: TExternalCrossing[] = [];\n for (const [sourceVertex, winning] of bestBySource) {\n const sourcePath = readPath(sourceVertex);\n const chain = reconstructChain(sourceVertex, winning.externalStart);\n crossings.push({\n chain,\n destinationPath,\n importIndex: winning.metadata.importIndex,\n position: winning.metadata.position,\n sourcePath,\n specifier: winning.metadata.specifier,\n });\n }\n return crossings;\n };\n\n const bfs = runBackwardBfs();\n const bestBySource = collectBestCandidates(\n bfs.distanceToDestination,\n bfs.reachedExternal\n );\n return reconstructCrossings(bestBySource, bfs.nextInPath);\n}\n","import type { TDependencyGraph } from '../../../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type {\n TDestinationEntry,\n TIndexedExternalSubgraph,\n TTreeEdge,\n} from '../../_derive-external-crossings@shared/_types/indexed-subgraph.type.js';\n\nexport function indexExternalSubgraph(\n graph: TDependencyGraph\n): TIndexedExternalSubgraph {\n const externalLocalFile = 'external-local-file';\n const treeNode = 'tree-node';\n\n const reverseExternalEdges: number[][] = Array.from(\n { length: graph.vertexCount },\n () => []\n );\n const treeEdgesByExternal: TTreeEdge[][] = Array.from(\n { length: graph.vertexCount },\n () => []\n );\n const destinationsMap = new Map<number, number[]>();\n\n const recordExternalEdge = (source: number, target: number): void => {\n const targetNature = graph.vertexNatures[target]?.kind;\n if (targetNature === externalLocalFile) {\n const reverseList = reverseExternalEdges[target];\n if (reverseList !== undefined && !reverseList.includes(source)) {\n reverseList.push(source);\n }\n return;\n }\n if (targetNature !== treeNode) {\n return;\n }\n const existing = destinationsMap.get(target);\n if (existing === undefined) {\n destinationsMap.set(target, [source]);\n return;\n }\n if (!existing.includes(source)) {\n existing.push(source);\n }\n };\n\n const recordTreeEdge = (\n source: number,\n target: number,\n edgeIndex: number\n ): void => {\n const targetNature = graph.vertexNatures[target]?.kind;\n if (targetNature !== externalLocalFile) {\n return;\n }\n const metadata = graph.edgeMetadata[edgeIndex];\n if (metadata !== undefined) {\n treeEdgesByExternal[target]?.push({ metadata, sourceVertex: source });\n }\n };\n\n const processEdge = (\n source: number,\n sourceNature: string | undefined,\n edgeIndex: number\n ): void => {\n const target = graph.columnTargets[edgeIndex];\n if (target === undefined) {\n return;\n }\n if (sourceNature === externalLocalFile) {\n recordExternalEdge(source, target);\n return;\n }\n if (sourceNature === treeNode) {\n recordTreeEdge(source, target, edgeIndex);\n }\n };\n\n for (let u = 0; u < graph.vertexCount; u += 1) {\n const uNature = graph.vertexNatures[u]?.kind;\n const offsetStart = graph.rowOffsets[u] ?? 0;\n const offsetEnd = graph.rowOffsets[u + 1] ?? 0;\n\n for (let edgeIndex = offsetStart; edgeIndex < offsetEnd; edgeIndex += 1) {\n processEdge(u, uNature, edgeIndex);\n }\n }\n\n const destinations: TDestinationEntry[] = [];\n for (const [destinationVertex, externalSources] of destinationsMap) {\n destinations.push({ destinationVertex, externalSources });\n }\n destinations.sort((a, b) => a.destinationVertex - b.destinationVertex);\n\n return {\n destinations,\n reverseExternalEdges,\n treeEdgesByExternal,\n };\n}\n","import type { TDependencyGraph } from '../../_verify-project@shared/_types/_compounds/dependency-graph.type.js';\nimport type { TExternalCrossing } from '../../_verify-project@shared/_types/_compounds/external-crossing.type.js';\n\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { findDestinationCrossings } from './_utils/find-destination-crossings/index.js';\nimport { indexExternalSubgraph } from './_utils/index-external-subgraph/index.js';\n\nexport function deriveExternalCrossings(\n graph: TDependencyGraph\n): readonly TExternalCrossing[] {\n const indexed = indexExternalSubgraph(graph);\n const crossings: TExternalCrossing[] = [];\n\n for (const destination of indexed.destinations) {\n const destinationCrossings = findDestinationCrossings(\n destination,\n indexed,\n graph\n );\n crossings.push(...destinationCrossings);\n }\n\n crossings.sort((left, right) => {\n const sourceComparison = compareOrdinal(left.sourcePath, right.sourcePath);\n return sourceComparison === 0\n ? compareOrdinal(left.destinationPath, right.destinationPath)\n : sourceComparison;\n });\n\n return crossings;\n}\n","import type { TItemClassification } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nexport function isOrderableSiblingSet(\n parent: TItemClassification | undefined,\n children: readonly (TItemClassification | undefined)[]\n): boolean {\n if (\n parent?.domainKind === 'category' ||\n parent?.domainKind === 'sub-category'\n ) {\n return children.length > 0\n ? children.every((child) => child?.domainKind === 'sub-category')\n : !parent.relationalQualifications.isParentCategory;\n }\n const isStratified =\n parent?.domainKind === 'layer' ||\n parent?.domainKind === 'root-layer' ||\n parent?.domainKind === 'fractal-branch';\n return (\n isStratified &&\n (children.every((child) => child?.domainKind === 'layer') ||\n children.every((child) => child?.domainKind === 'category'))\n );\n}\n","import type { THorizontalHierarchySet } from '../../../../_verify-project@shared/_types/_compounds/horizontal-hierarchies.type.js';\nimport type { THierarchyContext } from '../../_derive-horizontal-hierarchies@shared/_types/hierarchy-context.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { isOrderableSiblingSet } from './_utils/is-orderable-sibling-set/index.js';\n\nexport function deriveDomainHierarchies({\n children,\n parent,\n taxonomy,\n tree,\n}: THierarchyContext): readonly Omit<THorizontalHierarchySet, 'id'>[] {\n const classification = taxonomy.byItemId.get(parent.id);\n const declarations = [\n ...(classification?.domainKind === 'foreign-domain'\n ? []\n : tree.horizontalHierarchies\n ).map((hierarchy) => ({\n hierarchy,\n origin: 'general' as const,\n })),\n ...tree.localHorizontalHierarchies\n .filter((local) => local.paths.includes(parent.path))\n .map((local) => ({\n hierarchy: local.hierarchy,\n origin: 'local' as const,\n })),\n ];\n const sets: Omit<THorizontalHierarchySet, 'id'>[] = [];\n for (const { hierarchy, origin } of declarations) {\n const names = hierarchy.flat();\n const repetitions = [\n ...new Set(names.filter((name, index) => names.indexOf(name) !== index)),\n ];\n repetitions.sort(compareOrdinal);\n const siblings = hierarchy.flatMap((tier, rank) => {\n const orderedNames = [...tier];\n orderedNames.sort(compareOrdinal);\n return orderedNames.flatMap((name) =>\n children\n .filter((child) => child.path.split('/').at(-1) === name)\n .map((child) => ({ itemId: child.id, rank }))\n );\n });\n if (origin === 'general' && siblings.length === 0) {\n continue;\n }\n sets.push({\n isOrderable: isOrderableSiblingSet(\n classification,\n siblings.map((sibling) => taxonomy.byItemId.get(sibling.itemId))\n ),\n origin,\n parentPath: parent.path,\n repetitions,\n siblings,\n });\n }\n return sets;\n}\n","import type { THorizontalHierarchySet } from '../../../../_verify-project@shared/_types/_compounds/horizontal-hierarchies.type.js';\nimport type { THierarchyContext } from '../../_derive-horizontal-hierarchies@shared/_types/hierarchy-context.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function deriveNodeHierarchies({\n children,\n parent,\n taxonomy,\n tree,\n}: THierarchyContext): readonly Omit<THorizontalHierarchySet, 'id'>[] {\n const kind = taxonomy.byItemId.get(parent.id)?.domainKind;\n if (kind === 'fragment') {\n const siblings = children.flatMap((child) => {\n const rank = taxonomy.byItemId.get(child.id)?.fragmentInternalRank;\n return rank === null || rank === undefined\n ? []\n : { itemId: child.id, rank };\n });\n return [\n {\n isOrderable: true,\n origin: 'fragment-internal',\n parentPath: parent.path,\n repetitions: [],\n siblings,\n },\n ];\n }\n if (kind !== 'root-fragment') {\n return [];\n }\n const fragments = [...tree.rootFragments];\n let fragment = fragments.shift();\n while (fragment !== undefined) {\n if (fragment.path === parent.path) {\n const rootNodes = fragment.rootNodes;\n const names = rootNodes.map((node) => node.name);\n const repetitions = [\n ...new Set(\n names.filter((name, index) => names.indexOf(name) !== index)\n ),\n ];\n repetitions.sort(compareOrdinal);\n const siblings = children.flatMap((child) =>\n rootNodes\n .filter((node) => node.name === child.path.split('/').at(-1))\n .map((node) => ({ itemId: child.id, rank: node.rank }))\n );\n return [\n {\n isOrderable: siblings.every(\n (sibling) =>\n taxonomy.byItemId.get(sibling.itemId)?.nodeKind === 'root-node'\n ),\n origin: 'root-nodes',\n parentPath: parent.path,\n repetitions,\n siblings,\n },\n ];\n }\n fragments.push(...fragment.subRootFragments);\n fragment = fragments.shift();\n }\n return [];\n}\n","import type { TOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TProjectBasis } from '../../_verify-project@shared/_types/_aggregates/project-basis.type.js';\nimport type { TTaxonomyModel } from '../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type {\n THorizontalHierarchies,\n THorizontalHierarchySet,\n} from '../../_verify-project@shared/_types/_compounds/horizontal-hierarchies.type.js';\nimport type { TEffectiveTree } from '../../_verify-project@shared/_types/_primitives/declarations.type.js';\n\nimport { compareOrdinal } from '../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { deriveDomainHierarchies } from './_utils/derive-domain-hierarchies/index.js';\nimport { deriveNodeHierarchies } from './_utils/derive-node-hierarchies/index.js';\n\nexport function deriveHorizontalHierarchies(\n basis: TProjectBasis,\n taxonomy: TTaxonomyModel\n): {\n readonly hierarchies: THorizontalHierarchies;\n readonly outcomes: readonly TOutcome[];\n} {\n const trees: ReadonlyMap<null | string, TEffectiveTree> = new Map(\n basis.declarations.trees.map((tree) => [tree.originPath, tree])\n );\n const derivedSets: Omit<THorizontalHierarchySet, 'id'>[] = [];\n for (const parent of basis.inventory.items) {\n const tree = trees.get(parent.treeOrigin);\n if (tree === undefined || parent.kind !== 'directory') {\n continue;\n }\n const children = basis.inventory.items.filter(\n (item) => item.parentId === parent.id\n );\n const context = { children, parent, taxonomy, tree };\n derivedSets.push(\n ...deriveDomainHierarchies(context),\n ...deriveNodeHierarchies(context)\n );\n }\n const canonical = derivedSets.map((set) => {\n const siblings = [...set.siblings];\n siblings.sort((left, right) => {\n const rankOrder = left.rank - right.rank;\n return rankOrder === 0 ? left.itemId - right.itemId : rankOrder;\n });\n return { ...set, siblings };\n });\n canonical.sort((left, right) => {\n const parentOrder = compareOrdinal(left.parentPath, right.parentPath);\n return parentOrder === 0\n ? compareOrdinal(\n JSON.stringify([left.origin, left.repetitions, left.siblings]),\n JSON.stringify([right.origin, right.repetitions, right.siblings])\n )\n : parentOrder;\n });\n const sets = canonical.map((set, id) => ({ ...set, id }));\n const selections = new Map<number, Set<number>>();\n for (const set of sets) {\n for (const sibling of set.siblings) {\n const ids = selections.get(sibling.itemId) ?? new Set<number>();\n ids.add(set.id);\n selections.set(sibling.itemId, ids);\n }\n }\n const conflicts = [...selections]\n .filter(([, ids]) => ids.size > 1)\n .map(([itemId, ids]) => ({ hierarchyIds: [...ids], itemId }));\n conflicts.sort((left, right) => left.itemId - right.itemId);\n return { hierarchies: { conflicts, sets }, outcomes: [] };\n}\n","export const EXPOSED_NODE_KEYS = new Set([\n 'category:category-node',\n 'fragment:access-node',\n]);\n\nexport const NEXT_ROLE: Readonly<Record<string, string | undefined>> = {\n 'category:fragment': 'fragment',\n 'category:path-sub-category': 'category',\n 'category:sub-category': 'category',\n 'organizer:category': 'category',\n 'organizer:layer': 'organizer',\n};\n\nexport const ROLE_ORGANIZER = 'organizer';\n","import type { TTaxonomyModel } from '../../../../../../_verify-project@shared/_types/_compounds/classification.type.js';\n\nimport {\n EXPOSED_NODE_KEYS,\n NEXT_ROLE,\n ROLE_ORGANIZER,\n} from './is-exposed-layer-node.constant.js';\n\nexport function isExposedLayerNode(\n path: string,\n originPath: string,\n taxonomy: TTaxonomyModel\n): boolean {\n const prefix = originPath === '.' ? '' : `${originPath}/`;\n if (!path.startsWith(prefix)) {\n return false;\n }\n const segments = path.slice(prefix.length).split('/');\n let role = ROLE_ORGANIZER;\n let current = originPath === '.' ? '' : originPath;\n for (const segment of segments) {\n current = current === '' ? segment : `${current}/${segment}`;\n const classification = taxonomy.byPath.get(current);\n if (classification === undefined) {\n return false;\n }\n if (current === path) {\n const nodeKind = classification.nodeKind ?? 'absent';\n return EXPOSED_NODE_KEYS.has(`${role}:${nodeKind}`);\n }\n const domainKind = String(classification.domainKind);\n const nextRole = NEXT_ROLE[`${role}:${domainKind}`];\n if (nextRole === undefined) {\n return false;\n }\n role = nextRole;\n }\n return false;\n}\n","import type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\nimport { isExposedLayerNode } from './_utils/is-exposed-layer-node/index.js';\n\nexport function collectLayerSurface(\n originPath: string,\n taxonomy: TTaxonomyModel,\n inventory: TInventory\n): readonly string[] {\n const nodes: string[] = [];\n for (const item of inventory.items) {\n if (item.treeOrigin !== originPath) {\n continue;\n }\n if (isExposedLayerNode(item.path, originPath, taxonomy)) {\n nodes.push(item.path);\n }\n }\n nodes.sort(compareOrdinal);\n return nodes;\n}\n","import type { TTaxonomyModel } from '../../../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TInventory } from '../../../../_verify-project@shared/_types/_primitives/inventory.type.js';\n\nimport { compareOrdinal } from '../../../../_verify-project@shared/_utils/compare-ordinal/index.js';\n\nexport function selectDesignatedRootNodes(\n publicRootNodes: readonly string[],\n originPath: string,\n taxonomy: TTaxonomyModel,\n inventory: TInventory\n): readonly string[] {\n const nodes: string[] = [];\n for (const nodePath of publicRootNodes) {\n const classification = taxonomy.byPath.get(nodePath);\n const itemId = inventory.pathToId.get(nodePath);\n const item = itemId === undefined ? undefined : inventory.items[itemId];\n const isRootNode = classification?.nodeKind === 'root-node';\n const isInTree = item?.treeOrigin === originPath;\n if (isRootNode && isInTree) {\n nodes.push(nodePath);\n }\n }\n nodes.sort(compareOrdinal);\n return nodes;\n}\n","import type { TOutcome } from '../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type { TProjectBasis } from '../../_verify-project@shared/_types/_aggregates/project-basis.type.js';\nimport type { TTaxonomyModel } from '../../_verify-project@shared/_types/_compounds/classification.type.js';\nimport type { TPublicSurface } from '../../_verify-project@shared/_types/_compounds/public-surface.type.js';\n\nimport { collectLayerSurface } from './_utils/collect-layer-surface/index.js';\nimport { selectDesignatedRootNodes } from './_utils/select-designated-root-nodes/index.js';\n\nexport function derivePublicSurface(\n basis: TProjectBasis,\n taxonomy: TTaxonomyModel\n): {\n readonly outcomes: readonly TOutcome[];\n readonly surface: TPublicSurface;\n} {\n const trees: TPublicSurface['trees'][number][] = [];\n for (const tree of basis.declarations.trees) {\n const nodes =\n tree.originKind === 'root-fragment'\n ? selectDesignatedRootNodes(\n tree.publicRootNodes,\n tree.originPath,\n taxonomy,\n basis.inventory\n )\n : collectLayerSurface(tree.originPath, taxonomy, basis.inventory);\n trees.push({ nodes, originPath: tree.originPath });\n }\n return {\n outcomes: [],\n surface: { trees },\n };\n}\n","import nodeFs from 'node:fs';\nimport nodePath from 'node:path';\nimport v8 from 'node:v8';\n\nimport type { TModuleRecord } from '../../_types/module-record.type.js';\nimport type { TReadModuleRecordCacheInput } from './read-module-record-cache.type.js';\n\nimport { parseModuleRecordCache } from './_utils/parse-module-record-cache/index.js';\n\nexport function readModuleRecordCache(\n input: TReadModuleRecordCacheInput\n): ReadonlyMap<string, TModuleRecord> {\n const cachePath = nodePath.join(\n input.baseDirectory,\n 'node_modules/.cache/eslint-plugin-faf',\n 'records.cache'\n );\n\n try {\n const rawPayload: unknown = v8.deserialize(nodeFs.readFileSync(cachePath));\n return (\n parseModuleRecordCache({\n packageVersion: input.packageVersion,\n raw: rawPayload,\n }) ?? new Map<string, TModuleRecord>()\n );\n } catch {\n return new Map<string, TModuleRecord>();\n }\n}\n","import type { TSourceLocation } from '../../../../../../../../../_conformity@shared/_types/outcome.type.js';\nimport type {\n TExportOrigin,\n TImportSyntaxKind,\n TModuleExport,\n TModuleImport,\n TModuleRecord,\n TRootSymbol,\n TUnsupportedSyntax,\n} from '../../../../../../_types/module-record.type.js';\n\nimport { isPlainRecord } from '../../../../../../_utils/is-plain-record/index.js';\n\nexport function isValidModuleRecord(\n candidate: unknown\n): candidate is TModuleRecord {\n if (!isPlainRecord(candidate)) {\n return false;\n }\n\n const validLanguages = new Set<string>(['binary', 'script', 'style']);\n const validImportKinds: ReadonlySet<string> = new Set<TImportSyntaxKind>([\n 'css-at-import',\n 'css-url',\n 'default-import',\n 'export-all-from',\n 'export-named-from',\n 'export-type-from',\n 'literal-dynamic-import',\n 'mixed-type-specifier-import',\n 'named-import',\n 'namespace-import',\n 'non-literal-dynamic-import',\n 'require-call',\n 'side-effect-import',\n 'type-only-import',\n 'typescript-import-type',\n 'typescript-require-import',\n ]);\n\n const hasValidLanguage = (): boolean => {\n const lang = candidate['language'];\n return typeof lang === 'string' && validLanguages.has(lang);\n };\n\n if (!hasValidLanguage()) {\n return false;\n }\n\n const isValidLocation = (value: unknown): value is TSourceLocation =>\n isPlainRecord(value) &&\n typeof value['line'] === 'number' &&\n typeof value['column'] === 'number';\n\n const isValidOrigin = (value: unknown): value is TExportOrigin => {\n if (!isPlainRecord(value)) {\n return false;\n }\n const type = value['type'];\n if (type === 'local-symbol') {\n return typeof value['symbolName'] === 'string';\n }\n if (type === 'export-all' || type === 'namespace') {\n return typeof value['specifier'] === 'string';\n }\n if (type === 'imported-binding') {\n const hasImportedName = typeof value['importedName'] === 'string';\n const hasSpecifier = typeof value['specifier'] === 'string';\n return hasImportedName && hasSpecifier;\n }\n return false;\n };\n\n const isValidExport = (value: unknown): value is TModuleExport => {\n if (!isPlainRecord(value)) {\n return false;\n }\n const hasNames =\n typeof value['exportedName'] === 'string' &&\n typeof value['isTypeOnly'] === 'boolean';\n if (!hasNames) {\n return false;\n }\n const hasLocation = isValidLocation(value['position']);\n const hasOrigin = isValidOrigin(value['origin']);\n return hasLocation && hasOrigin;\n };\n\n const isValidImport = (value: unknown): value is TModuleImport => {\n if (!isPlainRecord(value)) {\n return false;\n }\n const kind = value['kind'];\n const hasHeader =\n typeof value['isTypeOnly'] === 'boolean' &&\n typeof kind === 'string' &&\n validImportKinds.has(kind);\n if (!hasHeader) {\n return false;\n }\n const specifier = value['specifier'];\n const hasSpecifier = specifier === null || typeof specifier === 'string';\n return hasSpecifier && isValidLocation(value['position']);\n };\n\n const isValidSymbol = (value: unknown): value is TRootSymbol => {\n if (!isPlainRecord(value)) {\n return false;\n }\n const space = value['space'];\n const hasSpace = space === 'type' || space === 'value';\n const hasName = typeof value['name'] === 'string' && hasSpace;\n return hasName && isValidLocation(value['position']);\n };\n\n const isValidUnsupported = (value: unknown): value is TUnsupportedSyntax =>\n isPlainRecord(value) &&\n typeof value['description'] === 'string' &&\n isValidLocation(value['position']);\n\n const {\n exports,\n imports,\n symbols,\n unsupportedSyntaxes: unsupported,\n } = candidate;\n\n if (\n !Array.isArray(exports) ||\n !Array.isArray(imports) ||\n !Array.isArray(symbols) ||\n !Array.isArray(unsupported)\n ) {\n return false;\n }\n\n const hasExportsAndImports =\n exports.every(isValidExport) && imports.every(isValidImport);\n const hasSymbolsAndSyntax =\n symbols.every(isValidSymbol) && unsupported.every(isValidUnsupported);\n\n return hasExportsAndImports && hasSymbolsAndSyntax;\n}\n","import type { TModuleRecord } from '../../../../_types/module-record.type.js';\nimport type { TParseModuleRecordCacheInput } from './parse-module-record-cache.type.js';\n\nimport { MODULE_RECORD_CACHE_SCHEMA_VERSION } from '../../../../_constants/module-record-cache.constant.js';\nimport { isPlainRecord } from '../../../../_utils/is-plain-record/index.js';\nimport { isValidModuleRecord } from './_utils/is-valid-module-record/index.js';\n\nexport function parseModuleRecordCache(\n input: TParseModuleRecordCacheInput\n): ReadonlyMap<string, TModuleRecord> | undefined {\n const { packageVersion, raw } = input;\n if (\n !isPlainRecord(raw) ||\n raw['schemaVersion'] !== MODULE_RECORD_CACHE_SCHEMA_VERSION ||\n raw['packageVersion'] !== packageVersion\n ) {\n return undefined;\n }\n const entries = raw['entries'];\n if (!Array.isArray(entries)) {\n return undefined;\n }\n\n const result = new Map<string, TModuleRecord>();\n for (const item of entries) {\n if (!Array.isArray(item) || item.length !== 2) {\n return undefined;\n }\n const entry: readonly unknown[] = item;\n const [key, record] = entry;\n if (typeof key !== 'string' || !isValidModuleRecord(record)) {\n return undefined;\n }\n result.set(key, record);\n }\n return result;\n}\n","import nodeCrypto from 'node:crypto';\nimport nodeFs from 'node:fs';\nimport nodePath from 'node:path';\nimport v8 from 'node:v8';\n\nimport type {\n TModuleRecordCachePayload,\n TWriteModuleRecordCacheInput,\n} from './write-module-record-cache.type.js';\n\nimport { MODULE_RECORD_CACHE_SCHEMA_VERSION } from '../../_constants/module-record-cache.constant.js';\n\nexport function writeModuleRecordCache(\n input: TWriteModuleRecordCacheInput\n): void {\n const cacheDirectory = nodePath.join(\n input.baseDirectory,\n 'node_modules/.cache/eslint-plugin-faf'\n );\n const targetPath = nodePath.join(cacheDirectory, 'records.cache');\n const temporaryPath = nodePath.join(\n cacheDirectory,\n `.records.cache.${process.pid}.${Date.now()}.${nodeCrypto.randomBytes(8).toString('hex')}.tmp`\n );\n\n try {\n nodeFs.mkdirSync(cacheDirectory, { recursive: true });\n const payload: TModuleRecordCachePayload = {\n entries: [...input.entries],\n packageVersion: input.packageVersion,\n schemaVersion: MODULE_RECORD_CACHE_SCHEMA_VERSION,\n };\n nodeFs.writeFileSync(temporaryPath, v8.serialize(payload));\n nodeFs.renameSync(temporaryPath, targetPath);\n } catch {\n try {\n nodeFs.rmSync(temporaryPath);\n } catch {\n return;\n }\n }\n}\n","export function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n","import type { Rule } from 'eslint';\n\nimport { isRecord } from './_utils/is-record/index.js';\n\nexport function readConfigFileSetting(\n settings: Rule.RuleContext['settings'] | undefined\n): string | undefined {\n if (!isRecord(settings)) {\n return undefined;\n }\n const faf: unknown = settings['faf'];\n if (!isRecord(faf)) {\n return undefined;\n }\n const configFile: unknown = faf['configFile'];\n return typeof configFile === 'string' ? configFile : undefined;\n}\n","import type { Rule } from 'eslint';\n\nimport { discoverConfig } from './_adapters/discover-config/index.js';\nimport { session } from './_stores/session/index.js';\nimport { readConfigFileSetting } from './_utils/read-config-file-setting/index.js';\n\nexport function createConformity(packageVersion: string): Rule.RuleModule {\n const message = '{{constraint}}: {{message}} ({{reference}}).';\n const fileStart = { column: 0, line: 1 };\n return {\n create(context) {\n return {\n Program() {\n const discovered = discoverConfig({\n configFile: readConfigFileSetting(context.settings),\n workingDirectory: context.cwd,\n });\n if (!discovered.ok) {\n for (const outcome of discovered.outcomes) {\n context.report({\n data: {\n constraint: outcome.constraint,\n message: outcome.message,\n reference: outcome.normativeReference,\n },\n loc: { end: fileStart, start: fileStart },\n messageId: outcome.family,\n });\n }\n return;\n }\n const anchored = session.outcomesFor({\n configPath: discovered.value.configPath,\n filename: context.filename,\n packageVersion,\n sourceText: context.sourceCode.text,\n workingDirectory: context.cwd,\n });\n for (const item of anchored) {\n const start = {\n column: Math.max(0, item.position.column - 1),\n line: item.position.line,\n };\n context.report({\n data: {\n constraint: item.outcome.constraint,\n message: item.outcome.message,\n reference: item.outcome.normativeReference,\n },\n loc: { end: start, start },\n messageId: item.outcome.family,\n });\n }\n },\n };\n },\n meta: {\n docs: {\n description:\n 'Verify that the project conforms to the Fractal Architecture Framework.',\n },\n messages: {\n acyclicity: message,\n classification: message,\n configuration: message,\n dependency: message,\n symbol: message,\n unverified: message,\n },\n schema: [],\n type: 'problem',\n },\n };\n}\n","import type { Linter } from 'eslint';\n\nimport packageJson from '../package.json' with { type: 'json' };\nimport { recommended } from './_configs/recommended.config.js';\nimport { createConformity } from './_rules/conformity/index.js';\n\nexport type {\n TFAFCommonConfig,\n TFAFConfig,\n TFAFExternalDependency,\n TFAFForeignNodeFamily,\n TFAFHierarchy,\n TFAFLocalConfig,\n TFAFLocalHorizontalHierarchy,\n TFAFMimeticPathStructure,\n TFAFNonEmptyArray,\n TFAFRole,\n TFAFRoles,\n TFAFRootDependencyEdge,\n TFAFRootFragment,\n TFAFSharedConfig,\n TFAFSubGraphRole,\n TFAFTreeDependency,\n} from './_src@shared/_types/faf-config.type.js';\n\ntype TFafPlugin = {\n configs: {\n recommended: Linter.Config & {\n plugins: {\n readonly faf: TFafPlugin;\n };\n };\n };\n meta: {\n readonly name: string;\n readonly namespace: 'faf';\n readonly version: string;\n };\n rules: {\n conformity: ReturnType<typeof createConformity>;\n };\n};\n\nconst conformity = createConformity(packageJson.version);\n\nconst plugins: { readonly faf: TFafPlugin } = {\n get faf(): TFafPlugin {\n return plugin;\n },\n};\n\nconst plugin: TFafPlugin = {\n configs: {\n recommended: {\n ...recommended,\n plugins,\n },\n },\n meta: {\n name: packageJson.name,\n namespace: 'faf',\n version: packageJson.version,\n },\n rules: {\n conformity,\n },\n};\n\nexport default plugin;\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,EACR,QAAU;AAAA,EACV,OAAS;AAAA,EACT,SAAW;AAAA,IACT,KAAK;AAAA,MACH,QAAU;AAAA,QACR,OAAS;AAAA,QACT,SAAW;AAAA,MACb;AAAA,MACA,SAAW;AAAA,QACT,OAAS;AAAA,QACT,SAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AAAA,EACA,eAAiB;AAAA,IACf,QAAU;AAAA,IACV,YAAc;AAAA,EAChB;AAAA,EACA,aAAe;AAAA,EACf,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,MAAQ;AAAA,EACR,OAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,OAAS;AAAA,IACT,OAAS;AAAA,IACT,IA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","nodeFs","nodeFs","nodeFs","nodePath","nodeFs","nodePath","nodePath","nodeFs","nodePath","nodePath","path","path","nodeFs","nodePath","path","nodeFs","nodePath","nodeFs","nodePath","nodePath","nodePath","nodePath","nodePath","nodePath","nodeFs","path","isTypeOnly","kind","path","readQuotedUrl","readUnquotedUrl","IDENTIFIER_CHAR_PATTERN","URL_HEADER_PATTERN","IDENTIFIER_CHAR_PATTERN","URL_HEADER_PATTERN","readQuotedUrl","readUnquotedUrl","path","path","selectMinElement","selectMinElement","state","state","path","FRAGMENT_NODE","path","compareEdgeOutcomes","compareEdgeOutcomes","FRACTAL_BRANCH","path","collectBranchOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","path","path","compareEdgeOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","findReEntryPaths","path","compareEdgeOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","compareEdgeOutcomes","nodePath","nodeFs","nodePath","nodePath","nodeFs","isRecord","nodeFs","nodePath","nodeFs","nodePath","path","fs","path","fs","path","path","fs","path","fs","path","nodeFs","nodePath","nodePath","message","code","nodePath","nodePath","nodeFs","z","z","createOutcome","createOutcome","path","path","z","path","z","z","path","z","readConfigValue","path","z","z","z","z","isRecord","validateDependencies","SLASH","REGEX_SPECIAL_CHARS","ASTERISK_REGEX","QUESTION_REGEX","SLASH","REGEX_SPECIAL_CHARS","ASTERISK_REGEX","QUESTION_REGEX","SLASH","SLASH","SLASH","SLASH","z","isRecord","z","isRecord","validateForeignNodes","z","z","isRecord","validateHierarchies","z","z","z","isRecord","z","validateMimeticStructures","z","z","isRecord","validateRoles","z","z","isRecord","validateRootFragments","z","CONSTRAINT_EMPTY_STRING","CONSTRAINT_INVALID_LITERAL_PATH","CONSTRAINT_INVALID_TYPE","CONSTRAINT_NULL_FORBIDDEN","z","CONSTRAINT_NULL_FORBIDDEN","CONSTRAINT_INVALID_TYPE","CONSTRAINT_EMPTY_STRING","CONSTRAINT_INVALID_LITERAL_PATH","z","z","isRecord","validateSubGraphRoles","validateConfigFormat","path","path","path","path","path","path","path","path","path","path","path","path","path","path","path","path","path","path","nodePath","nodePath","nodePath","nodePathPosix","nodePathPosix","nodePath","nodePath","nodePath","nodePath","path","path","NODE_ACCESS","NODE_FRAGMENT","NODE_MASTER","NODE_SUB_GRAPH","SLASH","path","SLASH","SLASH","path","SLASH","getRoleFromName","nodePath","path","path","path","path","path","path","path","path","path","path","NODE_ACCESS","NODE_SUB_GRAPH","NODE_FRAGMENT","path","path","NODE_FRAGMENT","NODE_MASTER","SLASH","NODE_ACCESS","nodePath","nodePath","nodePath","bestBySource","path","nodePath","nodePath","anchored","nodeFs","nodePath","nodePath","nodeFs","nodeCrypto","nodeFs","nodePath","v8","nodePath","nodeCrypto","nodeFs","v8","nodePath"]}
|