md4ai 0.9.3 → 0.9.4

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.
@@ -1149,22 +1149,43 @@ async function readClaudeConfigFiles(projectRoot) {
1149
1149
  ".claude/skills/*.md"
1150
1150
  ];
1151
1151
  const files = [];
1152
+ const seen = /* @__PURE__ */ new Set();
1153
+ async function addFile(fullPath) {
1154
+ const relPath = relative4(projectRoot, fullPath);
1155
+ if (seen.has(relPath))
1156
+ return;
1157
+ seen.add(relPath);
1158
+ try {
1159
+ const content = await readFile10(fullPath, "utf-8");
1160
+ const fileStat = await stat(fullPath);
1161
+ const lastMod = getGitLastModified(fullPath, projectRoot);
1162
+ files.push({ filePath: relPath, content, sizeBytes: fileStat.size, lastModified: lastMod });
1163
+ } catch {
1164
+ }
1165
+ }
1152
1166
  for (const pattern of configPatterns) {
1153
1167
  for await (const fullPath of glob2(join14(projectRoot, pattern))) {
1154
1168
  if (!existsSync13(fullPath))
1155
1169
  continue;
1156
- try {
1157
- const content = await readFile10(fullPath, "utf-8");
1158
- const fileStat = await stat(fullPath);
1159
- const lastMod = getGitLastModified(fullPath, projectRoot);
1160
- files.push({
1161
- filePath: relative4(projectRoot, fullPath),
1162
- content,
1163
- sizeBytes: fileStat.size,
1164
- lastModified: lastMod
1165
- });
1166
- } catch {
1170
+ await addFile(fullPath);
1171
+ }
1172
+ }
1173
+ const pkgPath = join14(projectRoot, "package.json");
1174
+ if (existsSync13(pkgPath)) {
1175
+ try {
1176
+ const pkgContent = await readFile10(pkgPath, "utf-8");
1177
+ const pkg = JSON.parse(pkgContent);
1178
+ const preflightCmd = pkg.scripts?.preflight;
1179
+ if (preflightCmd) {
1180
+ const match = preflightCmd.match(/(?:bash\s+|sh\s+|\.\/)?(\S+\.(?:sh|bash|ts|js|mjs))/);
1181
+ if (match) {
1182
+ const scriptPath = join14(projectRoot, match[1]);
1183
+ if (existsSync13(scriptPath)) {
1184
+ await addFile(scriptPath);
1185
+ }
1186
+ }
1167
1187
  }
1188
+ } catch {
1168
1189
  }
1169
1190
  }
1170
1191
  return files;
@@ -1378,7 +1399,7 @@ var CURRENT_VERSION;
1378
1399
  var init_check_update = __esm({
1379
1400
  "dist/check-update.js"() {
1380
1401
  "use strict";
1381
- CURRENT_VERSION = true ? "0.9.3" : "0.0.0-dev";
1402
+ CURRENT_VERSION = true ? "0.9.4" : "0.0.0-dev";
1382
1403
  }
1383
1404
  });
1384
1405
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4ai",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "CLI for MD4AI — scan Claude projects and sync to your dashboard",
5
5
  "type": "module",
6
6
  "bin": {