forked from GitHubMirrors/silverbullet-icalendar
Chore: Add debug logging and iterate to 0.3.22
All checks were successful
Build SilverBullet Plug / build (push) Successful in 24s
All checks were successful
Build SilverBullet Plug / build (push) Successful in 24s
This commit is contained in:
2
PLUG.md
2
PLUG.md
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Library/sstent/icalendar
|
||||
version: "0.3.21"
|
||||
version: "0.3.22"
|
||||
tags: meta/library
|
||||
files:
|
||||
- icalendar.plug.js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "icalendar-plug",
|
||||
"version": "0.3.21",
|
||||
"version": "0.3.22",
|
||||
"nodeModulesDir": "auto",
|
||||
"tasks": {
|
||||
"sync-version": "deno run -A scripts/sync-version.ts",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
name: icalendar
|
||||
version: 0.3.21
|
||||
version: 0.3.22
|
||||
author: sstent
|
||||
index: icalendar.ts
|
||||
# Legacy SilverBullet permission name
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { clientStore, config, datastore, editor, index } from "@silverbulletmd/silverbullet/syscalls";
|
||||
import { convertIcsCalendar } from "https://esm.sh/ts-ics@2.4.0";
|
||||
|
||||
const VERSION = "0.3.21";
|
||||
const VERSION = "0.3.22";
|
||||
const CACHE_KEY = "icalendar:lastSync";
|
||||
|
||||
console.log(`[iCalendar] Plug script executing at top level (Version ${VERSION})`);
|
||||
@@ -77,14 +77,17 @@ async function fetchAndParseCalendar(source: any, hourShift = 0): Promise<any[]>
|
||||
const events: any[] = [];
|
||||
for (const icsEvent of calendar.events) {
|
||||
const obj = icsEvent.start;
|
||||
if (!obj) continue;
|
||||
if (!obj) {
|
||||
console.warn("[iCalendar] Event has no start object:", icsEvent.summary);
|
||||
continue;
|
||||
}
|
||||
|
||||
let wallTimeStr = "";
|
||||
if (obj.local && typeof obj.local.date === "string") wallTimeStr = obj.local.date;
|
||||
else if (typeof obj.date === "string") wallTimeStr = obj.date;
|
||||
|
||||
if (!wallTimeStr) {
|
||||
console.warn("[iCalendar] Skipping event with no start date string:", icsEvent.summary);
|
||||
console.warn("[iCalendar] Skipping event with no start date string:", icsEvent.summary, "Start object structure:", JSON.stringify(obj));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user