main.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { createHoppApp } from "@hoppscotch/common"
  2. import { def as authDef } from "./platform/auth"
  3. import { def as environmentsDef } from "./platform/environments/environments.platform"
  4. import { def as collectionsDef } from "./platform/collections/collections.platform"
  5. import { def as settingsDef } from "./platform/settings/settings.platform"
  6. import { def as historyDef } from "./platform/history/history.platform"
  7. import { def as tabStateDef } from "./platform/tabState/tabState.platform"
  8. import { browserInterceptor } from "@hoppscotch/common/platform/std/interceptors/browser"
  9. import { proxyInterceptor } from "@hoppscotch/common/platform/std/interceptors/proxy"
  10. import { ExtensionInspectorService } from "@hoppscotch/common/platform/std/inspections/extension.inspector"
  11. import { ExtensionInterceptorService } from "@hoppscotch/common/platform/std/interceptors/extension"
  12. import { stdFooterItems } from "@hoppscotch/common/platform/std/ui/footerItem"
  13. import { stdSupportOptionItems } from "@hoppscotch/common/platform/std/ui/supportOptionsItem"
  14. createHoppApp("#app", {
  15. ui: {
  16. additionalFooterMenuItems: stdFooterItems,
  17. additionalSupportOptionsMenuItems: stdSupportOptionItems,
  18. },
  19. auth: authDef,
  20. sync: {
  21. environments: environmentsDef,
  22. collections: collectionsDef,
  23. settings: settingsDef,
  24. history: historyDef,
  25. tabState: tabStateDef,
  26. },
  27. interceptors: {
  28. default: "browser",
  29. interceptors: [
  30. { type: "standalone", interceptor: browserInterceptor },
  31. { type: "standalone", interceptor: proxyInterceptor },
  32. { type: "service", service: ExtensionInterceptorService },
  33. ],
  34. },
  35. additionalInspectors: [
  36. { type: "service", service: ExtensionInspectorService },
  37. ],
  38. platformFeatureFlags: {
  39. exportAsGIST: false,
  40. },
  41. })