@r_masseater/vite-plus-adopt 0.11.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fsd.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"fsd.mjs","names":["Str","basename","join","sep","parse","plugin","fsd"],"sources":["../src/app/fsd-typescript.ts","../../../node_modules/.pnpm/@feature-sliced+filesystem@3.1.1/node_modules/@feature-sliced/filesystem/dist/index.js","../../../node_modules/.pnpm/@feature-sliced+steiger-plugin@0.8.2_typescript@7.1.0-beta/node_modules/@feature-sliced/steiger-plugin/dist/index.js","../src/app/fsd.ts"],"sourcesContent":["import { Option, pipe, String as Str } from \"effect\";\nimport { serverFS } from \"typescript/fs\";\nimport type { FileSystemCallbacks } from \"typescript/fs\";\nimport {\n rootedDirectoryPathFromPath,\n rootedPathFromNormalized,\n toRootedDirectoryPath,\n toRootedFilePath,\n} from \"typescript/path\";\nimport { API } from \"typescript/sync\";\nimport type { ModuleResolver } from \"typescript/sync\";\n\nimport { toJson } from \"#/shared/lib/json.ts\";\n\ninterface ResolutionHost {\n readonly fileExists: (fileName: string) => boolean;\n readonly directoryExists?: ((directoryName: string) => boolean) | undefined;\n}\n\ninterface Resolution {\n readonly resolvedModule: { readonly resolvedFileName: string } | undefined;\n}\n\ntype ResolveArguments = readonly [\n moduleName: string,\n containingFile: string,\n compilerOptions: object,\n host: ResolutionHost,\n];\n\nconst WORKING_DIRECTORY = Str.replaceAll(\"\\\\\", \"/\")(process.cwd());\nconst CWD = rootedDirectoryPathFromPath(rootedPathFromNormalized(WORKING_DIRECTORY));\n\nconst PREFIX = `${CWD}/`;\n\nconst current: { host: Option.Option<ResolutionHost>; relative: boolean } = {\n host: Option.none(),\n relative: false,\n};\n\nconst toCaller = (fileName: string): string =>\n Option.liftPredicate(fileName, (name) => current.relative && Str.startsWith(PREFIX)(name)).pipe(\n Option.match({ onSome: (name) => Str.slice(PREFIX.length)(name), onNone: () => fileName }),\n );\n\nconst directoryExistsOf = (host: ResolutionHost, directoryName: string): boolean =>\n Option.fromNullishOr(host.directoryExists).pipe(\n Option.match({\n onSome: (directoryExists) => directoryExists(toCaller(directoryName)),\n onNone: () => true,\n }),\n );\n\nconst callerFileSystem: FileSystemCallbacks = {\n fileExists: (fileName) =>\n current.host.pipe(\n Option.match({\n onSome: (host) => host.fileExists(toCaller(fileName)),\n onNone: () => serverFS.useOS,\n }),\n ),\n directoryExists: (directoryName) =>\n current.host.pipe(\n Option.match({\n onSome: (host) => directoryExistsOf(host, directoryName),\n onNone: () => serverFS.useOS,\n }),\n ),\n getAccessibleEntries: serverFS.useOS,\n readFile: serverFS.useOS,\n realpath: serverFS.useOS,\n stat: serverFS.useOS,\n writeFile: serverFS.useOS,\n removeFile: serverFS.useOS,\n};\n\nconst createResolverCache = (): ((compilerOptions: object) => ModuleResolver) => {\n const api = new API({ cwd: CWD, fs: callerFileSystem });\n const byOptions = new Map<string, ModuleResolver>();\n return (compilerOptions) => {\n const key = toJson(compilerOptions);\n return byOptions.getOrInsertComputed(key, () => {\n const { options } = api.parseJsonConfigFileContent(\n { compilerOptions },\n { configDirectory: CWD },\n );\n return api.createModuleResolver(options);\n });\n };\n};\n\nconst resolverCache: { value: Option.Option<(compilerOptions: object) => ModuleResolver> } = {\n value: Option.none(),\n};\n\nconst resolverFor = (compilerOptions: object): ModuleResolver =>\n resolverCache.value.pipe(\n Option.getOrElse(() => {\n const created = createResolverCache();\n resolverCache.value = Option.some(created);\n return created;\n }),\n )(compilerOptions);\n\nconst resolveModuleName = (\n ...[moduleName, containingFile, compilerOptions, host]: ResolveArguments\n): Resolution => {\n const containingPath = toRootedFilePath(containingFile, CWD);\n current.host = Option.some(host);\n current.relative = containingPath !== containingFile;\n const { resolvedModule } = resolverFor(compilerOptions).resolveModuleName(\n moduleName,\n toRootedDirectoryPath(\"..\", rootedDirectoryPathFromPath(containingPath)),\n );\n return {\n resolvedModule: pipe(\n Option.fromNullishOr(resolvedModule),\n Option.map(({ resolvedFileName }) => ({ resolvedFileName: toCaller(resolvedFileName) })),\n Option.getOrUndefined,\n ),\n };\n};\n\nconst ts = {\n resolveModuleName,\n sys: {},\n ModuleKind: {},\n ModuleResolutionKind: {},\n ModuleDetectionKind: {},\n NewLineKind: {},\n ScriptTarget: {},\n} as const;\n\nexport default ts;\n","// src/fsd-aware-traverse.ts\nimport { basename, join, parse } from \"node:path\";\n\n// src/definitions.ts\nvar layerSequence = [\n \"shared\",\n \"entities\",\n \"features\",\n \"widgets\",\n \"pages\",\n \"app\"\n];\nvar unslicedLayers = [\"shared\", \"app\"];\nvar conventionalSegmentNames = [\"ui\", \"api\", \"lib\", \"model\", \"config\"];\nvar crossReferenceToken = \"@x\";\n\n// src/fsd-aware-traverse.ts\nfunction hasPrefix(path) {\n return /^([0-9]_|_)/.test(path);\n}\nfunction removePrefix(path) {\n return path.replace(/^([0-9]_|_)/, \"\");\n}\nfunction getLayers(fsdRoot) {\n return Object.fromEntries(\n fsdRoot.children.reduce(\n (acc, child) => {\n if (child.type !== \"folder\") {\n return acc;\n }\n const name = basename(child.path);\n const layer = layerSequence[layerSequence.indexOf(removePrefix(name))];\n if (layer) {\n const existingLayer = acc.find((el) => el[0] === layer);\n if (!existingLayer) {\n acc.push([layer, child]);\n } else if (hasPrefix(name) && !hasPrefix(basename(existingLayer[1].path))) {\n acc.splice(acc.indexOf(existingLayer), 1, [layer, child]);\n }\n }\n return acc;\n },\n []\n )\n );\n}\nfunction getSlices(slicedLayer, additionalSegmentNames = []) {\n const slices = {};\n function traverse(folder, pathPrefix = \"\") {\n if (isSlice(folder, additionalSegmentNames)) {\n slices[join(pathPrefix, basename(folder.path))] = folder;\n } else {\n folder.children.forEach((child) => {\n if (child.type === \"folder\") {\n traverse(child, join(pathPrefix, basename(folder.path)));\n }\n });\n }\n }\n for (const child of slicedLayer.children) {\n if (child.type === \"folder\") {\n traverse(child);\n }\n }\n return slices;\n}\nfunction getSegments(sliceOrUnslicedLayer) {\n return Object.fromEntries(\n sliceOrUnslicedLayer.children.filter((child) => !isIndex(child)).map((child) => [parse(child.path).name, child])\n );\n}\nfunction getAllSlices(fsdRoot, additionalSegmentNames = []) {\n return Object.entries(getLayers(fsdRoot)).filter(([, layer]) => isSliced(layer)).reduce((slices, [layerName, layer]) => {\n return {\n ...slices,\n ...Object.fromEntries(\n Object.entries(getSlices(layer, additionalSegmentNames)).map(\n ([name, slice]) => [\n name,\n { ...slice, layerName }\n ]\n )\n )\n };\n }, {});\n}\nfunction getAllSegments(fsdRoot) {\n return Object.entries(getLayers(fsdRoot)).flatMap(([layerName, layer]) => {\n if (isSliced(layer)) {\n return Object.entries(getSlices(layer)).flatMap(\n ([sliceName, slice]) => Object.entries(getSegments(slice)).map(([segmentName, segment]) => ({\n segment,\n segmentName,\n sliceName,\n layerName\n }))\n );\n } else {\n return Object.entries(getSegments(layer)).map(\n ([segmentName, segment]) => ({\n segment,\n segmentName,\n sliceName: null,\n layerName\n })\n );\n }\n });\n}\nfunction isSliced(layerOrName) {\n const name = typeof layerOrName === \"string\" ? layerOrName : layerOrName.path;\n return !unslicedLayers.includes(removePrefix(basename(name)));\n}\nfunction getIndexes(fileOrFolder) {\n if (fileOrFolder.type === \"file\") {\n return [fileOrFolder];\n }\n return fileOrFolder.children.filter(isIndex);\n}\nfunction isIndex(fileOrFolder) {\n if (fileOrFolder.type === \"file\") {\n const separator = \".\";\n const parsedFileName = parse(fileOrFolder.path).name;\n return parsedFileName.split(separator).at(0) === \"index\";\n }\n return false;\n}\nfunction isCrossImportPublicApi(file, {\n inSlice,\n forSlice,\n layerPath\n}) {\n const { dir, name } = parse(file.path);\n if (isIndex(file)) {\n return dir === join(layerPath, inSlice, \"@x\", forSlice);\n }\n return name === forSlice && dir === join(layerPath, inSlice, \"@x\");\n}\nfunction isSlice(folder, additionalSegmentNames = []) {\n return folder.children.some(\n (child) => conventionalSegmentNames.concat(additionalSegmentNames).includes(parse(child.path).name)\n );\n}\n\n// src/resolve-import.ts\nimport { sep } from \"node:path\";\nimport ts from \"typescript\";\nfunction resolveImport(importedPath, importerPath, tsCompilerOptions, fileExists, directoryExists) {\n return ts.resolveModuleName(\n importedPath,\n importerPath,\n normalizeCompilerOptions(tsCompilerOptions),\n {\n ...ts.sys,\n fileExists,\n directoryExists\n }\n ).resolvedModule?.resolvedFileName?.replaceAll(\"/\", sep) ?? null;\n}\nvar imperfectKeys = {\n module: ts.ModuleKind,\n moduleResolution: {\n ...ts.ModuleResolutionKind,\n node: ts.ModuleResolutionKind.Node10\n },\n moduleDetection: ts.ModuleDetectionKind,\n newLine: ts.NewLineKind,\n target: ts.ScriptTarget\n};\nfunction normalizeCompilerOptions(compilerOptions) {\n return Object.fromEntries(\n Object.entries(compilerOptions).map(([key, value]) => {\n if (Object.keys(imperfectKeys).includes(key) && typeof value === \"string\") {\n for (const [enumKey, enumValue] of Object.entries(\n imperfectKeys[key]\n )) {\n if (enumKey.toLowerCase() === value.toLowerCase()) {\n return [key, enumValue];\n }\n }\n }\n return [key, value];\n })\n );\n}\nexport {\n conventionalSegmentNames,\n crossReferenceToken,\n getAllSegments,\n getAllSlices,\n getIndexes,\n getLayers,\n getSegments,\n getSlices,\n isCrossImportPublicApi,\n isIndex,\n isSlice,\n isSliced,\n layerSequence,\n resolveImport,\n unslicedLayers\n};\n","import { join, sep, basename, relative, extname, resolve, dirname } from 'path';\nimport { getLayers, getSegments, getAllSlices, isSliced, getSlices, isCrossImportPublicApi, layerSequence, unslicedLayers, getIndexes, crossReferenceToken, getAllSegments, isSlice, conventionalSegmentNames, isIndex, resolveImport } from '@feature-sliced/filesystem';\nimport * as fs from 'fs';\nimport { existsSync, statSync, readFileSync } from 'fs';\nimport { parse } from 'tsconfck';\nimport { isBuiltin } from 'module';\nimport { Parser, Language, Query } from 'web-tree-sitter';\nimport pluralize from 'pluralize';\nimport { distance } from 'fastest-levenshtein';\n\n// ../toolkit/dist/index.js\nfunction findAllRecursively(folder, predicate) {\n const result = [];\n function walk(entry) {\n if (predicate(entry)) {\n result.push(entry);\n }\n if (entry.type === \"folder\") {\n for (const child of entry.children) {\n walk(child);\n }\n }\n }\n walk(folder);\n return result;\n}\nfunction enableSpecificRules(plugin2, rulesToEnable, options) {\n const namesOfRulesToEnable = rulesToEnable.map((ruleToEnable) => ruleToEnable.name);\n return [\n plugin2,\n {\n rules: Object.fromEntries(\n plugin2.ruleDefinitions.filter((rule) => namesOfRulesToEnable.includes(rule.name)).map((rule) => [rule.name, \"error\"])\n )\n }\n ];\n}\nfunction createConfigs(configs2) {\n return configs2;\n}\nfunction createPlugin(plugin2) {\n return plugin2;\n}\n\n// src/constants.ts\nvar NAMESPACE = \"fsd\";\n\n// src/ambiguous-slice-names/index.ts\nvar ambiguousSliceNames = {\n name: `${NAMESPACE}/ambiguous-slice-names`,\n check(root) {\n const diagnostics = [];\n const layers = getLayers(root);\n const sharedLayer = layers.shared;\n if (sharedLayer === void 0) {\n return { diagnostics };\n }\n const segmentNamesInShared = Object.keys(getSegments(sharedLayer));\n for (const [sliceName, slice] of Object.entries(getAllSlices(root))) {\n const pathSegments = sliceName.split(sep);\n const matchingSegment = segmentNamesInShared.find((segmentName) => pathSegments.includes(segmentName));\n if (matchingSegment === void 0) {\n continue;\n }\n if (matchingSegment === sliceName) {\n diagnostics.push({\n message: `Slice \"${sliceName}\" could be confused with a segment from Shared with the same name`,\n location: { path: slice.path }\n });\n continue;\n }\n const segmentIndex = pathSegments.indexOf(matchingSegment);\n const isGroup = segmentIndex < pathSegments.length - 1;\n if (!isGroup) {\n diagnostics.push({\n message: `Slice \"${sliceName}\" could be confused with a segment \"${matchingSegment}\" from Shared`,\n location: { path: slice.path }\n });\n } else {\n const layer = layers[slice.layerName];\n if (layer === void 0) {\n continue;\n }\n const pathSegmentsToGroup = pathSegments.slice(0, segmentIndex + 1);\n const group = pathSegmentsToGroup.reduce(\n (folder, segmentName) => folder?.children.find((child) => child.type === \"folder\" && basename(child.path) === segmentName),\n layer\n );\n if (group !== void 0) {\n diagnostics.push({\n message: `Slice group \"${pathSegmentsToGroup.join(sep)}\" could be confused with a segment \"${matchingSegment}\" from Shared`,\n location: { path: group.path }\n });\n }\n }\n }\n return { diagnostics };\n }\n};\nvar ambiguous_slice_names_default = ambiguousSliceNames;\nfunction groupSlices(sliceNames) {\n const groups = {};\n for (const sliceName of sliceNames) {\n const segments = sliceName.split(sep);\n const name = segments.pop();\n const group = segments.join(sep);\n if (name !== void 0) {\n groups[group] ??= [];\n groups[group].push(name);\n }\n }\n return groups;\n}\n\n// src/excessive-slicing/index.ts\nvar THRESHOLDS = {\n entities: 20,\n features: 20,\n widgets: 20,\n pages: 20\n};\nvar excessiveSlicing = {\n name: `${NAMESPACE}/excessive-slicing`,\n check(root) {\n const diagnostics = [];\n for (const [layerName, layer] of Object.entries(getLayers(root))) {\n if (!isSliced(layer) || !(layerName in THRESHOLDS)) {\n continue;\n }\n const sliceGroups = groupSlices(Object.keys(getSlices(layer)));\n const threshold = THRESHOLDS[layerName];\n for (const [group, slices] of Object.entries(sliceGroups)) {\n if (slices.length <= threshold) {\n continue;\n }\n if (group === \"\") {\n diagnostics.push({\n message: `Layer \"${layerName}\" has ${slices.length} ungrouped slices, which is above the recommended threshold of ${threshold}. Consider grouping them or moving the code inside to the layer where it's used.`,\n location: { path: layer.path }\n });\n } else {\n diagnostics.push({\n message: `Slice group \"${group}\" has ${slices.length} slices, which is above the recommended threshold of ${threshold}. Consider grouping them or moving the code inside to the layer where it's used.`,\n location: { path: join(layer.path, group) }\n });\n }\n }\n }\n return { diagnostics };\n }\n};\nvar excessive_slicing_default = excessiveSlicing;\nfunction indexSourceFiles(root) {\n const index = {};\n function walk(node, metadata) {\n if (node.type === \"file\") {\n index[node.path] = { ...metadata, file: node };\n } else {\n for (const child of node.children) {\n walk(child, metadata);\n }\n }\n }\n for (const [layerName, layer] of Object.entries(getLayers(root))) {\n layer.children.filter((child) => child.type === \"file\").forEach(\n (file) => walk(file, { layerName, layerPath: layer.path, sliceName: null, segmentName: null })\n );\n if (!isSliced(layer)) {\n for (const [segmentName, segment] of Object.entries(getSegments(layer))) {\n walk(segment, { layerName, layerPath: layer.path, sliceName: null, segmentName });\n }\n } else {\n for (const [sliceName, slice] of Object.entries(getSlices(layer))) {\n for (const [segmentName, segment] of Object.entries(getSegments(slice))) {\n walk(segment, { layerName, layerPath: layer.path, sliceName, segmentName });\n }\n const indexes = getIndexes(slice);\n for (const index2 of indexes) {\n walk(index2, { layerName, layerPath: layer.path, sliceName, segmentName: null });\n }\n }\n }\n }\n return index;\n}\nfunction collectRelatedTsConfigs(payload) {\n const configs2 = [];\n const setTsConfigs = ({ tsconfig, tsconfigFile, referenced, extended }) => {\n configs2.push(resolveRelativePathsInMergedConfig({ tsconfig, tsconfigFile, extended }));\n referenced?.forEach(setTsConfigs);\n };\n setTsConfigs(payload);\n return configs2;\n}\nfunction resolveRelativePathsInMergedConfig(configParseResult) {\n const { tsconfig: mergedConfig, extended } = configParseResult;\n if (\n // if there's no config it needs to be handled somewhere else\n !mergedConfig || // if the merged config does not have compilerOptions, there is nothing to resolve\n !mergedConfig.compilerOptions || // if the merged config does not have paths in compilerOptions there's nothing to resolve\n !mergedConfig.compilerOptions.paths\n ) {\n return mergedConfig;\n }\n const firstConfigWithPaths = findFirstConfigWithPaths(extended || []) || configParseResult;\n const absolutePaths = makeRelativePathAliasesAbsolute(configParseResult, firstConfigWithPaths);\n return {\n ...mergedConfig,\n compilerOptions: {\n ...mergedConfig.compilerOptions,\n paths: absolutePaths\n }\n };\n}\nfunction findFirstConfigWithPaths(extended) {\n for (const parseResult of extended) {\n const { tsconfig } = parseResult;\n if (tsconfig.compilerOptions?.paths) {\n return parseResult;\n }\n }\n}\nfunction makeRelativePathAliasesAbsolute(finalConfig, firstConfigWithPaths) {\n const { tsconfig: mergedConfig } = finalConfig;\n const {\n compilerOptions: { paths, baseUrl }\n } = mergedConfig;\n const absolutePaths = {};\n if (!firstConfigWithPaths.tsconfigFile) {\n return mergedConfig.compilerOptions.paths;\n }\n for (const entries of Object.entries(paths)) {\n const [key, paths2] = entries;\n absolutePaths[key] = paths2.map(\n (relativePath) => baseUrl ? resolve(dirname(firstConfigWithPaths.tsconfigFile), baseUrl, relativePath) : resolve(dirname(firstConfigWithPaths.tsconfigFile), relativePath)\n );\n }\n return absolutePaths;\n}\nfunction createFSCache() {\n const cache = /* @__PURE__ */ new Map();\n function has(key, mtimeSourcePath = key) {\n const data = cache.get(key);\n if (data === void 0) return false;\n return data.mtime === statSync(mtimeSourcePath, { throwIfNoEntry: false })?.mtimeMs;\n }\n function get(key, mtimeSourcePath = key) {\n if (!has(key, mtimeSourcePath)) return void 0;\n return cache.get(key).value;\n }\n function set(key, value, mtimeSourcePath = key) {\n const mtime = statSync(mtimeSourcePath, { throwIfNoEntry: false })?.mtimeMs;\n if (mtime === void 0) return;\n cache.set(key, { mtime, value });\n }\n return { has, get, set };\n}\nvar resolutionCache = createFSCache();\nfunction resolveDependency(importedPath, importerPath, tsConfigs, fileExists = existsSync, directoryExists = existsSync) {\n const useCache = fileExists === existsSync;\n if (useCache) {\n const cached = resolutionCache.get(`${importerPath}\\0${importedPath}`, importerPath);\n if (cached !== void 0) return cached;\n }\n let resolvedDependency = null;\n for (const config of tsConfigs) {\n resolvedDependency = resolveImport(\n importedPath,\n importerPath,\n config?.compilerOptions ?? {},\n fileExists,\n directoryExists\n );\n if (resolvedDependency !== null) {\n break;\n }\n }\n if (useCache) {\n resolutionCache.set(`${importerPath}\\0${importedPath}`, resolvedDependency, importerPath);\n }\n return resolvedDependency;\n}\nvar parserDirectory = import.meta.dirname;\nawait Parser.init();\nvar parserPaths = [\n join(parserDirectory, \"parsers\", \"tree-sitter-tsx.wasm\"),\n join(parserDirectory, \"parsers\", \"tree-sitter-svelte.wasm\"),\n join(parserDirectory, \"parsers\", \"tree-sitter-astro.wasm\"),\n join(parserDirectory, \"parsers\", \"tree-sitter-vue.wasm\")\n];\nvar tsx;\nvar svelte;\nvar astro;\nvar vue;\ntry {\n ;\n [tsx, svelte, astro, vue] = await Promise.all(parserPaths.map((path) => Language.load(path)));\n} catch (parallelError) {\n console.error(\n \"@feature-sliced/steiger-plugin: recovered from a known Node.js 20 bug while loading tree-sitter parsers in parallel. Loading them sequentially instead. Set DEBUG=1 for the full error.\"\n );\n if (process.env.DEBUG) {\n console.error(parallelError);\n }\n tsx = await Language.load(parserPaths[0]);\n svelte = await Language.load(parserPaths[1]);\n astro = await Language.load(parserPaths[2]);\n vue = await Language.load(parserPaths[3]);\n}\nvar extractors = [\n {\n type: \"tsx\",\n extensions: [\".tsx\", \".jsx\", \".ts\", \".js\", \".cjs\", \".mjs\"],\n language: tsx,\n queries: [\n {\n query: new Query(tsx, \"(import_statement source: (string (string_fragment) @source)) @statement\"),\n type: \"static\"\n },\n {\n query: new Query(\n tsx,\n `(program\n (lexical_declaration\n (variable_declarator\n value: (call_expression\n function: (identifier) @function.name (#eq? @function.name \"require\")\n arguments: (arguments (string (string_fragment) @source)))) @statement))`\n ),\n type: \"static\"\n },\n {\n query: new Query(\n tsx,\n `(call_expression\n \tfunction: (import)\n arguments: (arguments (string (string_fragment) @source))) @statement`\n ),\n type: \"dynamic\"\n },\n {\n query: new Query(\n tsx,\n `(program\n (expression_statement\n (call_expression\n function: (identifier) @function.name (#eq? @function.name \"require\")\n \t\t\targuments: (arguments (string (string_fragment) @source)))) @statement)\n `\n ),\n type: \"dynamic\"\n },\n {\n // Every `export ... from '...'`, whatever it exports. Requiring `source` excludes a local\n // `export { a }`, which names no other module. `reExportKind` reads the shape of the\n // statement (`{ a }`, `*`, `* as ns`) off the syntax tree.\n query: new Query(tsx, \"(export_statement source: (string (string_fragment) @source)) @statement\"),\n type: \"re-export\"\n }\n ],\n injections: []\n },\n {\n type: \"svelte\",\n extensions: [\".svelte\"],\n language: svelte,\n queries: [],\n injections: [\n {\n query: new Query(svelte, \"(script_element (raw_text) @tsx)\"),\n lang: \"tsx\"\n }\n ]\n },\n {\n type: \"astro\",\n extensions: [\".astro\"],\n language: astro,\n queries: [],\n injections: [\n {\n query: new Query(astro, \"(frontmatter_js_block) @tsx\"),\n lang: \"tsx\"\n }\n ]\n },\n {\n type: \"vue\",\n extensions: [\".vue\"],\n language: vue,\n queries: [],\n injections: [\n {\n query: new Query(vue, \"(document (script_element (raw_text) @tsx))\"),\n lang: \"tsx\"\n }\n ]\n }\n];\nfunction getSourceType(sourcePath) {\n const extension = extname(sourcePath);\n for (const extractor of extractors) {\n if (extractor.extensions.includes(extension)) {\n return extractor.type;\n }\n }\n return void 0;\n}\nfunction rangeOf(node) {\n return {\n start: { line: node.startPosition.row + 1, column: node.startPosition.column + 1 },\n end: { line: node.endPosition.row + 1, column: node.endPosition.column + 1 }\n };\n}\nfunction reExportKind(statement) {\n for (const child of statement.children) {\n if (child.type === \"namespace_export\") return \"namespace\";\n if (child.type === \"export_clause\") return \"named\";\n if (child.type === \"*\") return \"wildcard\";\n }\n return void 0;\n}\nfunction collectStatements(extractor, tree) {\n const result = [];\n for (const { query, type } of extractor.queries) {\n for (const match of query.matches(tree.rootNode)) {\n const captures = new Map(match.captures.map((capture) => [capture.name, capture.node]));\n const statement = captures.get(\"statement\");\n const source = captures.get(\"source\");\n if (statement === void 0 || source === void 0) continue;\n const common = {\n source: source.text,\n builtIn: isBuiltin(source.text),\n sourceRange: rangeOf(source),\n statementRange: rangeOf(statement)\n };\n if (type === \"re-export\") {\n const kind = reExportKind(statement);\n if (kind === void 0) continue;\n result.push({ type: \"re-export\", kind, ...common });\n } else {\n result.push({ type: \"import\", dynamic: type === \"dynamic\", ...common });\n }\n }\n }\n return result;\n}\nfunction forEachSyntaxTree(path, visit) {\n const extension = extname(path);\n const extractor = extractors.find((extractor2) => extractor2.extensions.includes(extension));\n if (!extractor) throw new Error(`No extractor found for \"${extension}\"`);\n const sourceCode = readFileSync(path, \"utf8\");\n const parser = new Parser();\n parser.setLanguage(extractor.language);\n const tree = parser.parse(sourceCode);\n if (tree === null) return;\n visit(extractor, tree);\n for (const { query, lang } of extractor.injections) {\n const injectedExtractor = extractors.find((extractor2) => extractor2.type === lang);\n if (!injectedExtractor) throw new Error(`No extractor found for \"${lang}\"`);\n const matches = query.matches(tree.rootNode);\n const includedRanges = [];\n for (const match of matches) {\n for (const capture of match.captures) {\n if (capture.name === lang) {\n includedRanges.push({\n startIndex: capture.node.startIndex,\n endIndex: capture.node.endIndex,\n startPosition: capture.node.startPosition,\n endPosition: capture.node.endPosition\n });\n }\n }\n }\n parser.setLanguage(injectedExtractor.language);\n const injectedTree = parser.parse(sourceCode, null, { includedRanges });\n if (injectedTree === null) continue;\n visit(injectedExtractor, injectedTree);\n injectedTree.delete();\n }\n tree.delete();\n}\nfunction comparePositions(a, b) {\n return a.start.line - b.start.line || a.start.column - b.start.column;\n}\nfunction analyzeSourceFile(path) {\n const statements = [];\n forEachSyntaxTree(path, (extractor, tree) => {\n statements.push(...collectStatements(extractor, tree));\n });\n statements.sort((a, b) => comparePositions(a.statementRange, b.statementRange));\n return { statements };\n}\nvar moduleAnalysisCache = createFSCache();\nasync function analyzeModule(path) {\n let analysis = moduleAnalysisCache.get(path);\n if (!analysis) {\n analysis = analyzeSourceFile(path);\n moduleAnalysisCache.set(path, analysis);\n }\n return analysis;\n}\nasync function extractDependencies(path, options) {\n const includeBuiltIns = false;\n const { statements } = await analyzeModule(path);\n const result = [];\n for (const statement of statements) {\n if (statement.type === \"re-export\") {\n if (statement.builtIn === true && includeBuiltIns === false) continue;\n result.push({\n path: statement.source,\n builtIn: statement.builtIn,\n dynamic: false,\n start: statement.sourceRange.start,\n end: statement.sourceRange.end\n });\n continue;\n }\n if (statement.type === \"import\") {\n if (statement.builtIn === true) continue;\n result.push({\n path: statement.source,\n builtIn: statement.builtIn,\n dynamic: statement.dynamic,\n start: statement.sourceRange.start,\n end: statement.sourceRange.end\n });\n }\n }\n return result;\n}\nasync function extractReExports(path) {\n const { statements } = await analyzeModule(path);\n return statements.filter((statement) => statement.type === \"re-export\");\n}\n\n// src/forbidden-imports/index.ts\nvar forbiddenImports = {\n name: `${NAMESPACE}/forbidden-imports`,\n async check(root) {\n const diagnostics = [];\n const parseResult = await parse(root.children[0]?.path ?? root.path);\n const tsConfigs = collectRelatedTsConfigs(parseResult);\n const sourceFileIndex = indexSourceFiles(root);\n for (const sourceFile of Object.values(sourceFileIndex)) {\n const sourceType = getSourceType(sourceFile.file.path);\n if (!sourceType) continue;\n const dependencies = await extractDependencies(sourceFile.file.path);\n for (const dependency of dependencies) {\n const resolvedDependency = resolveDependency(\n dependency.path,\n sourceFile.file.path,\n tsConfigs,\n fs.existsSync,\n fs.existsSync\n );\n if (resolvedDependency === null) {\n continue;\n }\n const dependencyLocation = sourceFileIndex[resolvedDependency];\n if (dependencyLocation === void 0) {\n continue;\n }\n if (sourceFile.layerName === dependencyLocation.layerName && sourceFile.sliceName !== dependencyLocation.sliceName) {\n if (dependencyLocation.sliceName !== null && sourceFile.sliceName !== null && !isCrossImportPublicApi(dependencyLocation.file, {\n inSlice: dependencyLocation.sliceName,\n forSlice: sourceFile.sliceName,\n layerPath: dependencyLocation.layerPath\n })) {\n diagnostics.push({\n message: `Forbidden cross-import from slice \"${dependencyLocation.sliceName}\".`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n }\n } else {\n const thisLayerIndex = layerSequence.indexOf(sourceFile.layerName);\n const dependencyLayerIndex = layerSequence.indexOf(dependencyLocation.layerName);\n if (thisLayerIndex < dependencyLayerIndex) {\n diagnostics.push({\n message: `Forbidden import from higher layer \"${dependencyLocation.layerName}\".`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar forbidden_imports_default = forbiddenImports;\nvar { isPlural, plural, singular } = pluralize;\nvar neutralWords = /* @__PURE__ */ new Set([\"k8s\", \"kubernetes\", \"media\"]);\nvar inconsistentNaming = {\n name: `${NAMESPACE}/inconsistent-naming`,\n check(root) {\n const diagnostics = [];\n const { entities } = getLayers(root);\n if (entities === void 0) {\n return { diagnostics };\n }\n const slices = getSlices(entities);\n const sliceNames = groupSlices(Object.keys(slices));\n for (const [groupPrefix, group] of Object.entries(sliceNames)) {\n const namesToCheck = group.filter((g) => !isNeutralWord(g));\n const pluralNames = [];\n const singularNames = [];\n for (const name of namesToCheck) {\n if (isPlural(name)) {\n pluralNames.push(name);\n } else {\n singularNames.push(name);\n }\n }\n if (pluralNames.length > 0 && singularNames.length > 0) {\n const message = \"Inconsistent pluralization of slice names\";\n if (pluralNames.length >= singularNames.length) {\n diagnostics.push({\n message: `${message}. Prefer all plural names`,\n fixes: singularNames.map((name) => ({\n type: \"rename\",\n path: join(entities.path, groupPrefix, name),\n newName: plural(name)\n })),\n location: { path: join(entities.path, groupPrefix) }\n });\n } else {\n diagnostics.push({\n message: `${message}. Prefer all singular names`,\n fixes: pluralNames.map((name) => ({\n type: \"rename\",\n path: join(entities.path, groupPrefix, name),\n newName: singular(name)\n })),\n location: { path: join(entities.path, groupPrefix) }\n });\n }\n }\n }\n return { diagnostics };\n }\n};\nvar inconsistent_naming_default = inconsistentNaming;\nfunction isNeutralWord(name) {\n return neutralWords.has(name.toLowerCase());\n}\nvar insignificantSlice = {\n name: `${NAMESPACE}/insignificant-slice`,\n async check(root) {\n const diagnostics = [];\n const references = await traceSliceReferences(root);\n for (const [sourceLocationKey, targetLocationKeys] of references) {\n const [sourceLayerName] = sourceLocationKey.split(sep, 2);\n if (!isSliced(sourceLayerName) || sourceLayerName === \"pages\") {\n continue;\n }\n if (targetLocationKeys.size === 1) {\n const referenceLocationKey = [...targetLocationKeys][0];\n if (unslicedLayers.includes(referenceLocationKey)) {\n if (referenceLocationKey !== \"app\") {\n diagnostics.push({\n message: `This slice has only one reference on layer \"${referenceLocationKey}\". Consider moving this code to \"${referenceLocationKey}\".`,\n location: { path: join(root.path, sourceLocationKey) }\n });\n }\n } else {\n diagnostics.push({\n message: `This slice has only one reference in slice \"${referenceLocationKey}\". Consider merging them.`,\n location: { path: join(root.path, sourceLocationKey) }\n });\n }\n } else if (targetLocationKeys.size === 0) {\n diagnostics.push({\n message: `This slice has no references. Consider removing it.`,\n location: { path: join(root.path, sourceLocationKey) }\n });\n }\n }\n return { diagnostics };\n }\n};\nvar insignificant_slice_default = insignificantSlice;\nasync function traceSliceReferences(root) {\n const sourceFileIndex = indexSourceFiles(root);\n const parseResult = await parse(root.children[0]?.path ?? root.path);\n const tsConfigs = collectRelatedTsConfigs(parseResult);\n const references = /* @__PURE__ */ new Map();\n for (const sourceFile of Object.values(sourceFileIndex)) {\n const thisFileLocationKey = [sourceFile.layerName, sourceFile.sliceName].filter(Boolean).join(sep);\n const sourceType = getSourceType(sourceFile.file.path);\n if (!sourceType) continue;\n const dependencies = await extractDependencies(sourceFile.file.path);\n for (const dependency of dependencies) {\n const resolvedDependency = resolveDependency(\n dependency.path,\n sourceFile.file.path,\n tsConfigs,\n fs.existsSync,\n fs.existsSync\n );\n if (resolvedDependency === null) {\n continue;\n }\n const dependencyLocation = sourceFileIndex[resolvedDependency];\n if (dependencyLocation === void 0 || sourceFile.layerName === dependencyLocation.layerName) {\n continue;\n }\n const dependencyLocationKey = [dependencyLocation.layerName, dependencyLocation.sliceName].filter(Boolean).join(sep);\n if (thisFileLocationKey !== dependencyLocationKey) {\n if (!references.has(dependencyLocationKey)) {\n references.set(dependencyLocationKey, /* @__PURE__ */ new Set());\n }\n references.get(dependencyLocationKey)?.add(thisFileLocationKey);\n }\n }\n if (!references.has(thisFileLocationKey)) {\n references.set(thisFileLocationKey, /* @__PURE__ */ new Set());\n }\n }\n return references;\n}\nvar exceptionLayers = [\"app\"];\nvar noLayerPublicApi = {\n name: `${NAMESPACE}/no-layer-public-api`,\n check(root) {\n const diagnostics = [];\n for (const [layerName, layer] of Object.entries(getLayers(root))) {\n const indexes = getIndexes(layer);\n const notAmongExceptions = !exceptionLayers.includes(layerName);\n if (notAmongExceptions) {\n for (const index of indexes) {\n diagnostics.push({\n message: `Layer \"${layerName}\" should not have an index file`,\n location: { path: index.path }\n });\n }\n }\n }\n return { diagnostics };\n }\n};\nvar no_layer_public_api_default = noLayerPublicApi;\nvar noPublicApiSidestep = {\n name: `${NAMESPACE}/no-public-api-sidestep`,\n async check(root) {\n const diagnostics = [];\n const parseResult = await parse(root.children[0]?.path ?? root.path);\n const tsConfigs = collectRelatedTsConfigs(parseResult);\n const sourceFileIndex = indexSourceFiles(root);\n for (const sourceFile of Object.values(sourceFileIndex)) {\n const sourceType = getSourceType(sourceFile.file.path);\n if (!sourceType) continue;\n const dependencies = await extractDependencies(sourceFile.file.path);\n for (const dependency of dependencies) {\n const resolvedDependency = resolveDependency(\n dependency.path,\n sourceFile.file.path,\n tsConfigs,\n fs.existsSync,\n fs.existsSync\n );\n if (resolvedDependency === null) {\n continue;\n }\n const dependencyLocation = sourceFileIndex[resolvedDependency];\n if (dependencyLocation === void 0) {\n continue;\n }\n if (sourceFile.layerName === dependencyLocation.layerName && (!isSliced(dependencyLocation.layerName) || sourceFile.sliceName === dependencyLocation.sliceName)) {\n continue;\n }\n if (isSliced(dependencyLocation.layerName)) {\n if (dependencyLocation.segmentName !== null && dependencyLocation.segmentName !== crossReferenceToken) {\n diagnostics.push({\n message: `Forbidden sidestep of public API when importing from \"${dependency.path}\".`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n }\n } else if (dependencyLocation.segmentName !== null) {\n const layer = getLayers(root)[dependencyLocation.layerName];\n if (layer === void 0) {\n continue;\n }\n const segment = getSegments(layer)[dependencyLocation.segmentName];\n if (segment === void 0) {\n continue;\n }\n const segmentIndexes = getIndexes(segment);\n if (segment.type === \"folder\" && !segmentIndexes.map((segmentIndex) => segmentIndex.path).includes(resolvedDependency)) {\n const { layerName, segmentName } = dependencyLocation;\n if (layerName === \"shared\" && [\"ui\", \"lib\"].includes(segmentName)) {\n const pathInSegment = relative(segment.path, resolvedDependency);\n const topLevelFolder = segment.children.find(\n (child) => child.type === \"folder\" && basename(child.path) === pathInSegment.split(sep)[0]\n );\n if (topLevelFolder !== void 0) {\n const topLevelFolderIndexes = getIndexes(topLevelFolder);\n if (!topLevelFolderIndexes.map((topLevelFolder2) => topLevelFolder2.path).includes(resolvedDependency)) {\n diagnostics.push({\n message: `Forbidden sidestep of public API when importing from \"${dependency.path}\".`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n }\n }\n } else {\n diagnostics.push({\n message: `Forbidden sidestep of public API when importing from \"${dependency.path}\".`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n }\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar no_public_api_sidestep_default = noPublicApiSidestep;\nvar noReservedFolderNames = {\n name: `${NAMESPACE}/no-reserved-folder-names`,\n check(root) {\n const diagnostics = [];\n for (const { segment } of getAllSegments(root)) {\n if (segment.type === \"file\") {\n continue;\n }\n for (const child of segment.children) {\n if (child.type === \"file\") {\n continue;\n }\n for (const violatingFolder of findAllRecursively(\n child,\n (entry) => entry.type === \"folder\" && conventionalSegmentNames.concat(crossReferenceToken).includes(basename(entry.path))\n )) {\n const reservedName = basename(violatingFolder.path);\n if (reservedName === crossReferenceToken) {\n diagnostics.push({\n message: `Having a folder with the name \"${crossReferenceToken}\" inside a segment could be confusing because that name is reserved for cross-import public APIs. Consider renaming it.`,\n location: { path: violatingFolder.path }\n });\n } else {\n diagnostics.push({\n message: `Having a folder with the name \"${basename(violatingFolder.path)}\" inside a segment could be confusing because that name is commonly used for segments. Consider renaming it.`,\n location: { path: violatingFolder.path }\n });\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar no_reserved_folder_names_default = noReservedFolderNames;\nvar noSegmentlessSlices = {\n name: `${NAMESPACE}/no-segmentless-slices`,\n check(root) {\n const diagnostics = [];\n for (const layer of Object.values(getLayers(root))) {\n if (!isSliced(layer)) {\n continue;\n }\n let sliceCandidates = layer.children.filter((child) => child.type === \"folder\");\n while (sliceCandidates.length > 0) {\n const sliceCandidate = sliceCandidates.pop();\n if (sliceCandidate === void 0) {\n continue;\n }\n if (isSliceGroup(sliceCandidate)) {\n sliceCandidates = sliceCandidates.concat(sliceCandidate.children);\n } else {\n if (!isSlice(sliceCandidate)) {\n diagnostics.push({\n message: \"This slice has no segments. Consider dividing the code inside into segments.\",\n location: { path: sliceCandidate.path }\n });\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar no_segmentless_slices_default = noSegmentlessSlices;\nfunction isSliceGroup(folder) {\n return folder.children.length > 0 && !isSlice(folder) && folder.children.every(\n (child) => child.type === \"folder\" && (isSlice(child) || child.children.every((grandchild) => grandchild.type === \"file\") || isSliceGroup(child))\n );\n}\nvar noSegmentsOnSlicedLayers = {\n name: `${NAMESPACE}/no-segments-on-sliced-layers`,\n check(root) {\n const diagnostics = [];\n const layers = Object.values(getLayers(root));\n for (const layer of layers) {\n if (isSliced(layer)) {\n for (const directChild of layer.children) {\n if (directChild.type === \"folder\") {\n const folderName = basename(directChild.path);\n const isConventionalSegment = folderName && conventionalSegmentNames.includes(folderName);\n if (isConventionalSegment) {\n diagnostics.push({\n message: `Conventional segment \"${folderName}\" should not be a direct child of a sliced layer. Consider moving it inside a slice or, if that is a slice, consider a different name for it to avoid confusion with segments.`,\n location: { path: directChild.path }\n });\n }\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar no_segments_on_sliced_layers_default = noSegmentsOnSlicedLayers;\nvar noUiInApp = {\n name: `${NAMESPACE}/no-ui-in-app`,\n check(root) {\n const diagnostics = [];\n const layers = getLayers(root);\n if (layers.app !== void 0) {\n const segments = getSegments(layers.app);\n if (segments.ui !== void 0) {\n diagnostics.push({\n message: 'Layer \"app\" should not have \"ui\" segment.',\n location: { path: segments.ui.path }\n });\n }\n }\n return { diagnostics };\n }\n};\nvar no_ui_in_app_default = noUiInApp;\nvar publicApi = {\n name: `${NAMESPACE}/public-api`,\n check(root) {\n const diagnostics = [];\n for (const [layerName, layer] of Object.entries(getLayers(root))) {\n if (!isSliced(layer)) {\n if (layerName === \"app\") {\n continue;\n }\n for (const [segmentName, segment] of Object.entries(getSegments(layer))) {\n if (getIndexes(segment).length === 0) {\n if (![\"ui\", \"lib\"].includes(segmentName)) {\n diagnostics.push({\n message: \"This segment is missing a public API.\",\n fixes: [\n {\n type: \"create-file\",\n path: join(segment.path, `index.js`),\n // TODO: Infer better content for this file\n content: \"\"\n }\n ],\n location: { path: segment.path }\n });\n } else if (segment.type === \"folder\") {\n for (const child of segment.children) {\n if (child.type === \"folder\" && getIndexes(child).length === 0) {\n diagnostics.push({\n message: `This top-level folder in shared/${segmentName} is missing a public API.`,\n fixes: [\n {\n type: \"create-file\",\n path: join(child.path, `index.js`),\n content: \"\"\n }\n ],\n location: { path: child.path }\n });\n }\n }\n }\n }\n }\n } else {\n for (const slice of Object.values(getSlices(layer))) {\n if (getIndexes(slice).length === 0) {\n diagnostics.push({\n message: \"This slice is missing a public API.\",\n fixes: [\n {\n type: \"create-file\",\n path: join(slice.path, `index.js`),\n // TODO: Infer better content for this file\n content: \"\"\n }\n ],\n location: { path: slice.path }\n });\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar public_api_default = publicApi;\nvar wordPattern = /(?:[A-Z]+|[a-z]+)[a-z]*/g;\nvar repetitiveNaming = {\n name: `${NAMESPACE}/repetitive-naming`,\n check(root) {\n const diagnostics = [];\n for (const layer of Object.values(getLayers(root))) {\n if (!isSliced(layer)) {\n continue;\n }\n const sliceGroups = groupSlices(Object.keys(getSlices(layer)));\n for (const [group, sliceNames] of Object.entries(sliceGroups)) {\n const wordsInSliceNames = sliceNames.map(\n (name) => (name.match(wordPattern) ?? []).map((word) => word.toLowerCase())\n );\n const mostCommonWords = wordsInSliceNames.flat().reduce((acc, word) => {\n acc.set(word, (acc.get(word) ?? 0) + 1);\n return acc;\n }, /* @__PURE__ */ new Map());\n for (const [word, count] of mostCommonWords.entries()) {\n if (sliceNames.length > 2 && count >= sliceNames.length && wordsInSliceNames.every((words) => words.includes(word))) {\n diagnostics.push({\n message: `Repetitive word \"${word}\" in slice names.`,\n location: { path: join(layer.path, group) }\n });\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar repetitive_naming_default = repetitiveNaming;\nvar BAD_NAMES_GENERIC = [\n \"component\",\n \"components\",\n \"helper\",\n \"helpers\",\n \"util\",\n \"utils\",\n \"constant\",\n \"constants\",\n \"const\",\n \"consts\",\n \"type\",\n \"types\",\n \"store\",\n \"stores\",\n \"modal\",\n \"modals\",\n \"service\",\n \"services\",\n \"function\",\n \"functions\",\n \"class\",\n \"classes\",\n \"enum\",\n \"enums\",\n \"interface\",\n \"interfaces\",\n \"decorator\",\n \"decorators\",\n \"schema\",\n \"schemas\",\n \"handler\",\n \"handlers\",\n \"fixture\",\n \"fixtures\",\n \"middleware\",\n \"middlewares\",\n \"validator\",\n \"validators\",\n \"validation\",\n \"validations\",\n \"resolver\",\n \"resolvers\",\n \"mutation\",\n \"mutations\",\n \"asset\",\n \"assets\"\n];\nvar BAD_NAMES_REACT = [\"hook\", \"hooks\", \"context\", \"provider\", \"providers\"];\nvar BAD_NAMES_VUE = [\"composable\", \"composables\", \"directive\", \"directives\"];\nvar BAD_NAMES_REDUX = [\n \"action\",\n \"actions\",\n \"reducer\",\n \"reducers\",\n \"selector\",\n \"selectors\",\n \"effect\",\n \"effects\",\n \"saga\",\n \"sagas\",\n \"thunk\",\n \"thunks\"\n];\nvar BAD_NAMES_ANGULAR = [\"pipe\", \"pipes\"];\nvar BAD_NAMES = /* @__PURE__ */ new Set([\n ...BAD_NAMES_GENERIC,\n ...BAD_NAMES_REACT,\n ...BAD_NAMES_VUE,\n ...BAD_NAMES_REDUX,\n ...BAD_NAMES_ANGULAR\n]);\nvar segmentsByPurpose = {\n name: `${NAMESPACE}/segments-by-purpose`,\n check(root) {\n const diagnostics = [];\n for (const layer of Object.values(getLayers(root))) {\n if (layer === null) {\n continue;\n }\n if (!isSliced(layer)) {\n for (const [segmentName, segment] of Object.entries(getSegments(layer))) {\n if (BAD_NAMES.has(segmentName)) {\n diagnostics.push({\n message: \"This segment's name should describe the purpose of its contents, not what the contents are.\",\n location: { path: segment.path }\n });\n }\n }\n } else {\n for (const slice of Object.values(getSlices(layer))) {\n for (const [segmentName, segment] of Object.entries(getSegments(slice))) {\n if (BAD_NAMES.has(segmentName)) {\n diagnostics.push({\n message: \"This segment's name should describe the purpose of its contents, not what the contents are.\",\n location: { path: segment.path }\n });\n }\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar segments_by_purpose_default = segmentsByPurpose;\nvar THRESHOLD = 15;\nvar sharedLibGrouping = {\n name: `${NAMESPACE}/shared-lib-grouping`,\n check(root) {\n const diagnostics = [];\n const { shared } = getLayers(root);\n if (!shared) {\n return { diagnostics };\n }\n const { lib } = getSegments(shared);\n if (!lib) {\n return { diagnostics };\n }\n if (lib.type === \"folder\" && lib.children.length > THRESHOLD) {\n diagnostics.push({\n message: `Shared/lib has ${lib.children.length} modules, which is above the recommended threshold of ${THRESHOLD}. Consider grouping them.`,\n location: { path: lib.path }\n });\n }\n return { diagnostics };\n }\n};\nvar shared_lib_grouping_default = sharedLibGrouping;\nvar LEVENSHTEIN_DISTANCE_UPPER_BOUND = 3;\nvar typoInLayerName = {\n name: `${NAMESPACE}/typo-in-layer-name`,\n check(root) {\n const diagnostics = [];\n const suggestionsList = root.children.filter((child) => child.type === \"folder\").flatMap((child) => {\n const layer = basename(child.path);\n return layerSequence.map((sequenceLayer) => ({\n input: layer,\n suggestion: sequenceLayer,\n distance: distance(layer, sequenceLayer)\n })).filter((layer2) => layer2.distance <= LEVENSHTEIN_DISTANCE_UPPER_BOUND);\n }).sort((a, b) => a.distance - b.distance);\n const processedInputs = [];\n const suggestedLayers = [];\n suggestionsList.forEach((layer) => {\n if (layer.distance === 0) {\n suggestedLayers.push(layer.suggestion);\n return;\n }\n if (processedInputs.includes(layer.input)) {\n return;\n }\n if (suggestedLayers.includes(layer.suggestion)) {\n return;\n }\n processedInputs.push(layer.input);\n suggestedLayers.push(layer.suggestion);\n diagnostics.push({\n message: `Layer \"${layer.input}\" potentially contains a typo. Did you mean \"${layer.suggestion}\"?`,\n location: { path: join(root.path, layer.input) }\n });\n });\n return { diagnostics };\n }\n};\nvar typo_in_layer_name_default = typoInLayerName;\nvar noProcesses = {\n name: `${NAMESPACE}/no-processes`,\n check(root) {\n const diagnostics = [];\n const processesLayer = root.children.find(\n (child) => child.type === \"folder\" && basename(child.path) === \"processes\"\n );\n if (processesLayer !== void 0) {\n diagnostics.push({\n message: 'Layer \"processes\" is deprecated, avoid using it',\n location: { path: processesLayer.path }\n });\n }\n return { diagnostics };\n }\n};\nvar no_processes_default = noProcesses;\n\n// package.json\nvar package_default = {\n version: \"0.8.2\"};\nvar noCrossImports = {\n name: `${NAMESPACE}/no-cross-imports`,\n async check(root) {\n const diagnostics = [];\n const parseResult = await parse(root.children[0]?.path ?? root.path);\n const tsConfigs = collectRelatedTsConfigs(parseResult);\n const sourceFileIndex = indexSourceFiles(root);\n for (const sourceFile of Object.values(sourceFileIndex)) {\n const sourceType = getSourceType(sourceFile.file.path);\n if (!sourceType) continue;\n const dependencies = await extractDependencies(sourceFile.file.path);\n for (const dependency of dependencies) {\n const resolvedDependency = resolveDependency(\n dependency.path,\n sourceFile.file.path,\n tsConfigs,\n fs.existsSync,\n fs.existsSync\n );\n if (resolvedDependency === null) {\n continue;\n }\n const dependencyLocation = sourceFileIndex[resolvedDependency];\n if (dependencyLocation === void 0) {\n continue;\n }\n if (sourceFile.layerName === dependencyLocation.layerName && sourceFile.sliceName !== dependencyLocation.sliceName) {\n if (dependencyLocation.sliceName !== null && sourceFile.sliceName !== null && !isCrossImportPublicApi(dependencyLocation.file, {\n inSlice: dependencyLocation.sliceName,\n forSlice: sourceFile.sliceName,\n layerPath: dependencyLocation.layerPath\n })) {\n diagnostics.push({\n message: `Forbidden cross-import from slice \"${dependencyLocation.sliceName}\".`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n }\n }\n }\n }\n return { diagnostics };\n }\n};\nvar no_cross_imports_default = noCrossImports;\nvar noHigherLevelImports = {\n name: `${NAMESPACE}/no-higher-level-imports`,\n async check(root) {\n const diagnostics = [];\n const parseResult = await parse(root.children[0]?.path ?? root.path);\n const tsConfigs = collectRelatedTsConfigs(parseResult);\n const sourceFileIndex = indexSourceFiles(root);\n for (const sourceFile of Object.values(sourceFileIndex)) {\n const sourceType = getSourceType(sourceFile.file.path);\n if (!sourceType) continue;\n const dependencies = await extractDependencies(sourceFile.file.path);\n for (const dependency of dependencies) {\n const resolvedDependency = resolveDependency(\n dependency.path,\n sourceFile.file.path,\n tsConfigs,\n fs.existsSync,\n fs.existsSync\n );\n if (resolvedDependency === null) {\n continue;\n }\n const dependencyLocation = sourceFileIndex[resolvedDependency];\n if (dependencyLocation === void 0) {\n continue;\n }\n const thisLayerIndex = layerSequence.indexOf(sourceFile.layerName);\n const dependencyLayerIndex = layerSequence.indexOf(dependencyLocation.layerName);\n if (thisLayerIndex < dependencyLayerIndex) {\n diagnostics.push({\n message: `Forbidden import from higher layer \"${dependencyLocation.layerName}\".`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n }\n }\n }\n return { diagnostics };\n }\n};\nvar no_higher_level_imports_default = noHigherLevelImports;\nvar importLocality = {\n name: `${NAMESPACE}/import-locality`,\n async check(root) {\n const diagnostics = [];\n const parseResult = await parse(root.children[0]?.path ?? root.path);\n const tsConfigs = collectRelatedTsConfigs(parseResult);\n const sourceFileIndex = indexSourceFiles(root);\n for (const sourceFile of Object.values(sourceFileIndex)) {\n const sourceType = getSourceType(sourceFile.file.path);\n if (!sourceType) continue;\n const dependencies = await extractDependencies(sourceFile.file.path);\n for (const dependency of dependencies) {\n const resolvedDependency = resolveDependency(\n dependency.path,\n sourceFile.file.path,\n tsConfigs,\n fs.existsSync,\n fs.existsSync\n );\n if (resolvedDependency === null) {\n continue;\n }\n const dependencyLocation = sourceFileIndex[resolvedDependency];\n if (dependencyLocation === void 0) {\n continue;\n }\n const isRelative = [\".\", \"..\"].includes(dependency.path.split(\"/\")[0]);\n const isWithinSameSlice = sourceFile.layerName === dependencyLocation.layerName && sourceFile.sliceName === dependencyLocation.sliceName;\n if (isRelative && !isWithinSameSlice) {\n diagnostics.push({\n message: `Import from \"${dependency.path}\" should not be relative.`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n } else if (!isRelative && isWithinSameSlice) {\n diagnostics.push({\n message: `Import from \"${dependency.path}\" should be relative.`,\n location: {\n path: sourceFile.file.path,\n start: dependency.start,\n end: dependency.end\n }\n });\n }\n }\n }\n return { diagnostics };\n }\n};\nvar import_locality_default = importLocality;\nvar noWildcardExports = {\n name: `${NAMESPACE}/no-wildcard-exports`,\n async check(root) {\n const diagnostics = [];\n for (const sourceFile of Object.values(indexSourceFiles(root))) {\n if (!isIndex(sourceFile.file)) continue;\n const sourceType = getSourceType(sourceFile.file.path);\n if (!sourceType) continue;\n for (const reExport of await extractReExports(sourceFile.file.path)) {\n if (reExport.kind !== \"wildcard\" && reExport.kind !== \"namespace\") continue;\n diagnostics.push({\n message: `Wildcard re-export from \"${reExport.source}\" does not define an explicit public API. Prefer explicit named exports.`,\n location: {\n path: sourceFile.file.path,\n start: reExport.statementRange.start,\n end: reExport.statementRange.end\n }\n });\n }\n }\n return { diagnostics };\n }\n};\nvar no_wildcard_exports_default = noWildcardExports;\n\n// src/index.ts\nvar enabledRules = [\n ambiguous_slice_names_default,\n excessive_slicing_default,\n forbidden_imports_default,\n inconsistent_naming_default,\n insignificant_slice_default,\n no_layer_public_api_default,\n no_public_api_sidestep_default,\n no_reserved_folder_names_default,\n no_segmentless_slices_default,\n no_segments_on_sliced_layers_default,\n no_ui_in_app_default,\n public_api_default,\n repetitive_naming_default,\n segments_by_purpose_default,\n shared_lib_grouping_default,\n typo_in_layer_name_default,\n no_processes_default\n];\nvar disabledRules = [no_cross_imports_default, no_higher_level_imports_default, import_locality_default, no_wildcard_exports_default];\nvar rules = [...enabledRules, ...disabledRules];\nvar plugin = createPlugin({\n meta: {\n name: \"@feature-sliced/steiger-plugin\",\n version: package_default.version\n },\n ruleDefinitions: rules\n});\nvar configs = createConfigs({\n recommended: enableSpecificRules(plugin, enabledRules)\n});\nvar index_default = {\n plugin,\n configs\n};\n\nexport { index_default as default };\n","import fsd from \"@feature-sliced/steiger-plugin\";\n\nimport type { SteigerConfig } from \"#/shared/config/index.ts\";\n\nexport interface FsdPlugin {\n readonly plugin: SteigerConfig[number];\n readonly configs: { readonly recommended: SteigerConfig };\n}\n\nconst plugin: FsdPlugin = fsd;\n\nexport default plugin;\n"],"ignoreList":[1,2],"mappings":";;;;;;;;;;;;;;;AA8BA,MAAM,oBAAoBA,OAAI,WAAW,MAAM,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC;AACjE,MAAM,MAAM,4BAA4B,yBAAyB,iBAAiB,CAAC;AAEnF,MAAM,SAAS,GAAG,IAAI;AAEtB,MAAM,UAAsE;CAC1E,MAAM,OAAO,KAAK;CAClB,UAAU;AACZ;AAEA,MAAM,YAAY,aAChB,OAAO,cAAc,WAAW,SAAS,QAAQ,YAAYA,OAAI,WAAW,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KACzF,OAAO,MAAM;CAAE,SAAS,SAASA,OAAI,MAAM,OAAO,MAAM,CAAC,CAAC,IAAI;CAAG,cAAc;AAAS,CAAC,CAC3F;AAEF,MAAM,qBAAqB,MAAsB,kBAC/C,OAAO,cAAc,KAAK,eAAe,CAAC,CAAC,KACzC,OAAO,MAAM;CACX,SAAS,oBAAoB,gBAAgB,SAAS,aAAa,CAAC;CACpE,cAAc;AAChB,CAAC,CACH;AAEF,MAAM,mBAAwC;CAC5C,aAAa,aACX,QAAQ,KAAK,KACX,OAAO,MAAM;EACX,SAAS,SAAS,KAAK,WAAW,SAAS,QAAQ,CAAC;EACpD,cAAc,SAAS;CACzB,CAAC,CACH;CACF,kBAAkB,kBA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,SAAS,gBAAgB,WAAW,KAAK;KACzC,UAAU;MACR,MAAM,WAAW,KAAK;MACtB,OAAO,WAAW;MAClB,KAAK,WAAW;KAClB;IACF,CAAC;GAEL;EACF;EACA,OAAO,EAAE,YAAY;CACvB;AAEyC;AAwB3C,IAAI,8BAA8B;CAtBhC,MAAM,GAAG,UAAU;CACnB,MAAM,MAAM,MAAM;EAChB,MAAM,cAAc,CAAC;EACrB,KAAK,MAAM,cAAc,OAAO,OAAO,iBAAiB,IAAI,CAAC,GAAG;GAC9D,IAAI,CAAC,QAAQ,WAAW,IAAI,GAAG;GAE/B,IAAI,CADe,cAAc,WAAW,KAAK,IACnC,GAAG;GACjB,KAAK,MAAM,YAAY,MAAM,iBAAiB,WAAW,KAAK,IAAI,GAAG;IACnE,IAAI,SAAS,SAAS,cAAc,SAAS,SAAS,aAAa;IACnE,YAAY,KAAK;KACf,SAAS,4BAA4B,SAAS,OAAO;KACrD,UAAU;MACR,MAAM,WAAW,KAAK;MACtB,OAAO,SAAS,eAAe;MAC/B,KAAK,SAAS,eAAe;KAC/B;IACF,CAAC;GACH;EACF;EACA,OAAO,EAAE,YAAY;CACvB;AAEgD;AAGlD,IAAI,eAAe;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,IAAI,gBAAgB;CAAC;CAA0B;CAAiC;CAAyB;AAA2B;AACpI,IAAI,QAAQ,CAAC,GAAG,cAAc,GAAG,aAAa;AAC9C,IAAIC,WAAS,aAAa;CACxB,MAAM;EACJ,MAAM;EACN,SAAS,gBAAgB;CAC3B;CACA,iBAAiB;AACnB,CAAC;;ACh5CD,MAAM,SAAoBC;CDq5CxB,QAAA;CACA,SALY,cAAc,EAC1B,aAAa,oBAAoBD,UAAQ,YAAY,EACvD,CAGQ;ACt5CkBC"}
@@ -1,173 +0,0 @@
1
- import { Effect, Path, Schema } from "effect";
2
- import { TextlintRcConfig } from "@textlint/config-loader";
3
- import { TextlintKernelRule } from "@textlint/kernel";
4
- import { H56mConfig } from "@r_masseater/h56m";
5
- import "effector";
6
- import { UserConfig } from "@commitlint/types";
7
- interface File {
8
- type: 'file';
9
- path: string;
10
- }
11
- interface Folder {
12
- type: 'folder';
13
- path: string;
14
- children: Array<File | Folder>;
15
- }
16
- type BaseRuleOptions = Record<string, unknown>;
17
- interface Rule<Context = unknown, RuleOptions extends BaseRuleOptions = BaseRuleOptions, RuleName extends string | number | symbol = string> {
18
- /** Short code name for the rule. */
19
- name: RuleName;
20
- check: (this: Context, root: Folder, ruleOptions: RuleOptions) => RuleResult | Promise<RuleResult>;
21
- }
22
- interface RuleResult {
23
- diagnostics: Array<PartialDiagnostic>;
24
- }
25
- interface PartialDiagnostic {
26
- message: string;
27
- fixes?: Array<Fix>;
28
- location: {
29
- /** Absolute path to a folder or a file that contains the issue. */
30
- path: string;
31
- /** 1-based line and column indexes of the start of the issue. */
32
- start?: {
33
- /** 1-based line index of the start of the issue. */
34
- line?: number;
35
- /** 1-based column index of the start of the issue. */
36
- column?: number;
37
- };
38
- /** 1-based line and column indexes of the end of the issue. */
39
- end?: {
40
- /** 1-based line index of the end of the issue. */
41
- line?: number;
42
- /** 1-based column index of the end of the issue. */
43
- column?: number;
44
- };
45
- };
46
- }
47
- type Fix = {
48
- type: 'rename';
49
- path: string;
50
- newName: string;
51
- } | {
52
- type: 'create-file';
53
- path: string;
54
- content: string;
55
- } | {
56
- type: 'create-folder';
57
- path: string;
58
- } | {
59
- type: 'delete';
60
- path: string;
61
- } | {
62
- type: 'modify-file';
63
- path: string;
64
- content: string;
65
- };
66
- type Config$1<Rules extends Array<Rule>> = Array<ConfigObject<Rules> | Plugin<unknown, Rules> | GlobalIgnore>;
67
- type Severity = 'off' | 'warn' | 'error';
68
- /**
69
- * Extracts a union of rule names from a given tuple of `Rule` objects.
70
- *
71
- * @example
72
- * type Context = unknown
73
- * type Options = BaseRuleOptions
74
- * type Result = RuleNames<[Rule<Context, Options, 'foo'>, Rule<Context, Options, 'bar'>]>
75
- * // Result is 'foo' | 'bar'
76
- */
77
- type RuleNames<Rules extends Array<Rule>> = Rules[number]['name'];
78
- type LookUpByName<Union, Name> = Union extends {
79
- name: Name;
80
- } ? Union : never;
81
- /**
82
- * Looks up a rule in a tuple of rules by name and then extracts that rule's options type.
83
- *
84
- * @example
85
- * type Context = unknown
86
- * type Rules = [Rule<Context, { foo: string }, 'foo'>, Rule<Context, { bar: number }, 'bar'>]
87
- * type Result = OptionsForRule<Rules, 'foo'>
88
- * // Result is { foo: string }
89
- */
90
- type OptionsForRule<Rules extends Array<Rule>, RuleName extends RuleNames<Rules>> = LookUpByName<Rules[number], RuleName> extends Rule<unknown, infer Options> ? Options : never;
91
- interface ConfigObject<Rules extends Array<Rule>> {
92
- /** Globs of files to check. */
93
- files?: Array<string>;
94
- /** Globs of files to ignore. */
95
- ignores?: Array<string>;
96
- /** Severity of rules and individual rule options. */
97
- rules: { [key in RuleNames<Rules>]?: Severity | [Severity, OptionsForRule<Rules, key>]; };
98
- }
99
- type GlobalIgnore = {
100
- ignores: Array<string>;
101
- };
102
- interface Plugin<Context = unknown, Rules extends Array<Rule<Context>> = Array<Rule>> {
103
- meta: {
104
- name: string;
105
- version: string;
106
- };
107
- ruleDefinitions: Rules;
108
- }
109
- declare function defineConfig<Rules extends Array<Rule> = Array<Rule>>(config: Config$1<Rules>): Config$1<Rules>;
110
- declare const VpToolsError_base: Schema.Class<VpToolsError, Schema.TaggedStruct<"VpToolsError", {
111
- readonly kind: Schema.Literals<readonly ["config-missing", "tool-failed", "checks-failed"]>;
112
- readonly message: Schema.String;
113
- }>, import("effect/Cause").YieldableError & {
114
- readonly brand: unique symbol;
115
- }>;
116
- declare class VpToolsError extends VpToolsError_base {}
117
- declare const DEPENDENCY_FIELDS: readonly ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"];
118
- /** @internal */
119
- type DependencyField = (typeof DEPENDENCY_FIELDS)[number];
120
- declare const SkillsSectionSchema: Schema.$Record<Schema.Union<readonly [Schema.String, Schema.String]>, Schema.Union<readonly [Schema.Struct<{
121
- readonly commit: Schema.String;
122
- readonly root: Schema.optional<Schema.String>;
123
- readonly skills: Schema.Union<readonly [Schema.Literal<"all">, Schema.NonEmptyArray<Schema.String>]>;
124
- }>, Schema.Struct<{
125
- readonly skills: Schema.Union<readonly [Schema.Literal<"all">, Schema.NonEmptyArray<Schema.String>]>;
126
- }>]>>;
127
- type SkillsSection = typeof SkillsSectionSchema.Encoded;
128
- interface CommitlintConfig extends Readonly<UserConfig> {}
129
- type SteigerConfig = readonly ReturnType<typeof defineConfig>[number][];
130
- type TextlintRuleOptions = NonNullable<TextlintKernelRule["options"]>;
131
- interface TextlintPreset {
132
- readonly rules: Readonly<Record<string, TextlintKernelRule["rule"]>>;
133
- readonly rulesConfig: Readonly<Record<string, TextlintRuleOptions>>;
134
- }
135
- interface TextlintSource extends TextlintRcConfig {
136
- readonly files: readonly string[];
137
- }
138
- interface TextlintConfig extends TextlintRcConfig {
139
- readonly ignores?: readonly string[];
140
- readonly presets?: Readonly<Record<string, TextlintPreset>>;
141
- readonly sources?: readonly TextlintSource[];
142
- }
143
- interface SteigerSection {
144
- readonly paths: readonly string[];
145
- readonly rules: SteigerConfig;
146
- }
147
- type FallowConfig = Readonly<Record<string, unknown>>;
148
- type ManifestField = DependencyField;
149
- interface AllowedDependencies {
150
- readonly workspaces: readonly string[];
151
- readonly dependencies: readonly string[];
152
- readonly fields?: readonly ManifestField[];
153
- }
154
- interface DependencyRules {
155
- readonly allowed?: Readonly<Record<string, AllowedDependencies>>;
156
- readonly banned?: Readonly<Record<string, readonly string[]>>;
157
- readonly exactDependencies?: Readonly<Record<string, readonly string[]>>;
158
- readonly peerRanges?: "identical" | "intersect";
159
- }
160
- interface ToolSections {
161
- readonly commitlint?: CommitlintConfig;
162
- readonly dependencyRules?: DependencyRules;
163
- readonly fallow?: FallowConfig;
164
- readonly h56m?: H56mConfig;
165
- readonly skills?: SkillsSection;
166
- readonly steiger?: SteigerSection;
167
- readonly textlint?: TextlintConfig;
168
- }
169
- declare module "vite" {
170
- interface UserConfig extends ToolSections {}
171
- }
172
- export { SteigerSection as a, SkillsSection as c, SteigerConfig as i, VpToolsError as l, DependencyRules as n, TextlintConfig as o, FallowConfig as r, ToolSections as s, CommitlintConfig as t };
173
- //# sourceMappingURL=index-DyvYt7R0.d.mts.map
Binary file
Binary file
Binary file