capsalock 1.0.1 → 1.0.2

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.
@@ -32,7 +32,9 @@ var DEFAULT_IGNORE_DIRS = /* @__PURE__ */ new Set([
32
32
  "vendor",
33
33
  "target",
34
34
  "bin",
35
- "obj"
35
+ "obj",
36
+ "$recycle.bin",
37
+ "system volume information"
36
38
  ]);
37
39
  var DEFAULT_IGNORE_FILES = /* @__PURE__ */ new Set([
38
40
  ".ds_store",
@@ -144,7 +146,17 @@ async function crawlDiskDirectory(targetDir, options = {}) {
144
146
  let filesScanned = 0;
145
147
  let filesSkipped = 0;
146
148
  async function traverse(currentDir) {
147
- const entries = await fs.promises.readdir(currentDir, { withFileTypes: true });
149
+ let entries = [];
150
+ try {
151
+ entries = await fs.promises.readdir(currentDir, { withFileTypes: true });
152
+ } catch (err) {
153
+ filesSkipped++;
154
+ skippedDetails.push({
155
+ path: path.relative(absRoot, currentDir).replace(/\\/g, "/"),
156
+ reason: `Directory read error: ${err.message}`
157
+ });
158
+ return;
159
+ }
148
160
  for (const entry of entries) {
149
161
  const fullPath = path.join(currentDir, entry.name);
150
162
  const relPath = path.relative(absRoot, fullPath).replace(/\\/g, "/");
@@ -9939,7 +9951,7 @@ function parseCliArgs(args) {
9939
9951
  else if (arg === "--no-backup") createBackup = false;
9940
9952
  else if (!arg.startsWith("-")) positional.push(arg);
9941
9953
  for (const pos of positional) if (pos !== "scan" && pos !== "fix") {
9942
- targetDir = pos;
9954
+ targetDir = pos.replace(/^["']|["']$/g, "");
9943
9955
  break;
9944
9956
  }
9945
9957
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capsalock",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Zero-dependency sovereign AST security auditor, secret detector and deterministic auto-fixer",
5
5
  "type": "module",
6
6
  "bin": {