UNPKG

@apistudio/apim-cli

Version:

CLI for API Management Products

16 lines (15 loc) 493 B
export class RuntimeTransformer { constructor() { this.orchestratorPromise = null; } async loadOrchestrator() { if (!this.orchestratorPromise) { this.orchestratorPromise = import("@apic/smith-transformer").then((module) => module.createCoreOrchestrator()); } return this.orchestratorPromise; } async transform(zip) { const orchestrator = await this.loadOrchestrator(); return orchestrator.transform(zip); } }