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 FROM denoland/deno:latest
WORKDIR /app WORKDIR /app
COPY . . COPY . .
# Explicitly fetch dependencies RUN deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/2.4.1/plug-compile.js -c deno.json icalendar.plug.yaml
RUN deno install CMD ["cat", "Library/sstent/icalendar.plug.js"]
RUN deno task build
CMD ["cat", "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 name: Library/sstent/icalendar
version: 0.3.1 version: 0.3.14
tags: meta/library tags: meta/library
files: files:
- icalendar.plug.js - icalendar.plug.js

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
--- ---
name: Library/sstent/icalendar name: Library/sstent/icalendar
version: 0.3.13 version: 0.3.14
tags: meta/library tags: meta/library
files: files:
- icalendar.plug.js - 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 name: Library/sstent/icalendar
version: 0.3.13 version: 0.3.14
author: sstent author: sstent
index: icalendar.ts index: icalendar.ts
functions: functions:
@@ -16,4 +16,4 @@ functions:
path: icalendar.ts:showVersion path: icalendar.ts:showVersion
command: "iCalendar: Show Version" command: "iCalendar: Show Version"
permissions: permissions:
- http - http

View File

@@ -1,7 +1,7 @@
import { clientStore, config, datastore, editor, index } from "@silverbulletmd/silverbullet/syscalls"; import { clientStore, config, datastore, editor, index } from "@silverbulletmd/silverbullet/syscalls";
import { convertIcsCalendar } from "https://esm.sh/ts-ics@2.4.0"; 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"; const CACHE_KEY = "icalendar:lastSync";
console.log(`[iCalendar] Plug script executing at top level (Version ${VERSION})`); 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`); console.log(`[iCalendar] syncCalendars command triggered`);
try { try {
const { sources, tzShift } = await getSources(); const { sources, tzShift } = await getSources();
console.log(`[iCalendar] Found ${sources.length} sources, tzShift: ${tzShift}`); if (sources.length === 0) {
if (sources.length === 0) return; await editor.flashNotification("No calendar sources configured", "warn");
return;
}
await editor.flashNotification("Syncing calendars...", "info"); await editor.flashNotification("Syncing calendars...", "info");
const allEvents: any[] = []; const allEvents: any[] = [];
for (const source of sources) { for (const source of sources) {
const events = await fetchAndParseCalendar(source, tzShift); try {
allEvents.push(...events); const events = await fetchAndParseCalendar(source, tzShift);
allEvents.push(...events);
} catch (err) {
console.error(`Failed to sync ${source.name}:`, err);
}
} }
await index.indexObjects("$icalendar", allEvents); await index.indexObjects("$icalendar", allEvents);
console.log(`[iCalendar] Successfully indexed ${allEvents.length} events`);
await editor.flashNotification(`Synced ${allEvents.length} events`, "info"); await editor.flashNotification(`Synced ${allEvents.length} events`, "info");
} catch (err) { } 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() { export async function showVersion() {
console.log(`[iCalendar] showVersion command triggered`); console.log(`[iCalendar] showVersion command triggered`);
await editor.flashNotification(`iCalendar Plug ${VERSION}`, "info"); await editor.flashNotification(`iCalendar Plug ${VERSION}`, "info");
} }