mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 22:34:56 +00:00
- Python: class extending NodeExecutor + factory.py (80+ plugins) - TypeScript: class implements NodeExecutor + factory.ts (7 groups, 116 classes) - Go: struct with methods + factory.go (36 plugins) - Rust: struct impl NodeExecutor trait + factory.rs (54 plugins) - Mojo: struct + factory.mojo (11 plugins) All package.json files now include: - files array listing source files - metadata.class/struct field - metadata.entrypoint field This enables a unified plugin loading system across all languages with no import side effects (Spring-style DI pattern). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
103 lines
2.3 KiB
TypeScript
103 lines
2.3 KiB
TypeScript
/**
|
|
* Factory for string plugin classes.
|
|
*/
|
|
|
|
import {
|
|
StringConcat,
|
|
StringFormat,
|
|
StringLength,
|
|
StringLower,
|
|
StringUpper,
|
|
StringTrim,
|
|
StringReplace,
|
|
StringSplit,
|
|
StringJoin,
|
|
StringSubstring,
|
|
StringIncludes,
|
|
StringStartsWith,
|
|
StringEndsWith,
|
|
StringPadStart,
|
|
StringPadEnd,
|
|
} from './index';
|
|
|
|
export function createStringConcat(): StringConcat {
|
|
return new StringConcat();
|
|
}
|
|
|
|
export function createStringFormat(): StringFormat {
|
|
return new StringFormat();
|
|
}
|
|
|
|
export function createStringLength(): StringLength {
|
|
return new StringLength();
|
|
}
|
|
|
|
export function createStringLower(): StringLower {
|
|
return new StringLower();
|
|
}
|
|
|
|
export function createStringUpper(): StringUpper {
|
|
return new StringUpper();
|
|
}
|
|
|
|
export function createStringTrim(): StringTrim {
|
|
return new StringTrim();
|
|
}
|
|
|
|
export function createStringReplace(): StringReplace {
|
|
return new StringReplace();
|
|
}
|
|
|
|
export function createStringSplit(): StringSplit {
|
|
return new StringSplit();
|
|
}
|
|
|
|
export function createStringJoin(): StringJoin {
|
|
return new StringJoin();
|
|
}
|
|
|
|
export function createStringSubstring(): StringSubstring {
|
|
return new StringSubstring();
|
|
}
|
|
|
|
export function createStringIncludes(): StringIncludes {
|
|
return new StringIncludes();
|
|
}
|
|
|
|
export function createStringStartsWith(): StringStartsWith {
|
|
return new StringStartsWith();
|
|
}
|
|
|
|
export function createStringEndsWith(): StringEndsWith {
|
|
return new StringEndsWith();
|
|
}
|
|
|
|
export function createStringPadStart(): StringPadStart {
|
|
return new StringPadStart();
|
|
}
|
|
|
|
export function createStringPadEnd(): StringPadEnd {
|
|
return new StringPadEnd();
|
|
}
|
|
|
|
// Factory map for all string plugins
|
|
export const factories = {
|
|
'string.concat': createStringConcat,
|
|
'string.format': createStringFormat,
|
|
'string.length': createStringLength,
|
|
'string.lower': createStringLower,
|
|
'string.upper': createStringUpper,
|
|
'string.trim': createStringTrim,
|
|
'string.replace': createStringReplace,
|
|
'string.split': createStringSplit,
|
|
'string.join': createStringJoin,
|
|
'string.substring': createStringSubstring,
|
|
'string.includes': createStringIncludes,
|
|
'string.startsWith': createStringStartsWith,
|
|
'string.endsWith': createStringEndsWith,
|
|
'string.padStart': createStringPadStart,
|
|
'string.padEnd': createStringPadEnd,
|
|
};
|
|
|
|
export default factories;
|