@apistudio/apim-cli
Version:
CLI for API Management Products
16 lines (15 loc) • 514 B
JavaScript
export class WMGWRuntimeTransformer {
constructor() {
this.orchestratorPromise = null;
}
async loadOrchestrator() {
if (!this.orchestratorPromise) {
this.orchestratorPromise = import("@apic/wmgw-smith-transformer").then(async (module) => await module.createWmgwOrchestrator());
}
return this.orchestratorPromise;
}
async transform(zip) {
const orchestrator = await this.loadOrchestrator();
return orchestrator.transform(zip);
}
}