UNPKG

@convo-lang/convo-lang

Version:
18 lines 604 B
import { httpClient, isHttp } from "@iyio/common"; export class ConvoHttpImportService { canImport(path) { return isHttp(path); } async handleImport(_import) { const path = _import.targetPath ?? _import.name; const isConvo = path?.toLowerCase().endsWith('.convo'); const file = await httpClient().getStringAsync(path); return { name: _import.name, convo: isConvo ? file : undefined, content: isConvo ? undefined : file, filePath: path }; } } //# sourceMappingURL=ConvoHttpImportService.js.map