Chore: Cleanup before rebase
All checks were successful
Build SilverBullet Plug / build (push) Successful in 33s

This commit is contained in:
2026-02-17 14:40:47 -08:00
parent 170de52e6b
commit d8f6f0396f
5 changed files with 23 additions and 7 deletions

7
Dockerfile.build Normal file
View File

@@ -0,0 +1,7 @@
FROM denoland/deno:latest
WORKDIR /app
COPY . .
# Explicitly fetch dependencies
RUN deno install
RUN deno task build
CMD ["cat", "icalendar.plug.js"]

View File

@@ -0,0 +1,2 @@
function u(r){let e=atob(r),o=e.length,n=new Uint8Array(o);for(let t=0;t<o;t++)n[t]=e.charCodeAt(t);return n}function c(r){typeof r=="string"&&(r=new TextEncoder().encode(r));let e="",o=r.byteLength;for(let n=0;n<o;n++)e+=String.fromCharCode(r[n]);return btoa(e)}var C=new Uint8Array(16);var y=class{constructor(e="",o=1e3){this.prefix=e;this.maxCaptureSize=o;this.prefix=e,this.originalConsole={log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console)},this.patchConsole()}originalConsole;logBuffer=[];patchConsole(){let e=o=>(...n)=>{let t=this.prefix?[this.prefix,...n]:n;this.originalConsole[o](...t),this.captureLog(o,n)};console.log=e("log"),console.info=e("info"),console.warn=e("warn"),console.error=e("error"),console.debug=e("debug")}captureLog(e,o){let n={level:e,timestamp:Date.now(),message:o.map(t=>{if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}).join(" ")};this.logBuffer.push(n),this.logBuffer.length>this.maxCaptureSize&&this.logBuffer.shift()}async postToServer(e,o){if(this.logBuffer.length>0){let t=[...this.logBuffer];this.logBuffer=[];try{if(!(await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.map(s=>({...s,source:o})))})).ok)throw new Error("Failed to post logs to server")}catch(i){console.warn("Could not post logs to server",i.message),this.logBuffer.unshift(...t)}}}},g;function f(r=""){return g=new y(r),g}var a=r=>{throw new Error("Not initialized yet")},p=typeof window>"u"&&typeof globalThis.WebSocketPair>"u";typeof Deno>"u"&&(self.Deno={args:[],build:{arch:"x86_64"},env:{get(){}}});var d=new Map,l=0;p&&(globalThis.syscall=async(r,...e)=>await new Promise((o,n)=>{l++,d.set(l,{resolve:o,reject:n}),a({type:"sys",id:l,name:r,args:e})}));function h(r,e,o){p&&(a=o,self.addEventListener("message",n=>{(async()=>{let t=n.data;switch(t.type){case"inv":{let i=r[t.name];if(!i)throw new Error(`Function not loaded: ${t.name}`);try{let s=await Promise.resolve(i(...t.args||[]));a({type:"invr",id:t.id,result:s})}catch(s){console.error("An exception was thrown as a result of invoking function",t.name,"error:",s.message),a({type:"invr",id:t.id,error:s.message})}}break;case"sysr":{let i=t.id,s=d.get(i);if(!s)throw Error("Invalid request id");d.delete(i),t.error?s.reject(new Error(t.error)):s.resolve(t.result)}break}})().catch(console.error)}),a({type:"manifest",manifest:e}),f(`[${e.name} plug]`))}async function b(r,e){if(typeof r!="string"){let o=new Uint8Array(await r.arrayBuffer()),n=o.length>0?c(o):void 0;e={method:r.method,headers:Object.fromEntries(r.headers.entries()),base64Body:n},r=r.url}return syscall("sandboxFetch.fetch",r,e)}globalThis.nativeFetch=globalThis.fetch;function x(){globalThis.fetch=async function(r,e){let o=e&&e.body?c(new Uint8Array(await new Response(e.body).arrayBuffer())):void 0,n=await b(r,e&&{method:e.method,headers:e.headers,base64Body:o});return new Response(n.base64Body?u(n.base64Body):null,{status:n.status,headers:n.headers})}}p&&x();var m={},w={name:"Library/sstent/icalendar",version:"0.3.7",author:"sstent",index:"index.ts",functions:{syncCalendars:{command:"iCalendar: Sync"},forceSync:{command:"iCalendar: Force Sync"},clearCache:{command:"iCalendar: Clear Cache"},showVersion:{command:"iCalendar: Show Version"}},permissions:["http"],assets:{}},K={manifest:w,functionMapping:m};h(m,w,self.postMessage);export{K as plug};
//# sourceMappingURL=icalendar.plug.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
{
"nodeModulesDir": "auto",
"tasks": {
"build": "deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/edge/plug-compile.js -c deno.json icalendar.plug.yaml",
"watch": "deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/edge/plug-compile.js -c deno.json icalendar.plug.yaml -w",
"debug": "deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/edge/plug-compile.js -c deno.json icalendar.plug.yaml --debug"
"build": "deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/2.4.1/plug-compile.js -c deno.json icalendar.plug.yaml",
"watch": "deno run -A https://raw.githubusercontent.com/silverbulletmd/silverbullet/v2.4.1/plug-compile.js -c deno.json icalendar.plug.yaml -w",
"debug": "deno run -A https://raw.githubusercontent.com/silverbulletmd/silverbullet/v2.4.1/plug-compile.js -c deno.json icalendar.plug.yaml --debug"
},
"lint": {
"rules": {

File diff suppressed because one or more lines are too long