diff --git a/web/app/components/document/sidebar.ts b/web/app/components/document/sidebar.ts index 5da3db2fc..05a6d1fa3 100644 --- a/web/app/components/document/sidebar.ts +++ b/web/app/components/document/sidebar.ts @@ -14,7 +14,7 @@ import cleanString from "hermes/utils/clean-string"; import { debounce } from "@ember/runloop"; import FetchService from "hermes/services/fetch"; import RouterService from "@ember/routing/router-service"; -import SessionService from "hermes/services/_session"; +import SessionService from "hermes/services/session"; import FlashMessageService from "ember-cli-flash/services/flash-messages"; import { AuthenticatedUser } from "hermes/services/authenticated-user"; import { HermesDocument, HermesUser } from "hermes/types/document"; diff --git a/web/app/components/header/nav.ts b/web/app/components/header/nav.ts index f2b477151..a40f1e6e5 100644 --- a/web/app/components/header/nav.ts +++ b/web/app/components/header/nav.ts @@ -2,7 +2,7 @@ import Component from "@glimmer/component"; import { inject as service } from "@ember/service"; import { action } from "@ember/object"; import ConfigService from "hermes/services/config"; -import SessionService from "hermes/services/_session"; +import SessionService from "hermes/services/session"; import RouterService from "@ember/routing/router-service"; import AuthenticatedUserService, { AuthenticatedUser, diff --git a/web/app/controllers/authenticate.ts b/web/app/controllers/authenticate.ts index ad97aae77..13dcd2b47 100644 --- a/web/app/controllers/authenticate.ts +++ b/web/app/controllers/authenticate.ts @@ -1,6 +1,6 @@ import Controller from "@ember/controller"; import { inject as service } from "@ember/service"; -import SessionService from "hermes/services/_session"; +import SessionService from "hermes/services/session"; import { dropTask } from "ember-concurrency"; export default class AuthenticateController extends Controller { diff --git a/web/app/routes/application.ts b/web/app/routes/application.ts index 357940912..f68e91a23 100644 --- a/web/app/routes/application.ts +++ b/web/app/routes/application.ts @@ -4,11 +4,10 @@ import { action } from "@ember/object"; import { inject as service } from "@ember/service"; import ConfigService from "hermes/services/config"; import FetchService from "hermes/services/fetch"; -import SessionService from "hermes/services/_session"; +import SessionService, { REDIRECT_STORAGE_KEY } from "hermes/services/session"; import RouterService from "@ember/routing/router-service"; import window from "ember-window-mock"; -import { REDIRECT_STORAGE_KEY } from "hermes/services/_session"; import Transition from "@ember/routing/transition"; import MetricsService from "hermes/services/_metrics"; diff --git a/web/app/routes/authenticate.ts b/web/app/routes/authenticate.ts index 2a4e3b6c6..ffa9dce6f 100644 --- a/web/app/routes/authenticate.ts +++ b/web/app/routes/authenticate.ts @@ -2,7 +2,7 @@ import Route from "@ember/routing/route"; import { inject as service } from "@ember/service"; import ConfigService from "hermes/services/config"; import RouterService from "@ember/routing/router-service"; -import SessionService from "hermes/services/_session"; +import SessionService from "hermes/services/session"; export default class AuthenticateRoute extends Route { @service("config") declare configSvc: ConfigService; diff --git a/web/app/routes/authenticated.ts b/web/app/routes/authenticated.ts index 91b78f25b..15b204d39 100644 --- a/web/app/routes/authenticated.ts +++ b/web/app/routes/authenticated.ts @@ -2,7 +2,7 @@ import Route from "@ember/routing/route"; import { inject as service } from "@ember/service"; import AuthenticatedUserService from "hermes/services/authenticated-user"; import ConfigService from "hermes/services/config"; -import SessionService from "hermes/services/_session"; +import SessionService from "hermes/services/session"; export default class AuthenticatedRoute extends Route { @service("config") declare configSvc: ConfigService; diff --git a/web/app/routes/authenticated/dashboard.ts b/web/app/routes/authenticated/dashboard.ts index c03bd026c..6ceb5420b 100644 --- a/web/app/routes/authenticated/dashboard.ts +++ b/web/app/routes/authenticated/dashboard.ts @@ -4,7 +4,7 @@ import AlgoliaService from "hermes/services/algolia"; import ConfigService from "hermes/services/config"; import FetchService from "hermes/services/fetch"; import RecentlyViewedDocsService from "hermes/services/recently-viewed-docs"; -import SessionService from "hermes/services/_session"; +import SessionService from "hermes/services/session"; import AuthenticatedUserService from "hermes/services/authenticated-user"; // @ts-ignore - Not yet typed diff --git a/web/app/services/algolia.ts b/web/app/services/algolia.ts index 84be396a3..8dbe700a2 100644 --- a/web/app/services/algolia.ts +++ b/web/app/services/algolia.ts @@ -14,7 +14,7 @@ import { FacetRecord, FacetRecords, } from "hermes/types/facets"; -import SessionService from "./_session"; +import SessionService from "./session"; export const HITS_PER_PAGE = 12; export const MAX_VALUES_PER_FACET = 100; diff --git a/web/app/services/authenticated-user.ts b/web/app/services/authenticated-user.ts index 643a73163..2ea2cdbec 100644 --- a/web/app/services/authenticated-user.ts +++ b/web/app/services/authenticated-user.ts @@ -5,7 +5,7 @@ import Store from "@ember-data/store"; import { assert } from "@ember/debug"; import { task } from "ember-concurrency"; import FetchService from "hermes/services/fetch"; -import SessionService from "./_session"; +import SessionService from "./session"; export interface AuthenticatedUser { name: string; diff --git a/web/app/services/fetch.ts b/web/app/services/fetch.ts index 02e6dc28b..16e203f6e 100644 --- a/web/app/services/fetch.ts +++ b/web/app/services/fetch.ts @@ -2,7 +2,7 @@ import Service from "@ember/service"; import fetch from "fetch"; import { inject as service } from "@ember/service"; import ConfigService from "hermes/services/config"; -import SessionService from "./_session"; +import SessionService from "./session"; interface FetchOptions { method?: string; diff --git a/web/app/services/session.d.ts b/web/app/services/session.d.ts new file mode 100644 index 000000000..c6ca1c131 --- /dev/null +++ b/web/app/services/session.d.ts @@ -0,0 +1,3 @@ +export { default } from "./_session"; +export { REDIRECT_STORAGE_KEY, isJSON } from "./_session"; +export * from "./_session"; diff --git a/web/tests/acceptance/application-test.ts b/web/tests/acceptance/application-test.ts index f34512f49..1cb8f7937 100644 --- a/web/tests/acceptance/application-test.ts +++ b/web/tests/acceptance/application-test.ts @@ -6,7 +6,7 @@ import { invalidateSession, } from "ember-simple-auth/test-support"; import { MirageTestContext, setupMirage } from "ember-cli-mirage/test-support"; -import SessionService from "hermes/services/_session"; +import SessionService from "hermes/services/session"; import { TEST_SUPPORT_URL } from "hermes/utils/hermes-urls"; module("Acceptance | application", function (hooks) { diff --git a/web/tests/unit/services/session-test.ts b/web/tests/unit/services/session-test.ts index 8effea843..80608fa52 100644 --- a/web/tests/unit/services/session-test.ts +++ b/web/tests/unit/services/session-test.ts @@ -1,6 +1,6 @@ import { module, test } from "qunit"; import { setupTest } from "ember-qunit"; -import { REDIRECT_STORAGE_KEY, isJSON } from "hermes/services/_session"; +import { REDIRECT_STORAGE_KEY, isJSON } from "hermes/services/session"; import window from "ember-window-mock"; const TEST_STORAGE_KEY = `test-${REDIRECT_STORAGE_KEY}`;