Various AT Protocol integrations with obsidian

ignore invalid site.standard.documents instead of erroring out (#26)

* ignore invalid site.standard.documents instead of erroring out

* bump version

* desktop only until oauth sorted out

authored by

treethought and committed by
GitHub
ada3685d 5862b6bc

+10 -5
+2 -2
manifest.json
··· 1 1 { 2 2 "id": "atmosphere", 3 3 "name": "Atmosphere", 4 - "version": "0.1.15", 4 + "version": "0.1.16", 5 5 "minAppVersion": "0.15.0", 6 6 "description": "Various integrations with AT Protocol.", 7 7 "author": "treethought", 8 8 "authorUrl": "https://github.com/treethought", 9 - "isDesktopOnly": false 9 + "isDesktopOnly": true 10 10 }
+1 -1
package.json
··· 1 1 { 2 2 "name": "obsidian-atmosphere", 3 - "version": "0.1.15", 3 + "version": "0.1.16", 4 4 "description": "Various integrations with AT Protocol.", 5 5 "main": "main.js", 6 6 "type": "module",
+7 -2
src/lib/standardsite/index.ts
··· 36 36 })); 37 37 38 38 const pubDocs = response.records.filter(record => { 39 - const parsed = parse(SiteStandardDocument.mainSchema, record.value); 40 - return parsed.site === pubUri; 39 + try { 40 + const parsed = parse(SiteStandardDocument.mainSchema, record.value); 41 + return parsed.site === pubUri; 42 + } catch (e) { 43 + console.warn(`Failed to parse record as site.standard.document: ${record.uri}:`, e); 44 + return false; 45 + } 41 46 }); 42 47 43 48 return {