@data-fair/catalog-sftp 0.3.2 → 0.4.0

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.
Files changed (2) hide show
  1. package/lib/imports.ts +4 -2
  2. package/package.json +5 -2
package/lib/imports.ts CHANGED
@@ -21,18 +21,20 @@ const prepareFiles = (list: FileEntryWithStats[], path: string): (Folder[] | Res
21
21
  return {
22
22
  id: path + '/' + file.filename,
23
23
  title: file.filename,
24
- type: 'folder'
24
+ type: 'folder',
25
+ updatedAt: file.attrs.mtime ? new Date(file.attrs.mtime * 1000) : undefined
25
26
  } as Folder
26
27
  } else {
27
28
  // ResourceList
28
29
  return {
29
30
  id: path + '/' + file.filename,
30
31
  title: file.filename,
32
+ type: 'resource',
31
33
  description: '',
32
34
  format: (pointPos === -1) ? '' : (file.filename.substring(pointPos + 1)),
33
35
  mimeType: '',
34
36
  size: file.attrs.size,
35
- type: 'resource'
37
+ updatedAt: file.attrs.mtime ? new Date(file.attrs.mtime * 1000) : undefined
36
38
  } as ResourceList[number]
37
39
  }
38
40
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@data-fair/catalog-sftp",
3
3
  "description": "SFTP plugin for the Data Fair catalogs service.",
4
- "version": "0.3.2",
4
+ "version": "0.4.0",
5
5
  "main": "index.ts",
6
6
  "type": "module",
7
7
  "scripts": {
@@ -39,12 +39,15 @@
39
39
  "devDependencies": {
40
40
  "@commitlint/cli": "^19.8.0",
41
41
  "@commitlint/config-conventional": "^19.8.0",
42
- "@data-fair/types-catalogs": "^0.1.0",
43
42
  "@data-fair/lib-types-builder": "^1.8.0",
43
+ "@data-fair/types-catalogs": "^0.6.0",
44
44
  "@types/debug": "^4.1.12",
45
45
  "@types/fs-extra": "^11.0.4",
46
46
  "@types/node": "^24.0.3",
47
47
  "@types/ssh2": "^1.15.5",
48
+ "chalk": "^5.6.2",
49
+ "dayjs": "^1.11.19",
50
+ "draftlog": "^1.0.13",
48
51
  "eslint": "^9.25.1",
49
52
  "husky": "^9.1.7",
50
53
  "neostandard": "^0.12.1",