MCPcopy
hub / github.com/di-sukharev/opencommit / findModulePath

Function findModulePath

out/cli.cjs:85070–85084  ·  view source on GitHub ↗
(moduleName)

Source from the content-addressed store, hash-verified

85068var commitlintPrompts = {
85069 INIT_MAIN_PROMPT,
85070 GEN_COMMITLINT_CONSISTENCY_PROMPT
85071};
85072
85073// src/modules/commitlint/pwd-commitlint.ts
85074var import_promises = __toESM(require("fs/promises"), 1);
85075var import_path3 = __toESM(require("path"), 1);
85076var findModulePath = (moduleName) => {
85077 const searchPaths = [
85078 import_path3.default.join("node_modules", moduleName),
85079 import_path3.default.join("node_modules", ".pnpm"),
85080 import_path3.default.resolve(__dirname, "../..")
85081 ];
85082 for (const basePath of searchPaths) {
85083 try {
85084 const resolvedPath = require.resolve(moduleName, { paths: [basePath] });
85085 return resolvedPath;
85086 } catch {
85087 }

Callers 2

getCommitLintModuleTypeFunction · 0.70
getCommitLintPWDConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…