Skip to content

Commit

Permalink
Move docmaps/docmap route in its intended location #3239
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgiosironi committed May 15, 2024
1 parent d03145a commit fa82d50
Show file tree
Hide file tree
Showing 20 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/docmaps/docmap-index/construct-view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { filterByParams } from './filter-by-params';
import { identifyAllPossibleIndexEntries } from './identify-all-possible-index-entries';
import { Params } from './params';
import { DocmapIndexViewModel } from './view-model';
import { constructDocmapViewModel } from '../../read-side/non-html-views/docmaps/docmap/construct-docmap-view-model';
import { supportedGroups } from '../../read-side/non-html-views/docmaps/supported-groups';
import { constructDocmapViewModel } from '../docmap/construct-docmap-view-model';

type ConstructDocmapIndexViewModel = (dependencies: Dependencies)
=> (params: Params)
Expand Down
2 changes: 1 addition & 1 deletion src/docmaps/docmap-index/dependencies.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Ports as DocmapDependencies } from '../../read-side/non-html-views/docmaps/docmap/construct-docmap-view-model';
import { Logger } from '../../shared-ports';
import { Ports as DocmapDependencies } from '../docmap/construct-docmap-view-model';

export type Dependencies = DocmapDependencies & {
logger: Logger,
Expand Down
2 changes: 1 addition & 1 deletion src/docmaps/docmap-index/docmap-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { StatusCodes } from 'http-status-codes';
import { constructViewModel } from './construct-view-model';
import { Dependencies } from './dependencies';
import { decodeParams } from './filter-by-params';
import { renderDocmap } from '../docmap/render-docmap';
import { renderDocmap } from '../../read-side/non-html-views/docmaps/docmap/render-docmap';

type DocmapIndexBody = {
articles?: ReadonlyArray<unknown>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { flow, pipe } from 'fp-ts/function';
import * as S from 'fp-ts/string';
import { Dependencies } from './dependencies';
import * as ER from './error-response';
import { publisherAccountId } from '../../read-side/non-html-views/docmaps/docmap/publisher-account-id';
import * as DE from '../../types/data-error';
import { ExpressionDoi } from '../../types/expression-doi';
import * as GID from '../../types/group-id';
import { GroupId } from '../../types/group-id';
import { publisherAccountId } from '../docmap/publisher-account-id';

export type DocmapIndexEntryModel = {
expressionDoi: ExpressionDoi,
Expand Down
2 changes: 1 addition & 1 deletion src/docmaps/docmap-index/view-model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { DocmapViewModel } from '../docmap/view-model';
import { DocmapViewModel } from '../../read-side/non-html-views/docmaps/docmap/view-model';

export type DocmapIndexViewModel = ReadonlyArray<DocmapViewModel>;
2 changes: 1 addition & 1 deletion src/http/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { pageHandler } from './page-handler';
import { ping } from './ping';
import { requireLoggedInUser } from './require-logged-in-user';
import { robots } from './robots';
import { generateDocmaps } from '../docmaps/docmap';
import { docmapIndex } from '../docmaps/docmap-index';
import { evaluationContent, paramsCodec as evaluationContentParams } from '../evaluation-content';
import { CollectedPorts } from '../infrastructure';
Expand Down Expand Up @@ -46,6 +45,7 @@ import { referencePage, sharedComponentsPage, indexPage } from '../read-side/htm
import { subscribeToListPage } from '../read-side/html-pages/subscribe-to-list-page';
import { userPage as userFollowingPage, userPageParams as userFollowingPageParams } from '../read-side/html-pages/user-page/user-following-page';
import { userPage as userListsPage, userPageParams as userListsPageParams } from '../read-side/html-pages/user-page/user-lists-page';
import { generateDocmaps } from '../read-side/non-html-views/docmaps/docmap';
import { listFeed } from '../read-side/non-html-views/list/list-feed';
import { applicationStatus } from '../read-side/non-html-views/status';
import { statusGroups } from '../read-side/non-html-views/status-groups';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray';
import * as TE from 'fp-ts/TaskEither';
import { flow, pipe } from 'fp-ts/function';
import { DocmapViewModel } from './view-model';
import { Queries } from '../../read-models';
import { ExternalQueries } from '../../third-parties';
import * as DE from '../../types/data-error';
import * as EDOI from '../../types/expression-doi';
import { GroupId } from '../../types/group-id';
import { RecordedEvaluation } from '../../types/recorded-evaluation';
import { Queries } from '../../../../read-models';
import { ExternalQueries } from '../../../../third-parties';
import * as DE from '../../../../types/data-error';
import * as EDOI from '../../../../types/expression-doi';
import { GroupId } from '../../../../types/group-id';
import { RecordedEvaluation } from '../../../../types/recorded-evaluation';

type DocmapIdentifier = {
expressionDoi: EDOI.ExpressionDoi,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { URL } from 'url';
import * as EL from '../../types/evaluation-locator';
import * as EL from '../../../../types/evaluation-locator';

export type Evaluation = {
sourceUrl: URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { StatusCodes } from 'http-status-codes';
import { Ports as DocmapPorts, constructDocmapViewModel } from './construct-docmap-view-model';
import { Docmap } from './docmap-type';
import { renderDocmap } from './render-docmap';
import { Queries } from '../../read-models';
import { supportedGroups } from '../../read-side/non-html-views/docmaps/supported-groups';
import { articleIdCodec, ArticleId, toExpressionDoi } from '../../types/article-id';
import * as EDOI from '../../types/expression-doi';
import { Queries } from '../../../../read-models';
import { articleIdCodec, ArticleId, toExpressionDoi } from '../../../../types/article-id';
import * as EDOI from '../../../../types/expression-doi';
import { supportedGroups } from '../supported-groups';

export type Ports = DocmapPorts & Queries;

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Group } from '../../types/group';
import { Group } from '../../../../types/group';

type ObjectWithGroupSlug = Pick<Group, 'slug'>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { Evaluation } from './evaluation';
import { anonymous, peerReviewer } from './peer-reviewer';
import { publisherAccountId } from './publisher-account-id';
import { DocmapViewModel } from './view-model';
import { constructPaperActivityPageHref } from '../../read-side/paths';
import * as EL from '../../types/evaluation-locator';
import * as EDOI from '../../types/expression-doi';
import * as EL from '../../../../types/evaluation-locator';
import * as EDOI from '../../../../types/expression-doi';
import { constructPaperActivityPageHref } from '../../../paths';

const renderInputs = (expressionDoi: EDOI.ExpressionDoi) => [{
doi: expressionDoi,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray';
import { Evaluation } from './evaluation';
import * as EDOI from '../../types/expression-doi';
import { Group } from '../../types/group';
import * as EDOI from '../../../../types/expression-doi';
import { Group } from '../../../../types/group';

export type DocmapViewModel = {
expressionDoi: EDOI.ExpressionDoi,
Expand Down
2 changes: 1 addition & 1 deletion test/docmaps/docmap-index/construct-view-model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import * as TE from 'fp-ts/TaskEither';
import { pipe } from 'fp-ts/function';
import { StatusCodes } from 'http-status-codes';
import { identity } from 'io-ts';
import { publisherAccountId } from '../../../src/docmaps/docmap/publisher-account-id';
import { constructViewModel } from '../../../src/docmaps/docmap-index/construct-view-model';
import * as ER from '../../../src/docmaps/docmap-index/error-response';
import { Params } from '../../../src/docmaps/docmap-index/params';
import { publisherAccountId } from '../../../src/read-side/non-html-views/docmaps/docmap/publisher-account-id';
import { supportedGroups } from '../../../src/read-side/non-html-views/docmaps/supported-groups';
import { toExpressionDoi } from '../../../src/types/article-id';
import { TestFramework, createTestFramework } from '../../framework';
Expand Down
4 changes: 2 additions & 2 deletions test/docmaps/docmap/construct-docmap-view-model.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as E from 'fp-ts/Either';
import * as TE from 'fp-ts/TaskEither';
import { pipe } from 'fp-ts/function';
import { constructDocmapViewModel, Ports } from '../../../src/docmaps/docmap/construct-docmap-view-model';
import { DocmapViewModel } from '../../../src/docmaps/docmap/view-model';
import { constructDocmapViewModel, Ports } from '../../../src/read-side/non-html-views/docmaps/docmap/construct-docmap-view-model';
import { DocmapViewModel } from '../../../src/read-side/non-html-views/docmaps/docmap/view-model';
import { toExpressionDoi } from '../../../src/types/article-id';
import * as DE from '../../../src/types/data-error';
import { RecordEvaluationPublicationCommand } from '../../../src/write-side/commands';
Expand Down
6 changes: 3 additions & 3 deletions test/docmaps/docmap/generate-docmaps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { URL } from 'url';
import * as TE from 'fp-ts/TaskEither';
import { identity, pipe } from 'fp-ts/function';
import { StatusCodes } from 'http-status-codes';
import { generateDocmaps } from '../../../src/docmaps/docmap';
import { Docmap } from '../../../src/docmaps/docmap/docmap-type';
import { Ports } from '../../../src/docmaps/docmap/generate-docmaps';
import { generateDocmaps } from '../../../src/read-side/non-html-views/docmaps/docmap';
import { Docmap } from '../../../src/read-side/non-html-views/docmaps/docmap/docmap-type';
import { Ports } from '../../../src/read-side/non-html-views/docmaps/docmap/generate-docmaps';
import { toExpressionDoi } from '../../../src/types/article-id';
import * as DE from '../../../src/types/data-error';
import { EvaluationLocator } from '../../../src/types/evaluation-locator';
Expand Down
2 changes: 1 addition & 1 deletion test/docmaps/docmap/publisher-account-id.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { publisherAccountId } from '../../../src/docmaps/docmap/publisher-account-id';
import { publisherAccountId } from '../../../src/read-side/non-html-views/docmaps/docmap/publisher-account-id';
import { arbitraryGroup } from '../../types/group.helper';

describe('publisher-account-id', () => {
Expand Down
10 changes: 5 additions & 5 deletions test/docmaps/docmap/render-docmap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
/* eslint-disable jest/require-hook */
import { URL } from 'url';
import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray';
import { Docmap } from '../../../src/docmaps/docmap/docmap-type';
import { Evaluation } from '../../../src/docmaps/docmap/evaluation';
import { anonymous } from '../../../src/docmaps/docmap/peer-reviewer';
import { publisherAccountId } from '../../../src/docmaps/docmap/publisher-account-id';
import { renderDocmap } from '../../../src/docmaps/docmap/render-docmap';
import { Docmap } from '../../../src/read-side/non-html-views/docmaps/docmap/docmap-type';
import { Evaluation } from '../../../src/read-side/non-html-views/docmaps/docmap/evaluation';
import { anonymous } from '../../../src/read-side/non-html-views/docmaps/docmap/peer-reviewer';
import { publisherAccountId } from '../../../src/read-side/non-html-views/docmaps/docmap/publisher-account-id';
import { renderDocmap } from '../../../src/read-side/non-html-views/docmaps/docmap/render-docmap';
import { ExpressionDoi } from '../../../src/types/expression-doi';
import {
arbitraryDate, arbitraryString, arbitraryUrl,
Expand Down

0 comments on commit fa82d50

Please sign in to comment.