@data-fair/catalog-data-fair 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/download.ts +1 -1
- package/lib/imports.ts +1 -2
- package/package.json +1 -1
package/lib/download.ts
CHANGED
|
@@ -181,7 +181,7 @@ const downloadResourceFile = async (filePath: string, { catalogConfig, resourceI
|
|
|
181
181
|
* @throws If there is an error writing the file or fetching the dataset.
|
|
182
182
|
*/
|
|
183
183
|
const downloadResourceLines = async (destFile: string, { catalogConfig, resourceId, importConfig, secrets, log }: GetResourceContext<DataFairConfig> & { importConfig: ImportConfig }): Promise<void> => {
|
|
184
|
-
let url: string | null = `${catalogConfig.url}/data-fair/api/v1/datasets/${resourceId}/lines?format=csv&size=
|
|
184
|
+
let url: string | null = `${catalogConfig.url}/data-fair/api/v1/datasets/${resourceId}/lines?format=csv&size=10000`
|
|
185
185
|
|
|
186
186
|
if (importConfig.fields) {
|
|
187
187
|
url += '&select=' + importConfig.fields.map(field => field.key).join(',')
|
package/lib/imports.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { DataFairCapabilities } from './capabilities.ts'
|
|
|
6
6
|
type ResourceList = Awaited<ReturnType<CatalogPlugin['listResources']>>['results']
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Transform an ODS catalog into a Data Fair catalog
|
|
10
9
|
* @param dataFairDataset the dataset to transform
|
|
11
10
|
* @returns an object containing the count of resources, the transformed resources, and an empty path array
|
|
12
11
|
*/
|
|
@@ -37,7 +36,7 @@ const prepareCatalog = (dataFairDatasets: DataFairDataset[]): ResourceList => {
|
|
|
37
36
|
* @returns the list of Resources available on this catalog
|
|
38
37
|
*/
|
|
39
38
|
export const listResources = async (config: ListResourcesContext<DataFairConfig, DataFairCapabilities>): ReturnType<CatalogPlugin<DataFairConfig>['listResources']> => {
|
|
40
|
-
const dataFairParams: Record<string, any> = {}
|
|
39
|
+
const dataFairParams: Record<string, any> = { sort: 'title' }
|
|
41
40
|
if (config.params?.q) dataFairParams.q = config.params.q
|
|
42
41
|
if (config.params?.size) dataFairParams.size = config.params.size
|
|
43
42
|
if (config.params?.page) dataFairParams.page = config.params.page
|