@r_masseater/vite-plus-adopt 0.4.1 → 0.5.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 +1 -69
- package/dist/attempt-B93fjWiJ.mjs.map +1 -1
- package/dist/attw.mjs.map +1 -1
- package/dist/cli.mjs +45 -17
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-BdAPwzCc.mjs → config-BR_LIdmG.mjs} +3 -1
- package/dist/config-BR_LIdmG.mjs.map +1 -0
- package/dist/fsd.d.mts +3 -3
- package/dist/fsd.mjs.map +1 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.mjs +1 -1
- package/dist/{install-C-6lZ_z7.mjs → install-D6kuA6Oe.mjs} +7 -2
- package/dist/install-D6kuA6Oe.mjs.map +1 -0
- package/dist/json-D-rhjlSM.mjs.map +1 -1
- package/dist/postinstall.mjs +1 -1
- package/dist/{types-LygeEwCK.d.mts → types-D-w4yqEn.d.mts} +2 -1
- package/package.json +2 -2
- package/dist/config-BdAPwzCc.mjs.map +0 -1
- package/dist/install-C-6lZ_z7.mjs.map +0 -1
package/dist/fsd.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsd.mjs","names":["Str","basename","join","sep","parse","plugin","fsd"],"sources":["../src/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/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 \"./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 Option.fromNullishOr(byOptions.get(key)).pipe(\n Option.getOrElse(() => {\n const { options } = api.parseJsonConfigFileContent(\n { compilerOptions },\n { configDirectory: CWD },\n );\n const created = api.createModuleResolver(options);\n byOptions.set(key, created);\n return created;\n }),\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 \"./types.ts\";\n\ninterface FsdPlugin {\n readonly plugin: SteigerConfig[number];\n readonly configs: { readonly recommended: SteigerConfig };\n}\n\nconst plugin: FsdPlugin = fsd;\n\nexport type { FsdPlugin };\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,S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AAS,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
|
+
{"version":3,"file":"fsd.mjs","names":["Str","basename","join","sep","parse","plugin","fsd"],"sources":["../src/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/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 \"./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 Option.fromNullishOr(byOptions.get(key)).pipe(\n Option.getOrElse(() => {\n const { options } = api.parseJsonConfigFileContent(\n { compilerOptions },\n { configDirectory: CWD },\n );\n const created = api.createModuleResolver(options);\n byOptions.set(key, created);\n return created;\n }),\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 \"./types.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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ACR,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"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FallowConfig, c as SteigerSection, i as DependencyRules, l as TextlintConfig, n as BetterleaksRule, o as MarkdownlintConfig, r as CommitlintConfig, s as SteigerConfig, t as BetterleaksConfig, u as ToolSections } from "./types-
|
|
1
|
+
import { a as FallowConfig, c as SteigerSection, i as DependencyRules, l as TextlintConfig, n as BetterleaksRule, o as MarkdownlintConfig, r as CommitlintConfig, s as SteigerConfig, t as BetterleaksConfig, u as ToolSections } from "./types-D-w4yqEn.mjs";
|
|
2
2
|
import { Effect, FileSystem, Path, Schema } from "effect";
|
|
3
3
|
declare const VpToolsError_base: Schema.Class<VpToolsError, Schema.TaggedStruct<"VpToolsError", {
|
|
4
4
|
readonly kind: Schema.Literals<readonly ["config-missing", "tool-failed", "checks-failed"]>;
|
|
@@ -7,7 +7,9 @@ declare const VpToolsError_base: Schema.Class<VpToolsError, Schema.TaggedStruct<
|
|
|
7
7
|
readonly brand: unique symbol;
|
|
8
8
|
}>;
|
|
9
9
|
declare class VpToolsError extends VpToolsError_base {}
|
|
10
|
+
/** @internal */
|
|
10
11
|
type FileServices = FileSystem.FileSystem | Path.Path;
|
|
11
|
-
|
|
12
|
-
export
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const loadViteConfig: (root: string) => Effect.Effect<ToolSections, VpToolsError, FileServices>;
|
|
14
|
+
export type { BetterleaksConfig, BetterleaksRule, CommitlintConfig, DependencyRules, FallowConfig, MarkdownlintConfig, SteigerConfig, SteigerSection, TextlintConfig, ToolSections };
|
|
13
15
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as loadViteConfig } from "./config-
|
|
1
|
+
export { n as loadViteConfig } from "./config-BR_LIdmG.mjs";
|
|
@@ -7,12 +7,14 @@ import { encode } from "effect/encoding/Hex";
|
|
|
7
7
|
import { HttpClient } from "effect/http";
|
|
8
8
|
import { unzip } from "fflate";
|
|
9
9
|
// src/node-services.ts
|
|
10
|
+
/** @internal */
|
|
10
11
|
const nodeServicesLayer = Layer.provideMerge(NodeChildProcessSpawner.layer, Layer.mergeAll(NodeFileSystem.layer, NodePath.layer, NodeStdio.layer));
|
|
11
|
-
|
|
12
|
+
/** @internal */
|
|
12
13
|
const writeTo = Function.dual(2, (sink, text) => Effect.gen(function* write() {
|
|
13
14
|
const stdio = yield* Stdio.Stdio;
|
|
14
15
|
yield* Stream.make(text).pipe(Stream.run(stdio[sink]()), Effect.orDie);
|
|
15
16
|
}));
|
|
17
|
+
/** @internal */
|
|
16
18
|
const finish = (report) => {
|
|
17
19
|
if (!report.valid) return Effect.fail(checksFailed(report.output));
|
|
18
20
|
if (report.output === "") return Effect.void;
|
|
@@ -26,6 +28,7 @@ const reportFailure = (cause) => {
|
|
|
26
28
|
}));
|
|
27
29
|
return writeTo("stderr", `${message}\n`);
|
|
28
30
|
};
|
|
31
|
+
/** @internal */
|
|
29
32
|
const runCli = (program) => {
|
|
30
33
|
const reported = program.pipe(Effect.tapCause(reportFailure));
|
|
31
34
|
const main = Layer.build(nodeServicesLayer).pipe(Effect.flatMap((services) => Effect.provideContext(reported, services)), Effect.scoped);
|
|
@@ -158,6 +161,7 @@ const isPlaced = (binary, platform) => Effect.gen(function* placed() {
|
|
|
158
161
|
const file = yield* binaryPath(binary, platform);
|
|
159
162
|
return yield* fs.exists(file);
|
|
160
163
|
});
|
|
164
|
+
/** @internal */
|
|
161
165
|
const installBinary = (binary) => Effect.gen(function* install() {
|
|
162
166
|
const platform = yield* platformOf(binary);
|
|
163
167
|
if (yield* isPlaced(binary, platform)) return;
|
|
@@ -168,6 +172,7 @@ const installBinary = (binary) => Effect.gen(function* install() {
|
|
|
168
172
|
data
|
|
169
173
|
});
|
|
170
174
|
});
|
|
175
|
+
/** @internal */
|
|
171
176
|
const locateBinary = (binary) => Effect.gen(function* locate() {
|
|
172
177
|
const platform = yield* platformOf(binary);
|
|
173
178
|
if (!(yield* isPlaced(binary, platform))) return yield* configMissing(`${binary.name} ${binary.version} ${NOT_INSTALLED}`);
|
|
@@ -175,4 +180,4 @@ const locateBinary = (binary) => Effect.gen(function* locate() {
|
|
|
175
180
|
});
|
|
176
181
|
export { ZIZMOR as a, writeTo as c, BETTERLEAKS as i, locateBinary as n, runCli as o, ACTIONLINT as r, finish as s, installBinary as t };
|
|
177
182
|
|
|
178
|
-
//# sourceMappingURL=install-
|
|
183
|
+
//# sourceMappingURL=install-D6kuA6Oe.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-D6kuA6Oe.mjs","names":["Fn","Str","Arr","encodeHex","Rec"],"sources":["../src/node-services.ts","../src/output.ts","../src/run-cli.ts","../src/binaries.ts","../src/vendor.ts","../src/install.ts"],"sourcesContent":["import {\n NodeChildProcessSpawner,\n NodeFileSystem,\n NodePath,\n NodeStdio,\n} from \"@effect/platform-node-shared\";\nimport { Layer } from \"effect\";\n\n/** @internal */\nexport const nodeServicesLayer = Layer.provideMerge(\n NodeChildProcessSpawner.layer,\n Layer.mergeAll(NodeFileSystem.layer, NodePath.layer, NodeStdio.layer),\n);\n","import { Effect, Stdio, Stream, Function as Fn } from \"effect\";\n\nimport { checksFailed } from \"./errors.ts\";\nimport type { VpToolsError } from \"./errors.ts\";\nimport type { Report } from \"./report.ts\";\n\nconst DATA_FIRST_ARITY = 2;\n\n/** @internal */\nexport type Sink = \"stdout\" | \"stderr\";\n\n/** @internal */\nexport const writeTo: {\n (text: string): (sink: Sink) => Effect.Effect<void, never, Stdio.Stdio>;\n (sink: Sink, text: string): Effect.Effect<void, never, Stdio.Stdio>;\n} = Fn.dual(DATA_FIRST_ARITY, (sink: Sink, text: string): Effect.Effect<void, never, Stdio.Stdio> =>\n Effect.gen(function* write() {\n const stdio = yield* Stdio.Stdio;\n yield* Stream.make(text).pipe(Stream.run(stdio[sink]()), Effect.orDie);\n }),\n);\n\n/** @internal */\nexport const finish = (report: Report): Effect.Effect<void, VpToolsError, Stdio.Stdio> => {\n if (!report.valid) {\n return Effect.fail(checksFailed(report.output));\n }\n if (report.output === \"\") {\n return Effect.void;\n }\n return writeTo(\"stdout\", `${report.output}\\n`);\n};\n","import { runMain } from \"@effect/platform-node-shared/NodeRuntime\";\nimport { Cause, Effect, Layer, Option, Schema, pipe } from \"effect\";\nimport type { Stdio } from \"effect\";\n\nimport type { CommandServices } from \"./command.ts\";\nimport { VpToolsError } from \"./errors.ts\";\nimport { nodeServicesLayer } from \"./node-services.ts\";\nimport { writeTo } from \"./output.ts\";\n\nconst reportFailure = <Failure>(\n cause: Cause.Cause<Failure>,\n): Effect.Effect<void, never, Stdio.Stdio> => {\n const message = pipe(\n Cause.findErrorOption(cause),\n Option.filter(Schema.is(VpToolsError)),\n Option.match({\n onNone: () => Cause.pretty(cause),\n onSome: (error) => error.message,\n }),\n );\n return writeTo(\"stderr\", `${message}\\n`);\n};\n\n/** @internal */\nexport const runCli = <Failure>(program: Effect.Effect<void, Failure, CommandServices>): void => {\n const reported = program.pipe(Effect.tapCause(reportFailure));\n const main = Layer.build(nodeServicesLayer).pipe(\n Effect.flatMap((services) => Effect.provideContext(reported, services)),\n Effect.scoped,\n );\n runMain(main, { disableErrorReporting: true });\n};\n","import { String as Str } from \"effect\";\n\nexport type Platform = \"darwin-arm64\" | \"darwin-x64\" | \"linux-arm64\" | \"linux-x64\" | \"win32-x64\";\n\nexport type Archive = \"tar.gz\" | \"zip\";\n\nexport interface BinaryAsset {\n readonly url: string;\n readonly sha256: string;\n readonly archive: Archive;\n}\n\nexport interface Binary {\n readonly name: string;\n readonly version: string;\n readonly assets: Readonly<Record<Platform, BinaryAsset>>;\n}\n\nconst archiveOf = (file: string): Archive => {\n if (Str.endsWith(\".zip\")(file)) {\n return \"zip\";\n }\n return \"tar.gz\";\n};\n\nconst releaseAsset =\n (release: string) =>\n (file: string, sha256: string): BinaryAsset => ({\n url: `${release}/${file}`,\n sha256,\n archive: archiveOf(file),\n });\n\nconst betterleaksAsset = releaseAsset(\n \"https://github.com/betterleaks/betterleaks/releases/download/v2.0.0-rc.7\",\n);\n\nexport const BETTERLEAKS: Binary = {\n name: \"betterleaks\",\n version: \"2.0.0-rc.7\",\n assets: {\n \"darwin-arm64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_darwin_arm64.tar.gz\",\n \"d5052b4789752e3d9995c0b71a5b531aea747455ba4f8d1534c90b41e03f906c\",\n ),\n \"darwin-x64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_darwin_x64.tar.gz\",\n \"b3be0c6b4b91036a6d8b98e47642470a5a872d4bff08b8ee34348e9baf1e3434\",\n ),\n \"linux-arm64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_linux_arm64.tar.gz\",\n \"32fcd5a77d7c3c2d97cc615c5d70344d0c62b5a36f38568ce8ec72e62783acad\",\n ),\n \"linux-x64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_linux_x64.tar.gz\",\n \"230ef42dc3a0ee35e5148b7b4e9280224a412ef100cd4e74d3d6681d94e6ccb8\",\n ),\n \"win32-x64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_windows_x64.zip\",\n \"36db668ba12b55537a11cc45cd61565ab7f4f23ce606e0827206f49048a5183e\",\n ),\n },\n};\n\nconst actionlintAsset = releaseAsset(\n \"https://github.com/rhysd/actionlint/releases/download/v1.7.12\",\n);\n\nexport const ACTIONLINT: Binary = {\n name: \"actionlint\",\n version: \"1.7.12\",\n assets: {\n \"darwin-arm64\": actionlintAsset(\n \"actionlint_1.7.12_darwin_arm64.tar.gz\",\n \"aba9ced2dee8d27fecca3dc7feb1a7f9a52caefa1eb46f3271ea66b6e0e6953f\",\n ),\n \"darwin-x64\": actionlintAsset(\n \"actionlint_1.7.12_darwin_amd64.tar.gz\",\n \"5b44c3bc2255115c9b69e30efc0fecdf498fdb63c5d58e17084fd5f16324c644\",\n ),\n \"linux-arm64\": actionlintAsset(\n \"actionlint_1.7.12_linux_arm64.tar.gz\",\n \"325e971b6ba9bfa504672e29be93c24981eeb1c07576d730e9f7c8805afff0c6\",\n ),\n \"linux-x64\": actionlintAsset(\n \"actionlint_1.7.12_linux_amd64.tar.gz\",\n \"8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8\",\n ),\n \"win32-x64\": actionlintAsset(\n \"actionlint_1.7.12_windows_amd64.zip\",\n \"6e7241b51e6817ea6a047693d8e6fed13b31819c9a0dd6c5a726e1592d22f6e9\",\n ),\n },\n};\n\nconst zizmorAsset = releaseAsset(\"https://github.com/zizmorcore/zizmor/releases/download/v1.32.0\");\n\nexport const ZIZMOR: Binary = {\n name: \"zizmor\",\n version: \"1.32.0\",\n assets: {\n \"darwin-arm64\": zizmorAsset(\n \"zizmor-aarch64-apple-darwin.tar.gz\",\n \"6efed18c4539a663fd3c851a2be9533fd8456c4e646d9416206da059154a0d3c\",\n ),\n \"darwin-x64\": zizmorAsset(\n \"zizmor-x86_64-apple-darwin.tar.gz\",\n \"6983143c719ada6845a69cc4dd2bacc215f971662fecd8bbd2678388e5ce5969\",\n ),\n \"linux-arm64\": zizmorAsset(\n \"zizmor-aarch64-unknown-linux-gnu.tar.gz\",\n \"cb152b207f815116d7fa1c1ee4614f61578803351395052908095e79adfd9fd0\",\n ),\n \"linux-x64\": zizmorAsset(\n \"zizmor-x86_64-unknown-linux-gnu.tar.gz\",\n \"bb110cc765eca9cd7efb2e284a956be5974c60027b0970f16397d86208a9957b\",\n ),\n \"win32-x64\": zizmorAsset(\n \"zizmor-x86_64-pc-windows-msvc.zip\",\n \"d284a16e09d9df4ce2c000357e7b59bd531be093bea5718a1ce225b449b59d49\",\n ),\n },\n};\n\nexport const PLATFORMS: readonly Platform[] = [\n \"darwin-arm64\",\n \"darwin-x64\",\n \"linux-arm64\",\n \"linux-x64\",\n \"win32-x64\",\n];\n","import { Context } from \"effect\";\n\nexport const VendorDirectory = Context.Reference<string>(\"vite-plus-adopt/VendorDirectory\", {\n defaultValue: () => `${import.meta.dirname}/../vendor`,\n});\n","import { untar } from \"@andrewbranch/untar.js\";\nimport { Array as Arr, Effect, FileSystem, Path, pipe, Record as Rec } from \"effect\";\nimport type { Option, PlatformError } from \"effect\";\nimport { encode as encodeHex } from \"effect/encoding/Hex\";\nimport { HttpClient } from \"effect/http\";\nimport { unzip } from \"fflate\";\n\nimport { attempt } from \"./attempt.ts\";\nimport { PLATFORMS } from \"./binaries.ts\";\nimport type { Binary, BinaryAsset, Platform } from \"./binaries.ts\";\nimport { configMissing, toolFailed } from \"./errors.ts\";\nimport type { VpToolsError } from \"./errors.ts\";\nimport { VendorDirectory } from \"./vendor.ts\";\n\ntype Entries = ReadonlyMap<string, Uint8Array>;\n\ninterface Download {\n readonly binary: Binary;\n readonly platform: Platform;\n readonly data: Uint8Array;\n}\n\ntype InstallServices = FileSystem.FileSystem | Path.Path;\n\ntype InstallError = VpToolsError | PlatformError.PlatformError;\n\nconst EXECUTABLE = 0o755;\n\nconst NOT_INSTALLED =\n \"was not installed. Allow the postinstall of @r_masseater/vite-plus-adopt in allowBuilds of pnpm-workspace.yaml and run vp install.\";\n\nconst currentPlatform = (): Option.Option<Platform> =>\n Arr.findFirst(PLATFORMS, (platform) => platform === `${process.platform}-${process.arch}`);\n\nconst executableName = (binary: Binary, platform: Platform): string => {\n if (platform === \"win32-x64\") {\n return `${binary.name}.exe`;\n }\n return binary.name;\n};\n\nconst assetOf = ({ binary, platform }: Download): BinaryAsset => binary.assets[platform];\n\nconst download = (\n binary: Binary,\n asset: BinaryAsset,\n): Effect.Effect<Uint8Array, VpToolsError, HttpClient.HttpClient> =>\n Effect.gen(function* fetchAsset() {\n const httpClient = yield* HttpClient.HttpClient;\n const client = HttpClient.filterStatusOk(httpClient);\n const response = yield* client.get(asset.url);\n const body = yield* response.arrayBuffer;\n return new Uint8Array(body);\n }).pipe(Effect.mapError(toolFailed(binary.name)));\n\nconst verify = (fetched: Download): Effect.Effect<Download, VpToolsError> => {\n const asset = assetOf(fetched);\n const failed = toolFailed(fetched.binary.name);\n const data = new Uint8Array(fetched.data);\n return attempt(fetched.binary.name)(() => crypto.subtle.digest(\"SHA-256\", data)).pipe(\n Effect.map((digest) => encodeHex(new Uint8Array(digest))),\n Effect.filterOrFail(\n (digest) => digest === asset.sha256,\n (digest) => failed(`${asset.url} has SHA-256 ${digest}, expected ${asset.sha256}`),\n ),\n Effect.as(fetched),\n );\n};\n\nconst gunzipped = (data: Uint8Array): Effect.Effect<ArrayBuffer, VpToolsError> => {\n const compressed = new Blob([new Uint8Array(data)]).stream();\n return attempt(\"gunzip\")(() =>\n new Response(compressed.pipeThrough(new DecompressionStream(\"gzip\"))).arrayBuffer(),\n );\n};\n\nconst tarEntries = (data: Uint8Array): Effect.Effect<Entries, VpToolsError> =>\n gunzipped(data).pipe(\n Effect.map(untar),\n Effect.map(\n (files) =>\n new Map(\n pipe(\n files,\n Arr.map((file) => [file.name, file.fileData] as const),\n ),\n ),\n ),\n );\n\nconst zipEntries = (data: Uint8Array): Effect.Effect<Entries, VpToolsError> =>\n Effect.callback<Entries, VpToolsError>((resume) => {\n unzip(data, (failure, files) => {\n if (failure === null) {\n const entries: Entries = new Map(Rec.toEntries(files));\n resume(Effect.succeed(entries));\n return;\n }\n resume(Effect.fail(toolFailed(\"unzip\")(failure)));\n });\n });\n\nconst entriesOf = (\n asset: BinaryAsset,\n): ((data: Uint8Array) => Effect.Effect<Entries, VpToolsError>) => {\n if (asset.archive === \"zip\") {\n return zipEntries;\n }\n return tarEntries;\n};\n\nconst extract = (fetched: Download): Effect.Effect<Uint8Array, VpToolsError> => {\n const asset = assetOf(fetched);\n const executable = executableName(fetched.binary, fetched.platform);\n return entriesOf(asset)(fetched.data).pipe(\n Effect.flatMap((files) => Effect.fromNullishOr(files.get(executable))),\n Effect.mapError(() => toolFailed(fetched.binary.name)(`${asset.url} has no ${executable}`)),\n );\n};\n\nconst binaryPath = (binary: Binary, platform: Platform): Effect.Effect<string, never, Path.Path> =>\n Effect.gen(function* vendoredPath() {\n const path = yield* Path.Path;\n const vendor = yield* VendorDirectory;\n return path.join(vendor, binary.name, binary.version, executableName(binary, platform));\n });\n\nconst place = (\n fetched: Download,\n bytes: Uint8Array,\n): Effect.Effect<void, PlatformError.PlatformError, InstallServices> =>\n Effect.gen(function* write() {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const file = yield* binaryPath(fetched.binary, fetched.platform);\n yield* fs.makeDirectory(path.dirname(file), { recursive: true });\n yield* Effect.scoped(\n Effect.gen(function* stage() {\n const staging = yield* fs.makeTempDirectoryScoped({\n directory: path.dirname(file),\n prefix: \".partial-\",\n });\n const partial = path.join(staging, path.basename(file));\n yield* fs.writeFile(partial, bytes);\n yield* fs.chmod(partial, EXECUTABLE);\n yield* fs.rename(partial, file);\n }),\n );\n });\n\nconst unpack = (fetched: Download): Effect.Effect<void, InstallError, InstallServices> =>\n verify(fetched).pipe(\n Effect.flatMap(extract),\n Effect.flatMap((bytes) => place(fetched, bytes)),\n );\n\nconst platformOf = (binary: Binary): Effect.Effect<Platform, VpToolsError> =>\n pipe(\n currentPlatform(),\n Effect.fromOption,\n Effect.mapError(() =>\n toolFailed(binary.name)(`no release for ${process.platform}-${process.arch}`),\n ),\n );\n\nconst isPlaced = (\n binary: Binary,\n platform: Platform,\n): Effect.Effect<boolean, PlatformError.PlatformError, InstallServices> =>\n Effect.gen(function* placed() {\n const fs = yield* FileSystem.FileSystem;\n const file = yield* binaryPath(binary, platform);\n return yield* fs.exists(file);\n });\n\n/** @internal */\nexport const installBinary = (\n binary: Binary,\n): Effect.Effect<\n void,\n VpToolsError | PlatformError.PlatformError,\n FileSystem.FileSystem | HttpClient.HttpClient | Path.Path\n> =>\n Effect.gen(function* install() {\n const platform = yield* platformOf(binary);\n if (yield* isPlaced(binary, platform)) {\n return;\n }\n const data = yield* download(binary, binary.assets[platform]);\n yield* unpack({ binary, platform, data });\n });\n\n/** @internal */\nexport const locateBinary = (\n binary: Binary,\n): Effect.Effect<\n string,\n VpToolsError | PlatformError.PlatformError,\n FileSystem.FileSystem | Path.Path\n> =>\n Effect.gen(function* locate() {\n const platform = yield* platformOf(binary);\n if (!(yield* isPlaced(binary, platform))) {\n return yield* configMissing(`${binary.name} ${binary.version} ${NOT_INSTALLED}`);\n }\n return yield* binaryPath(binary, platform);\n });\n"],"mappings":";;;;;;;;;;AASA,MAAa,oBAAoB,MAAM,aACrC,wBAAwB,OACxB,MAAM,SAAS,eAAe,OAAO,SAAS,OAAO,UAAU,KAAK,CACtE;;ACAA,MAAa,UAGTA,SAAG,KAAK,IAAmB,MAAY,SACzC,OAAO,IAAI,UAAU,QAAQ;CAC3B,MAAM,QAAQ,OAAO,MAAM;CAC3B,OAAO,OAAO,KAAK,IAAI,CAAC,CAAC,KAAK,OAAO,IAAI,MAAM,KAAK,CAAC,CAAC,GAAG,OAAO,KAAK;AACvE,CAAC,CACH;;AAGA,MAAa,UAAU,WAAmE;CACxF,IAAI,CAAC,OAAO,OACV,OAAO,OAAO,KAAK,aAAa,OAAO,MAAM,CAAC;CAEhD,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M,YACJ,QACA,aAEA,OAAO,IAAI,UAAU,SAAS;CAC5B,MAAM,KAAK,OAAO,WAAW;CAC7B,MAAM,OAAO,OAAO,WAAW,QAAQ,QAAQ;CAC/C,OAAO,OAAO,GAAG,OAAO,IAAI;AAC9B,CAAC;;AAGH,MAAa,iBACX,WAMA,OAAO,IAAI,UAAU,UAAU;CAC7B,MAAM,WAAW,OAAO,WAAW,MAAM;CACzC,IAAI,OAAO,SAAS,QAAQ,QAAQ,GAClC;CAEF,MAAM,OAAO,OAAO,SAAS,QAAQ,OAAO,OAAO,SAAS;CAC5D,OAAO,OAAO;EAAE;EAAQ;EAAU;CAAK,CAAC;AAC1C,CAAC;;AAGH,MAAa,gBACX,WAMA,OAAO,IAAI,UAAU,SAAS;CAC5B,MAAM,WAAW,OAAO,WAAW,MAAM;CACzC,IAAI,EAAE,OAAO,SAAS,QAAQ,QAAQ,IACpC,OAAO,OAAO,cAAc,GAAG,OAAO,KAAK,GAAG,OAAO,QAAQ,GAAG,eAAe;CAEjF,OAAO,OAAO,WAAW,QAAQ,QAAQ;AAC3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-D-rhjlSM.mjs","names":[],"sources":["../src/json.ts"],"sourcesContent":["import { Option, Schema } from \"effect\";\n\nconst JsonText = Schema.fromJsonString(Schema.Unknown);\n\nconst encodeJson = Schema.encodeUnknownOption(JsonText);\n\
|
|
1
|
+
{"version":3,"file":"json-D-rhjlSM.mjs","names":[],"sources":["../src/json.ts"],"sourcesContent":["import { Option, Schema } from \"effect\";\n\nconst JsonText = Schema.fromJsonString(Schema.Unknown);\n\nconst encodeJson = Schema.encodeUnknownOption(JsonText);\n\nexport const toJson = (value: unknown): string =>\n Option.getOrElse(encodeJson(value), () => String(value));\n\nexport const parseJson: (text: string) => Option.Option<unknown> = Schema.decodeOption(JsonText);\n"],"mappings":";;AAEA,MAAM,WAAW,OAAO,eAAe,OAAO,OAAO;AAErD,MAAM,aAAa,OAAO,oBAAoB,QAAQ;AAEtD,MAAa,UAAU,UACrB,OAAO,UAAU,WAAW,KAAK,SAAS,OAAO,KAAK,CAAC;AAEzD,MAAa,YAAsD,OAAO,aAAa,QAAQ"}
|
package/dist/postinstall.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ZIZMOR, i as BETTERLEAKS, o as runCli, r as ACTIONLINT, t as installBinary } from "./install-
|
|
1
|
+
import { a as ZIZMOR, i as BETTERLEAKS, o as runCli, r as ACTIONLINT, t as installBinary } from "./install-D6kuA6Oe.mjs";
|
|
2
2
|
import { Effect, Layer } from "effect";
|
|
3
3
|
import { FetchHttpClient } from "effect/http";
|
|
4
4
|
// src/postinstall.ts
|