@karmaniverous/jeeves-watcher 0.8.2 → 0.8.3
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.
|
@@ -4398,6 +4398,13 @@ class DocumentProcessor {
|
|
|
4398
4398
|
await this.withFileErrorHandling(filePath, 'Failed to process file', async () => {
|
|
4399
4399
|
const ext = extname(filePath);
|
|
4400
4400
|
const { metadata, extracted, renderedContent, matchedRules, metadataWithRules, } = await this.buildMetadataWithRules(filePath);
|
|
4401
|
+
// Update values index before any skip conditions — values must
|
|
4402
|
+
// reflect current rule matches even when content is unchanged.
|
|
4403
|
+
if (this.valuesManager) {
|
|
4404
|
+
for (const ruleName of matchedRules) {
|
|
4405
|
+
this.valuesManager.update(ruleName, metadata);
|
|
4406
|
+
}
|
|
4407
|
+
}
|
|
4401
4408
|
const textToEmbed = renderedContent ?? extracted.text;
|
|
4402
4409
|
if (!textToEmbed.trim()) {
|
|
4403
4410
|
this.logger.debug({ filePath }, 'Skipping empty file');
|
|
@@ -4425,11 +4432,6 @@ class DocumentProcessor {
|
|
|
4425
4432
|
logger: this.logger,
|
|
4426
4433
|
}, textToEmbed, filePath, metadataWithRules, existingPayload, fileDates);
|
|
4427
4434
|
this.issuesManager?.clear(filePath);
|
|
4428
|
-
if (this.valuesManager) {
|
|
4429
|
-
for (const ruleName of matchedRules) {
|
|
4430
|
-
this.valuesManager.update(ruleName, metadata);
|
|
4431
|
-
}
|
|
4432
|
-
}
|
|
4433
4435
|
}, undefined);
|
|
4434
4436
|
}
|
|
4435
4437
|
/**
|
package/dist/index.js
CHANGED
|
@@ -4376,6 +4376,13 @@ class DocumentProcessor {
|
|
|
4376
4376
|
await this.withFileErrorHandling(filePath, 'Failed to process file', async () => {
|
|
4377
4377
|
const ext = extname(filePath);
|
|
4378
4378
|
const { metadata, extracted, renderedContent, matchedRules, metadataWithRules, } = await this.buildMetadataWithRules(filePath);
|
|
4379
|
+
// Update values index before any skip conditions — values must
|
|
4380
|
+
// reflect current rule matches even when content is unchanged.
|
|
4381
|
+
if (this.valuesManager) {
|
|
4382
|
+
for (const ruleName of matchedRules) {
|
|
4383
|
+
this.valuesManager.update(ruleName, metadata);
|
|
4384
|
+
}
|
|
4385
|
+
}
|
|
4379
4386
|
const textToEmbed = renderedContent ?? extracted.text;
|
|
4380
4387
|
if (!textToEmbed.trim()) {
|
|
4381
4388
|
this.logger.debug({ filePath }, 'Skipping empty file');
|
|
@@ -4403,11 +4410,6 @@ class DocumentProcessor {
|
|
|
4403
4410
|
logger: this.logger,
|
|
4404
4411
|
}, textToEmbed, filePath, metadataWithRules, existingPayload, fileDates);
|
|
4405
4412
|
this.issuesManager?.clear(filePath);
|
|
4406
|
-
if (this.valuesManager) {
|
|
4407
|
-
for (const ruleName of matchedRules) {
|
|
4408
|
-
this.valuesManager.update(ruleName, metadata);
|
|
4409
|
-
}
|
|
4410
|
-
}
|
|
4411
4413
|
}, undefined);
|
|
4412
4414
|
}
|
|
4413
4415
|
/**
|
package/package.json
CHANGED