chore: remove examples/externalPlugins.js and pluginLoader.ts, update imports to .js

Deleted `examples/externalPlugins.js` and `pluginLoader.ts` as they are no longer used. Updated all `.ts` imports to `.js` across the codebase. Added `MemberOf` to `VerbType` and filtered disabled augmentations in `executeAugmentationPipeline`. Updated documentation to reflect new augmentation registration process. Removed deprecated `allowImportingTsExtensions` from `tsconfig.json`.
This commit is contained in:
David Snelling 2025-05-29 09:52:30 -07:00
parent 7d2b695ea0
commit 203b669203
22 changed files with 1063 additions and 541 deletions

View file

@ -524,7 +524,10 @@ export class AugmentationPipeline {
data: R
error?: string
}>[]> {
if (augmentations.length === 0) {
// Filter out disabled augmentations
const enabledAugmentations = augmentations.filter(aug => aug.enabled !== false)
if (enabledAugmentations.length === 0) {
return []
}
@ -571,11 +574,11 @@ export class AugmentationPipeline {
switch (options.mode) {
case ExecutionMode.PARALLEL:
// Execute all augmentations in parallel
return augmentations.map(executeMethod)
return enabledAugmentations.map(executeMethod)
case ExecutionMode.FIRST_SUCCESS:
// Execute augmentations sequentially until one succeeds
for (const augmentation of augmentations) {
for (const augmentation of enabledAugmentations) {
const resultPromise = executeMethod(augmentation)
const result = await resultPromise
if (result.success) {
@ -586,7 +589,7 @@ export class AugmentationPipeline {
case ExecutionMode.FIRST_RESULT:
// Execute augmentations sequentially until one returns a result
for (const augmentation of augmentations) {
for (const augmentation of enabledAugmentations) {
const resultPromise = executeMethod(augmentation)
const result = await resultPromise
if (result.success && result.data) {
@ -603,7 +606,7 @@ export class AugmentationPipeline {
data: R
error?: string
}>[] = []
for (const augmentation of augmentations) {
for (const augmentation of enabledAugmentations) {
const resultPromise = executeMethod(augmentation)
results.push(resultPromise)