Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define SessionService exports #322

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/app/components/document/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion web/app/components/header/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion web/app/controllers/authenticate.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions web/app/routes/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion web/app/routes/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/app/routes/authenticated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/app/routes/authenticated/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion web/app/services/algolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/app/services/authenticated-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/app/services/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions web/app/services/session.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { default } from "./_session";
export { REDIRECT_STORAGE_KEY, isJSON } from "./_session";
export * from "./_session";
2 changes: 1 addition & 1 deletion web/tests/acceptance/application-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion web/tests/unit/services/session-test.ts
Original file line number Diff line number Diff line change
@@ -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}`;
Expand Down