feat(server): library refresh go brrr #27878
Annotations
22 errors and 1 warning
Run tsc
Type '{ create: Mock<(asset: AssetCreate) => Promise<AssetEntity>>; upsertExif: Mock<(exif: Partial<ExifEntity>) => Promise<void>>; ... 32 more ...; upsertFiles: Mock<...>; }' is not assignable to type 'Mocked<IAssetRepository>'.
|
Run tsc
Process completed with exit code 2.
|
Run linter:
server/src/interfaces/asset.interface.ts#L4
'LibraryEntity' is defined but never used
|
Run linter:
server/src/repositories/asset.repository.ts#L3
'picomatch' is defined but never used
|
Run linter:
server/src/repositories/asset.repository.ts#L9
'LibraryEntity' is defined but never used
|
Run linter:
server/src/repositories/asset.repository.ts#L721
Do not pass function `globToSqlPattern` directly to `.map(…)`
|
Run linter:
server/src/services/library.service.ts#L5
'parseLib' is defined but never used
|
Run linter:
server/src/services/library.service.ts#L514
Move async arrow function 'checkOfflineAsset' to the outer scope
|
Run linter:
server/src/utils/asset.util.ts#L2
'picomatch' is defined but never used
|
Run linter:
server/src/utils/misc.spec.ts#L62
`String.raw` should be used to avoid escaping `\`
|
Run linter:
server/src/utils/misc.ts#L272
Move arrow function 'convertTokenToSqlPattern' to the outer scope
|
Run linter:
server/src/utils/misc.ts#L278
Missing braces in case clause
|
Run small tests & coverage:
server/src/services/library.service.ts#L622
TypeError: this.assetRepository.updateOffline is not a function
❯ LibraryService.handleQueueSyncAssets src/services/library.service.ts:622:54
❯ src/services/library.service.spec.ts:230:7
|
Run small tests & coverage:
server/src/services/library.service.spec.ts#L261
AssertionError: expected 'success' to be 'skipped' // Object.is equality
Expected: "skipped"
Received: "success"
❯ src/services/library.service.spec.ts:261:7
|
Run small tests & coverage:
server/src/services/library.service.spec.ts#L293
AssertionError: promise rejected "TypeError: Cannot read properties of unde…" instead of resolving
❯ src/services/library.service.spec.ts:293:41
Caused by: Caused by: TypeError: Cannot read properties of undefined (reading 'mtime')
❯ LibraryService.handleSyncAsset src/services/library.service.ts:510:24
❯ LibraryService.handleSyncAssets src/services/library.service.ts:485:7
❯ src/services/library.service.spec.ts:293:7
|
Run small tests & coverage:
server/src/services/library.service.spec.ts#L310
AssertionError: promise rejected "TypeError: Cannot read properties of unde…" instead of resolving
❯ src/services/library.service.spec.ts:310:41
Caused by: Caused by: TypeError: Cannot read properties of undefined (reading 'mtime')
❯ LibraryService.handleSyncAsset src/services/library.service.ts:510:24
❯ LibraryService.handleSyncAssets src/services/library.service.ts:485:7
❯ src/services/library.service.spec.ts:310:7
|
Run small tests & coverage:
server/src/services/library.service.spec.ts#L345
AssertionError: expected "spy" to be called with arguments: [ [ 'asset-id' ], …(1) ]
Received:
Number of calls: 0
❯ src/services/library.service.spec.ts:345:35
|
Run small tests & coverage:
server/src/services/library.service.spec.ts#L971
AssertionError: expected "spy" to be called with arguments: [ [ { …(2) } ] ]
Received:
1st spy call:
Array [
Array [
Object {
- "data": ObjectContaining {
- "ids": Array [
- "asset-id",
- ],
+ "data": Object {
+ "assetPath": "/foo/photo.jpg",
+ "id": "library-id-with-paths1",
+ "ownerId": "admin_id",
},
- "name": "library-sync-assets",
+ "name": "library-sync-file",
},
],
]
Number of calls: 1
❯ src/services/library.service.spec.ts:971:34
|
Run small tests & coverage:
server/src/services/library.service.spec.ts#L996
AssertionError: expected "spy" to be called with arguments: [ [ { …(2) } ] ]
Received:
1st spy call:
Array [
Array [
Object {
- "data": ObjectContaining {
- "id": Array [
- "asset-id",
- ],
+ "data": Object {
+ "assetPath": "/foo/photo.jpg",
+ "id": "library-id-with-paths1",
+ "ownerId": "admin_id",
},
- "name": "library-sync-assets",
+ "name": "library-sync-file",
},
],
]
Number of calls: 1
❯ src/services/library.service.spec.ts:996:34
|
Run small tests & coverage:
server/src/services/library.service.spec.ts#L1011
AssertionError: expected "spy" to be called with arguments: [ [ { …(2) } ] ]
Received:
Number of calls: 0
❯ src/services/library.service.spec.ts:1011:34
|
Run small tests & coverage:
server/src/services/library.service.spec.ts#L1165
AssertionError: promise rejected "TypeError: this.assetRepository.updateOff…" instead of resolving
❯ src/services/library.service.spec.ts:1165:84
Caused by: Caused by: TypeError: this.assetRepository.updateOffline is not a function
❯ LibraryService.handleQueueSyncAssets src/services/library.service.ts:622:54
|
Run small tests & coverage:
server/src/utils/misc.spec.ts#L66
AssertionError: expected '%/._%' to deeply equal '%/.\_%'
Expected: "%/.\_%"
Received: "%/._%"
❯ src/utils/misc.spec.ts:66:37
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Loading