Skip to content

Commit

Permalink
update imports to match
Browse files Browse the repository at this point in the history
  • Loading branch information
ships committed Dec 13, 2023
1 parent 49c60a2 commit d7a66b0
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion packages/etl/src/command.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
2 changes: 1 addition & 1 deletion packages/etl/src/plugins/crossref/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion packages/etl/src/plugins/crossref/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion packages/etl/src/processor.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/etl/src/types.ts
Original file line number Diff line number Diff line change
@@ -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<Error, D.DocmapT[]>
Expand Down
2 changes: 1 addition & 1 deletion packages/etl/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/etl/test/integration/crossref.test.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion packages/etl/test/unit/__fixtures__/abstract.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
2 changes: 1 addition & 1 deletion packages/etl/test/unit/crossref/functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>(
t: ExecutionContext,
Expand Down
2 changes: 1 addition & 1 deletion packages/etl/test/unit/processor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
4 changes: 2 additions & 2 deletions packages/example/src/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/http-client/src/contract.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion packages/http-server/src/adapter/sparql_adapter.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/http-server/src/api.ts
Original file line number Diff line number Diff line change
@@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion packages/http-server/src/types.ts
Original file line number Diff line number Diff line change
@@ -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...
Expand Down
2 changes: 1 addition & 1 deletion packages/http-server/test/integration/httpserver.test.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
6 changes: 3 additions & 3 deletions packages/http-server/test/unit/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)())
})

Expand Down Expand Up @@ -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)())
})
20 changes: 10 additions & 10 deletions packages/sdk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<OnlineAccountT> = OnlineAccount.decode({
Expand All @@ -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<PublisherT> = Publisher.decode({
Expand Down Expand Up @@ -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<ManifestationT> = Manifestation.decode({
Expand Down Expand Up @@ -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<ActorT> = Actor.decode({
Expand All @@ -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<RoleInTimeT> = RoleInTime.decode({
Expand Down Expand Up @@ -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<ThingT> = Thing.decode({
Expand Down Expand Up @@ -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<ActionT> = Action.decode({
Expand Down Expand Up @@ -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<AssertionT> = Assertion.decode({
Expand Down Expand Up @@ -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<StepT> = Step.decode({
Expand Down Expand Up @@ -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<DocmapT> = Docmap.decode({
Expand Down
2 changes: 1 addition & 1 deletion packages/widget/src/docmap-controller.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/widget/test/integration/docmaps-widget.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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-');
Expand Down

0 comments on commit d7a66b0

Please sign in to comment.