UNPKG

@scalar/api-client

Version:

the open source API testing client

22 lines (21 loc) 684 B
import { createWebHistoryRouter as a } from "../../router.js"; import c from "./ApiClientWeb.vue.js"; import "./ApiClientWeb.vue2.js"; import { saveActiveWorkspace as s } from "../../routes.js"; import { createApiClient as i } from "../../libs/create-client.js"; const w = async (o, e = {}, p = !0) => { const t = a(), r = i({ el: o, appComponent: c, configuration: e, mountOnInitialize: p, router: t, layout: "web" }), { importSpecFile: m, importSpecFromUrl: l } = r.store; return t.afterEach(s), e.url ? await l(e.url, "default", { proxyUrl: e.proxyUrl }) : e.content && await m(e.content, "default"), r; }; export { w as createApiClientWeb };