diff --git a/package.json b/package.json index 63f8b27..e07806c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@developmentseed/stac-react", - "version": "1.0.0-alpha.1", + "version": "1.0.0-alpha.2", "description": "React components and hooks for building STAC-API front-ends", "repository": "git@github.com:developmentseed/stac-react.git", "authors": [ diff --git a/src/index.ts b/src/index.ts index f7fe02f..291a7f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,4 +5,5 @@ import useItem from './hooks/useItem'; import useStacApi from './hooks/useStacApi'; import { StacApiProvider } from './context'; +export * from './types/stac.d'; export { useCollections, useCollection, useItem, useStacSearch, useStacApi, StacApiProvider }; diff --git a/src/types/stac.d.ts b/src/types/stac.d.ts index 13f7001..4b3fecc 100644 --- a/src/types/stac.d.ts +++ b/src/types/stac.d.ts @@ -90,7 +90,7 @@ export type Item = { type: 'Feature'; properties: GenericObject; links: Link[]; - assets: ItemAsset[]; + assets: Record; }; type Role = 'licensor' | 'producer' | 'processor' | 'host'; @@ -126,7 +126,7 @@ export type Collection = { providers: Provider[]; extent: Extent; links: Link[]; - assets: GenericObject; + assets: Record; }; export type CollectionsResponse = { diff --git a/vite.config.ts b/vite.config.ts index 6c00595..ea3778c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,6 +20,10 @@ export default defineConfig({ exclude: ['**/*.test.ts'], outDir: 'dist', insertTypesEntry: true, + copyDtsFiles: true, + beforeWriteFile(filePath, content) { + return filePath.match(/\/(vite|jest)\./) ? false : { filePath, content }; + }, }), ], });