Fix: Final clean build v0.3.14 with verified mapping and name
All checks were successful
Build SilverBullet Plug / build (push) Successful in 19s

This commit is contained in:
2026-02-17 14:51:47 -08:00
parent 7d690cdb2a
commit 17f6308585
9 changed files with 33 additions and 28 deletions

View File

@@ -1,7 +1,5 @@
FROM denoland/deno:latest
WORKDIR /app
COPY . .
# Explicitly fetch dependencies
RUN deno install
RUN deno task build
CMD ["cat", "icalendar.plug.js"]
RUN deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/2.4.1/plug-compile.js -c deno.json icalendar.plug.yaml
CMD ["cat", "Library/sstent/icalendar.plug.js"]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
---
name: Library/sstent/icalendar
version: 0.3.1
version: 0.3.14
tags: meta/library
files:
- icalendar.plug.js

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
---
name: Library/sstent/icalendar
version: 0.3.13
version: 0.3.14
tags: meta/library
files:
- icalendar.plug.js
---
iCalendar sync plug for SilverBullet.
iCalendar sync plug for SilverBullet.

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
name: Library/sstent/icalendar
version: 0.3.13
version: 0.3.14
author: sstent
index: icalendar.ts
functions:
@@ -16,4 +16,4 @@ functions:
path: icalendar.ts:showVersion
command: "iCalendar: Show Version"
permissions:
- http
- http

View File

@@ -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.13";
const VERSION = "0.3.14";
const CACHE_KEY = "icalendar:lastSync";
console.log(`[iCalendar] Plug script executing at top level (Version ${VERSION})`);
@@ -73,19 +73,24 @@ export async function syncCalendars() {
console.log(`[iCalendar] syncCalendars command triggered`);
try {
const { sources, tzShift } = await getSources();
console.log(`[iCalendar] Found ${sources.length} sources, tzShift: ${tzShift}`);
if (sources.length === 0) return;
if (sources.length === 0) {
await editor.flashNotification("No calendar sources configured", "warn");
return;
}
await editor.flashNotification("Syncing calendars...", "info");
const allEvents: any[] = [];
for (const source of sources) {
const events = await fetchAndParseCalendar(source, tzShift);
allEvents.push(...events);
try {
const events = await fetchAndParseCalendar(source, tzShift);
allEvents.push(...events);
} catch (err) {
console.error(`Failed to sync ${source.name}:`, err);
}
}
await index.indexObjects("$icalendar", allEvents);
console.log(`[iCalendar] Successfully indexed ${allEvents.length} events`);
await editor.flashNotification(`Synced ${allEvents.length} events`, "info");
} catch (err) {
console.error("[iCalendar] Sync failed:", err);
console.error("Sync failed:", err);
}
}
@@ -112,4 +117,4 @@ export async function clearCache() {
export async function showVersion() {
console.log(`[iCalendar] showVersion command triggered`);
await editor.flashNotification(`iCalendar Plug ${VERSION}`, "info");
}
}