@bryan-thompson/inspector-assessment-cli 1.20.10 → 1.20.12

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.
@@ -137,7 +137,44 @@ function loadSourceFiles(sourcePath) {
137
137
  }
138
138
  }
139
139
  result.sourceCodeFiles = new Map();
140
- const sourceExtensions = [".ts", ".js", ".py", ".go", ".rs"];
140
+ // Include config files for portability analysis
141
+ const sourceExtensions = [
142
+ ".ts",
143
+ ".js",
144
+ ".py",
145
+ ".go",
146
+ ".rs",
147
+ ".json",
148
+ ".sh",
149
+ ".yaml",
150
+ ".yml",
151
+ ];
152
+ // Parse .gitignore patterns
153
+ const gitignorePatterns = [];
154
+ const gitignorePath = path.join(sourcePath, ".gitignore");
155
+ if (fs.existsSync(gitignorePath)) {
156
+ const gitignoreContent = fs.readFileSync(gitignorePath, "utf-8");
157
+ for (const line of gitignoreContent.split("\n")) {
158
+ const trimmed = line.trim();
159
+ if (!trimmed || trimmed.startsWith("#"))
160
+ continue;
161
+ // Convert gitignore pattern to regex
162
+ const pattern = trimmed
163
+ .replace(/\./g, "\\.")
164
+ .replace(/\*\*/g, ".*")
165
+ .replace(/\*/g, "[^/]*")
166
+ .replace(/\?/g, ".");
167
+ try {
168
+ gitignorePatterns.push(new RegExp(pattern));
169
+ }
170
+ catch {
171
+ // Skip invalid patterns
172
+ }
173
+ }
174
+ }
175
+ const isGitignored = (relativePath) => {
176
+ return gitignorePatterns.some((pattern) => pattern.test(relativePath));
177
+ };
141
178
  const loadSourceDir = (dir, prefix = "") => {
142
179
  const entries = fs.readdirSync(dir, { withFileTypes: true });
143
180
  for (const entry of entries) {
@@ -145,6 +182,9 @@ function loadSourceFiles(sourcePath) {
145
182
  continue;
146
183
  const fullPath = path.join(dir, entry.name);
147
184
  const relativePath = prefix ? `${prefix}/${entry.name}` : entry.name;
185
+ // Skip gitignored files
186
+ if (isGitignored(relativePath))
187
+ continue;
148
188
  if (entry.isDirectory()) {
149
189
  loadSourceDir(fullPath, relativePath);
150
190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bryan-thompson/inspector-assessment-cli",
3
- "version": "1.20.10",
3
+ "version": "1.20.12",
4
4
  "description": "CLI for the Enhanced MCP Inspector with assessment capabilities",
5
5
  "license": "MIT",
6
6
  "author": "Bryan Thompson <bryan@triepod.ai>",