log-llm-config-staging 1.3.99 → 1.4.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.
@@ -1,4 +1,4 @@
1
- import { existsSync, statSync } from 'node:fs';
1
+ import { existsSync, readdirSync, statSync } from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
3
  import { readJSONFile, readMCPConfig, readMarkdownFile, readInstalledExtensions } from '../readers/file_readers.js';
4
4
  import { getExtensionsCachePath, getExtensionsCacheInstalledSuffix, getVscdbPath } from '../paths/path_constants_helpers.js';
@@ -125,6 +125,13 @@ function collectRegularFileEntry(t, enrichByFileType) {
125
125
  function collectMetadataEntry(t) {
126
126
  try {
127
127
  const stats = statSync(t.path);
128
+ if (stats.isDirectory?.()) {
129
+ try {
130
+ if (readdirSync(t.path).length === 0)
131
+ return null;
132
+ }
133
+ catch { /* unreadable — assume non-empty, allow */ }
134
+ }
128
135
  return { file_type: t.file_type, file_path: t.logicalFilePath ?? t.path, raw_content: { filename: t.path, last_modified: stats.mtime.toISOString(), source: 'file_metadata' }, collect_style: 'metadata' };
129
136
  }
130
137
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log-llm-config-staging",
3
- "version": "1.3.99",
3
+ "version": "1.4.0",
4
4
  "description": "CLI helpers for logging hardware UUIDs and posting startup payloads to Optimus Security.",
5
5
  "type": "module",
6
6
  "bin": {