Skip to content
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 gen-typebox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dereferencedDocSchemas as originals } from '@comapeo/schema'
import { dereferencedDocSchemas as originals } from '@comapeo/core/schema.js'
import { schema2typebox } from 'schema2typebox'
import * as ts from 'typescript'

Expand Down
18 changes: 12 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"homepage": "https://github.com/digidem/comapeo-cloud#readme",
"devDependencies": {
"@comapeo/schema": "^2.0.0",
"@eslint/js": "^9.14.0",
"@garbee/iso8601": "^1.0.3",
"@mapeo/mock-data": "^5.0.0",
Expand All @@ -64,7 +63,7 @@
"typescript": "^5.6.3"
},
"dependencies": {
"@comapeo/core": "^5.1.1",
"@comapeo/core": "^6.0.0",
"@fastify/sensible": "^5.6.0",
"@fastify/type-provider-typebox": "^4.1.0",
"@fastify/websocket": "^10.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { wsCoreReplicator } from './ws-core-replicator.js'

/** @import { FastifyInstance, FastifyPluginAsync, FastifyRequest, RawServerDefault } from 'fastify' */
/** @import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox' */
/** @import { MapeoDoc } from '@comapeo/schema' */
/** @import { MapeoProject } from '@comapeo/core/dist/mapeo-project.js' */
/** @import { MapeoDoc } from '@comapeo/core/schema.js' */
/** @import { MapeoProject } from '@comapeo/core' */
/** @import {Static, TSchema} from '@sinclair/typebox' */
/**
* @template {MapeoDoc['schemaName']} TSchemaName
Expand Down
2 changes: 1 addition & 1 deletion test/list-alerts-endpoint.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MapeoManager } from '@comapeo/core'
import { valueOf } from '@comapeo/schema'
import { valueOf } from '@comapeo/core/schema.js'
import { isValidDateTime } from '@garbee/iso8601'
import { keyToPublicId as projectKeyToPublicId } from '@mapeo/crypto'

Expand Down
2 changes: 1 addition & 1 deletion test/observations-endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
runWithRetries,
} from './test-helpers.js'

/** @import { ObservationValue } from '@comapeo/schema'*/
/** @import { ObservationValue } from '@comapeo/core/schema.js'*/
/** @import { FastifyInstance } from 'fastify' */

const FIXTURES_ROOT = new URL('./fixtures/', import.meta.url)
Expand Down
10 changes: 5 additions & 5 deletions test/test-helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { valueOf } from '@comapeo/schema'
import { valueOf } from '@comapeo/core/schema.js'
import {
KeyManager,
keyToPublicId as projectKeyToPublicId,
Expand All @@ -18,7 +18,7 @@ import comapeoServer from '../src/app.js'
/** @import { TestContext } from 'node:test' */
/** @import { FastifyInstance } from 'fastify' */
/** @import { ServerOptions } from '../src/app.js' */
/** @import { MapeoProject } from '@comapeo/core/dist/mapeo-project.js' */
/** @import { MapeoProject } from '@comapeo/core' */

export const BEARER_TOKEN = Buffer.from('swordfish').toString('base64')

Expand Down Expand Up @@ -153,7 +153,7 @@ export function generateAlerts(
// Hacky, but should get the job done ensuring we have all geometry types in the test
const alerts = []
for (const geometryType of geometryTypes) {
/** @type {import('@comapeo/schema').RemoteDetectionAlert | undefined} */
/** @type {import('@comapeo/core/schema.js').RemoteDetectionAlert | undefined} */
let alert
while (!alert || alert.geometry.type !== geometryType) {
;[alert] = generate('remoteDetectionAlert', { count: 1 })
Expand Down Expand Up @@ -187,7 +187,7 @@ export async function generatePreset(project) {

/**
* Generate a new observation
* @returns {import('@comapeo/schema').ObservationValue}
* @returns {import('@comapeo/core/schema.js').ObservationValue}
*/
export function generateObservation() {
const observationDoc = generate('observation', { count: 1 })[0]
Expand All @@ -197,7 +197,7 @@ export function generateObservation() {

/**
* Generate a new track
* @returns {import('@comapeo/schema').TrackValue}
* @returns {import('@comapeo/core/schema.js').TrackValue}
*/
export function generateTrack() {
const trackDoc = generate('track', { count: 1 })[0]
Expand Down
4 changes: 2 additions & 2 deletions test/tracks-endpoint.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MapeoManager } from '@comapeo/core'
import { valueOf } from '@comapeo/schema'
import { valueOf } from '@comapeo/core/schema.js'
import { keyToPublicId as projectKeyToPublicId } from '@mapeo/crypto'
import { generate } from '@mapeo/mock-data'

Expand Down Expand Up @@ -157,7 +157,7 @@ test('returning tracks with fetchable observations', async (t) => {
/**
*
* @param {{docId: string, versionId: string}[]} observationRefs
* @returns {import('@comapeo/schema').TrackValue}
* @returns {import('@comapeo/core/schema.js').TrackValue}
*/
function makeTrack(observationRefs) {
const rawTrack = generate('track', { count: 1 })[0]
Expand Down
Loading