diff --git a/packages/etl/src/command.ts b/packages/etl/src/command.ts index b7b3d2f5..88dc7456 100644 --- a/packages/etl/src/command.ts +++ b/packages/etl/src/command.ts @@ -1,6 +1,6 @@ import type { CrossrefClient } from 'crossref-openapi-client-ts' import { Command, Option } from '@commander-js/extra-typings' -import { Publisher, PublisherT } from 'docmaps-sdk' +import { Publisher, PublisherT } from '@docmaps/sdk' import { isLeft, right } from 'fp-ts/lib/Either' import { process as proc } from './processor' diff --git a/packages/etl/src/plugins/crossref/api.ts b/packages/etl/src/plugins/crossref/api.ts index ea6adef0..48cafb5f 100644 --- a/packages/etl/src/plugins/crossref/api.ts +++ b/packages/etl/src/plugins/crossref/api.ts @@ -3,7 +3,7 @@ import * as E from 'fp-ts/lib/Either' import type { Plugin } from '../../types' import { pipe } from 'fp-ts/lib/function' import * as TE from 'fp-ts/lib/TaskEither' -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import { relatedDoisForWork, decodeActionForWork } from './functions' import { mapLeftToUnknownError } from '../../utils' diff --git a/packages/etl/src/plugins/crossref/functions.ts b/packages/etl/src/plugins/crossref/functions.ts index 27a0e563..4b97cdc6 100644 --- a/packages/etl/src/plugins/crossref/functions.ts +++ b/packages/etl/src/plugins/crossref/functions.ts @@ -2,7 +2,7 @@ import { Work, DatemorphISOString } from 'crossref-openapi-client-ts' import * as E from 'fp-ts/lib/Either' import * as A from 'fp-ts/lib/Array' import { pipe } from 'fp-ts/lib/function' -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import { mapLeftToUnknownError, nameForAuthor } from '../../utils' import { Eq } from 'fp-ts/lib/string' diff --git a/packages/etl/src/processor.ts b/packages/etl/src/processor.ts index 05471a37..db7744f6 100644 --- a/packages/etl/src/processor.ts +++ b/packages/etl/src/processor.ts @@ -1,4 +1,4 @@ -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import type { Plugin, RecursiveStepDataChain } from './types' import * as TE from 'fp-ts/lib/TaskEither' import * as A from 'fp-ts/lib/Array' diff --git a/packages/etl/src/types.ts b/packages/etl/src/types.ts index 646f0631..9dd6782c 100644 --- a/packages/etl/src/types.ts +++ b/packages/etl/src/types.ts @@ -1,5 +1,5 @@ import type * as E from 'fp-ts/Either' -import type D from 'docmaps-sdk' +import type D from '@docmaps/sdk' import type * as TE from 'fp-ts/lib/TaskEither' export type ErrorOrDocmap = E.Either diff --git a/packages/etl/src/utils/index.ts b/packages/etl/src/utils/index.ts index c9cf6fae..70cb0341 100644 --- a/packages/etl/src/utils/index.ts +++ b/packages/etl/src/utils/index.ts @@ -1,4 +1,4 @@ -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import * as E from 'fp-ts/lib/Either' import { pipe } from 'fp-ts/lib/function' import type { ErrorOrDocmap } from '../types' diff --git a/packages/etl/test/integration/crossref.test.ts b/packages/etl/test/integration/crossref.test.ts index 8e97d84a..69848843 100644 --- a/packages/etl/test/integration/crossref.test.ts +++ b/packages/etl/test/integration/crossref.test.ts @@ -1,5 +1,5 @@ import test from 'ava' -import type { DocmapT } from 'docmaps-sdk' +import type { DocmapT } from '@docmaps/sdk' import { MakeCli } from '../../src/command' type cmdResult = { diff --git a/packages/etl/test/unit/__fixtures__/abstract.ts b/packages/etl/test/unit/__fixtures__/abstract.ts index 843c9608..2949627b 100644 --- a/packages/etl/test/unit/__fixtures__/abstract.ts +++ b/packages/etl/test/unit/__fixtures__/abstract.ts @@ -1,7 +1,7 @@ import type { InductiveStepResult, Plugin } from '../../../src/types' import { mock, instance } from 'ts-mockito' -import type * as D from 'docmaps-sdk' +import type * as D from '@docmaps/sdk' import * as TE from 'fp-ts/lib/TaskEither' import { MANUSCRIPT_DOI } from './crossref' diff --git a/packages/etl/test/unit/crossref/functions.test.ts b/packages/etl/test/unit/crossref/functions.test.ts index c8865740..c0d88a53 100644 --- a/packages/etl/test/unit/crossref/functions.test.ts +++ b/packages/etl/test/unit/crossref/functions.test.ts @@ -3,7 +3,7 @@ import * as cm from '../__fixtures__/crossref' import * as E from 'fp-ts/lib/Either' import { inspect } from 'util' import * as F from '../../../src/plugins/crossref/functions' -import type { ActionT } from 'docmaps-sdk' +import type { ActionT } from '@docmaps/sdk' function rightOrInspectError( t: ExecutionContext, diff --git a/packages/etl/test/unit/processor.test.ts b/packages/etl/test/unit/processor.test.ts index 4125b78c..49051038 100644 --- a/packages/etl/test/unit/processor.test.ts +++ b/packages/etl/test/unit/processor.test.ts @@ -5,7 +5,7 @@ import * as TE from 'fp-ts/lib/TaskEither' import { stepsForIdRecursive } from '../../src/processor' import { whenThenRight } from './utils' import * as am from './__fixtures__/abstract' -import type * as D from 'docmaps-sdk' +import type * as D from '@docmaps/sdk' import { when } from 'ts-mockito' const nothing = [] as D.ThingT[] diff --git a/packages/example/src/index.ts b/packages/example/src/index.ts index d0678df7..bd281666 100644 --- a/packages/example/src/index.ts +++ b/packages/example/src/index.ts @@ -1,4 +1,4 @@ -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import * as E from 'fp-ts/lib/Either' import * as A from 'fp-ts/lib/Array' import {pipe} from 'fp-ts/lib/function' @@ -38,7 +38,7 @@ const program = pipe( // note the use of `any` here, which is because the `actor` field // currently doesn't have any obligatory fields. This leaks the // type safety slightly by assuming there is a `name`. Improvements - // to the `docmaps-sdk` based on narrower specification or even more + // to the `@docmaps/sdk` based on narrower specification or even more // involved parsing in the consumer library (like this script) can // provide further safety. A.map((p) => (p.actor as any).name) diff --git a/packages/http-client/src/contract.ts b/packages/http-client/src/contract.ts index 24b10d72..748ebdca 100644 --- a/packages/http-client/src/contract.ts +++ b/packages/http-client/src/contract.ts @@ -1,5 +1,5 @@ import { initContract } from '@ts-rest/core' -import { DocmapT } from 'docmaps-sdk' +import { DocmapT } from '@docmaps/sdk' import { ApiInfo, ErrorBody } from './types' const c = initContract() diff --git a/packages/http-server/src/adapter/sparql_adapter.ts b/packages/http-server/src/adapter/sparql_adapter.ts index 429d8d73..858df932 100644 --- a/packages/http-server/src/adapter/sparql_adapter.ts +++ b/packages/http-server/src/adapter/sparql_adapter.ts @@ -1,7 +1,7 @@ import type * as RDF from '@rdfjs/types' import { CONSTRUCT, Construct, Describe } from '@tpluscode/sparql-builder' import { VALUES } from '@tpluscode/sparql-builder/expressions' -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import * as TE from 'fp-ts/lib/TaskEither' import * as T from 'fp-ts/lib/Task' import * as E from 'fp-ts/lib/Either' diff --git a/packages/http-server/src/api.ts b/packages/http-server/src/api.ts index f14d1a81..0b574fbf 100644 --- a/packages/http-server/src/api.ts +++ b/packages/http-server/src/api.ts @@ -1,6 +1,6 @@ import type { ApiInfo, BackendAdapter, ThingSpec } from './types' import * as TE from 'fp-ts/TaskEither' -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' /** ApiInstance - a concrete class that handles sourcing data and composing answers * diff --git a/packages/http-server/src/types.ts b/packages/http-server/src/types.ts index aac1cc84..da36370a 100644 --- a/packages/http-server/src/types.ts +++ b/packages/http-server/src/types.ts @@ -1,4 +1,4 @@ -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import * as TE from 'fp-ts/TaskEither' // TODO: use io-ts? this is only decodable by consumers... diff --git a/packages/http-server/test/integration/httpserver.test.ts b/packages/http-server/test/integration/httpserver.test.ts index 4244d55e..ddd22caf 100644 --- a/packages/http-server/test/integration/httpserver.test.ts +++ b/packages/http-server/test/integration/httpserver.test.ts @@ -1,5 +1,5 @@ import test from 'ava' -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import { inspect } from 'util' import { API_VERSION } from '../../src' import { MakeHttpClient } from '@docmaps/http-client' diff --git a/packages/http-server/test/unit/api.test.ts b/packages/http-server/test/unit/api.test.ts index b4ba4f9a..f9e35e17 100644 --- a/packages/http-server/test/unit/api.test.ts +++ b/packages/http-server/test/unit/api.test.ts @@ -2,7 +2,7 @@ import test from 'ava' import { SparqlAdapter } from '../../src/adapter' import { ApiInstance } from '../../src/api' import * as TE from 'fp-ts/lib/TaskEither' -import * as D from 'docmaps-sdk' +import * as D from '@docmaps/sdk' import { deepEqual, mock, instance, when } from 'ts-mockito' import { ThingSpec } from '../../src/types' @@ -72,7 +72,7 @@ test('docmap_by_id: consults the adapter', async (t) => { ).get_docmap_by_id(dm_content.id)() // TODO awkward use of `await .. ()`, is there a more natural way? - // The alternative is all that `rightAnd` business in docmaps-sdk + // The alternative is all that `rightAnd` business in @docmaps/sdk t.deepEqual(res, await TE.of(dm_content)()) }) @@ -101,6 +101,6 @@ test('docmap_for: consults the adapter', async (t) => { ).get_docmap_for_thing(spec)() // TODO awkward use of `await .. ()`, is there a more natural way? - // The alternative is all that `rightAnd` business in docmaps-sdk + // The alternative is all that `rightAnd` business in @docmaps/sdk t.deepEqual(res, await TE.of(dm_content)()) }) diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index 1c40420c..3496caf9 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -38,7 +38,7 @@ export const ContextUpsert = { * A `foaf:onlineAccount`, the online identity of some Agent (person, org, etc). * * @example - * import { OnlineAccountT, OnlineAccount } from 'docmaps-sdk'; + * import { OnlineAccountT, OnlineAccount } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const A: Validation = OnlineAccount.decode({ @@ -63,7 +63,7 @@ export const OnlineAccount = t.intersection([ * The publisher of a docmap * * @example - * import { PublisherT, Publisher } from 'docmaps-sdk'; + * import { PublisherT, Publisher } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const A: Validation = Publisher.decode({ @@ -100,7 +100,7 @@ export const Publisher = t.intersection([ * A fabio:Manifestation, which may be included in an Output. * * @example - * import { ManifestationT, Manifestation } from 'docmaps-sdk'; + * import { ManifestationT, Manifestation } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const A: Validation = Manifestation.decode({ @@ -133,7 +133,7 @@ export const Manifestation = t.intersection([ * but currently only a Person. * * @example - * import { ActorT, Actor } from 'docmaps-sdk'; + * import { ActorT, Actor } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const B: Validation = Actor.decode({ @@ -158,7 +158,7 @@ export const Actor = t.union([ * A pro:RoleInTime ; How a participant participated in an action * * @example - * import { RoleInTimeT, RoleInTime } from 'docmaps-sdk'; + * import { RoleInTimeT, RoleInTime } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const C: Validation = RoleInTime.decode({ @@ -204,7 +204,7 @@ export const ThingType = arrayOrOneOf([ * An output or input. * * @example - * import { ThingT, Thing } from 'docmaps-sdk'; + * import { ThingT, Thing } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const C: Validation = Thing.decode({ @@ -241,7 +241,7 @@ export const Thing = t.intersection([ * An action taken in a step. * * @example - * import { ActionT, Action } from 'docmaps-sdk'; + * import { ActionT, Action } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const C: Validation = Action.decode({ @@ -291,7 +291,7 @@ const Status = t.string * A claim about a document acquiring a status that is asserted by a certain step * * @example - * import { AssertionT, Assertion } from 'docmaps-sdk'; + * import { AssertionT, Assertion } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const C: Validation = Assertion.decode({ @@ -322,7 +322,7 @@ export const Assertion = t.intersection([ * set of actions may appear in a step with a different content hash). * * @example - * import { StepT, Step } from 'docmaps-sdk'; + * import { StepT, Step } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const C: Validation = Step.decode({ @@ -384,7 +384,7 @@ export const Step = t.intersection([ /** * @example - * import { DocmapT, Docmap } from 'docmaps-sdk'; + * import { DocmapT, Docmap } from '@docmaps/sdk'; * import { Validation } from 'io-ts'; * * const C: Validation = Docmap.decode({ diff --git a/packages/widget/src/docmap-controller.ts b/packages/widget/src/docmap-controller.ts index 23d8da87..2304c2fc 100644 --- a/packages/widget/src/docmap-controller.ts +++ b/packages/widget/src/docmap-controller.ts @@ -1,6 +1,6 @@ import { MakeHttpClient } from '@docmaps/http-client'; import { TaskFunction } from '@lit/task'; -import { ActorT, Docmap, DocmapT, ManifestationT, RoleInTimeT, StepT, ThingT } from 'docmaps-sdk'; +import { ActorT, Docmap, DocmapT, ManifestationT, RoleInTimeT, StepT, ThingT } from '@docmaps/sdk'; import { pipe } from 'fp-ts/lib/function'; import * as E from 'fp-ts/lib/Either'; import { diff --git a/packages/widget/test/integration/docmaps-widget.test.ts b/packages/widget/test/integration/docmaps-widget.test.ts index 677c6bce..7e8bc37c 100644 --- a/packages/widget/test/integration/docmaps-widget.test.ts +++ b/packages/widget/test/integration/docmaps-widget.test.ts @@ -129,7 +129,7 @@ test(`Can display details view for a Preprint with every field`, async ({ page } await expect(vals.nth(1)).toContainText('sick-preprint-bro'); // day-of-week omitted because of timezone differences between local and CI environments - // The widget doesn't actually handle this date conversion. It's done by the docmaps-sdk, so we + // The widget doesn't actually handle this date conversion. It's done by the @docmaps/sdk, so we // should test it there. await expect(keys.nth(2)).toContainText('published'); await expect(vals.nth(2)).toContainText('1993-10-');