@gjsify/pim 0.0.0-stage → 0.64.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -2
- package/lib/esm/_virtual/_rolldown/runtime.js +1 -0
- package/lib/esm/backend.js +0 -0
- package/lib/esm/caldav/backend.js +3 -0
- package/lib/esm/caldav/delta.js +1 -0
- package/lib/esm/caldav/errors.js +1 -0
- package/lib/esm/caldav/index.js +1 -0
- package/lib/esm/eds/driver.gjs.js +1 -0
- package/lib/esm/eds/errors.js +1 -0
- package/lib/esm/eds/index.js +1 -0
- package/lib/esm/eds/libs.gjs.js +1 -0
- package/lib/esm/errors.js +1 -0
- package/lib/esm/i18n.js +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/optional.js +1 -0
- package/lib/esm/types.js +0 -0
- package/lib/types/backend.d.ts +46 -0
- package/lib/types/caldav/backend.d.ts +23 -0
- package/lib/types/caldav/delta.d.ts +27 -0
- package/lib/types/caldav/errors.d.ts +3 -0
- package/lib/types/caldav/index.d.ts +6 -0
- package/lib/types/caldav.spec.d.ts +2 -0
- package/lib/types/delta.spec.d.ts +2 -0
- package/lib/types/eds/driver.gjs.d.ts +12 -0
- package/lib/types/eds/errors.d.ts +14 -0
- package/lib/types/eds/index.d.ts +8 -0
- package/lib/types/eds/libs.gjs.d.ts +10 -0
- package/lib/types/eds.gjs.spec.d.ts +2 -0
- package/lib/types/errors.d.ts +33 -0
- package/lib/types/fake-dav-server.d.ts +33 -0
- package/lib/types/i18n.d.ts +24 -0
- package/lib/types/index.d.ts +13 -0
- package/lib/types/optional.d.ts +13 -0
- package/lib/types/optional.spec.d.ts +2 -0
- package/lib/types/types.d.ts +44 -0
- package/package.json +102 -5
package/README.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @gjsify/pim
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Calendars and tasks behind one port. `CalendarBackend` moves iCalendar text; a driver moves it to a store. Parsing the text stays with the caller.
|
|
4
|
+
|
|
5
|
+
Part of the [gjsify](https://github.com/gjsify/gjsify) project. **Tier 3 (experimental, ADR 0003)**: new, no promise yet.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
gjsify install @gjsify/pim
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Drivers
|
|
14
|
+
|
|
15
|
+
| Subpath | Store | Runs on |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `@gjsify/pim/caldav` | CalDAV over [`@gjsify/dav`](../dav) (plain `fetch`), with RFC 6578 delta reads | every runtime with `fetch` |
|
|
18
|
+
| `@gjsify/pim/eds` | Evolution Data Server (typelibs loaded on first use) | GJS on Linux |
|
|
19
|
+
|
|
20
|
+
The root export carries the port, the types (`CalendarInfo`, `RawItem`, `CollectionDelta`, ...), the error classes (`BackendUnavailableError`, `BackendAuthError`, `ConflictError`, ...) and `setPimTranslator` for localized error messages.
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { createCaldavBackend } from '@gjsify/pim/caldav';
|
|
26
|
+
|
|
27
|
+
const backend = createCaldavBackend({ url: 'https://dav.example.test/', username, password });
|
|
28
|
+
const [calendar] = await backend.listCalendars('event');
|
|
29
|
+
const items = await backend.listItems({ kind: 'event', calendar: calendar.uid });
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`kind` is `'event'` or `'reminder'` (a task list). Writes take the etag back (`If-Match`); a stale one is a `ConflictError`.
|
|
33
|
+
|
|
34
|
+
## Scope
|
|
35
|
+
|
|
36
|
+
Calendars and tasks only. No contacts, no accounts (see [`@gjsify/system-accounts`](../system-accounts)), no recurrence expansion: a recurring item comes back as its series.
|
|
37
|
+
|
|
38
|
+
## Testing
|
|
39
|
+
|
|
40
|
+
`src/fake-dav-server.ts` is an in-process CalDAV server with ETags and sync tokens; the CalDAV suites run on Node and GJS against it. The EDS suite is GJS-only and covers result shapes and the no-session failure (`test:gjs` pins a dead session bus). Not covered: a live Evolution Data Server or a real CalDAV server.
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0});export{__name};
|
|
File without changes
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{BackendError as e,ConflictError as t}from"../errors.js";import{_ as n,fmt as r}from"../i18n.js";import{davError as i}from"./errors.js";import{DavClient as a,DavError as o,basicAuth as s}from"@gjsify/dav";const c={event:`VEVENT`,reminder:`VTODO`};function uidOf(e){let t=/^UID[;:][^\r\n]*$/m.exec(e.replace(/\r?\n[ \t]/g,``));return t?.[0].slice(t[0].indexOf(`:`)+1).trim()||null}function wrap(e,t){if(/^BEGIN:VCALENDAR/m.test(e))return e;let n=e.replace(/\r?\n/g,`\r
|
|
2
|
+
`);return`BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:${t}\r\n${n.endsWith(`\r
|
|
3
|
+
`)?n:`${n}\r\n`}END:VCALENDAR\r\n`}function icalUtc(e){return new Date(e).toISOString().replace(/[-:]/g,``).replace(/\.\d{3}/,``)}function supports(e,t){return e.components.length===0||e.components.includes(c[t])}function createCaldavBackend(l){let u=new a({auth:s(l.username,l.password),fetch:l.fetch}),d=l.prodId??`-//gjsify//pim//EN`,f=null;async function boundary(e,t){try{return await t()}catch(t){throw i(e,t)}}function load(){return f||(f=(async()=>{let{homeUrl:e}=await u.discover(`caldav`,l.url);return u.listCollections(e,`caldav`)})(),f.catch(()=>f=null)),f}async function collection(t,i){let a=(await load()).find(e=>e.url===i&&supports(e,t));if(!a)throw new e(r(n(t===`event`?`no calendar "{uid}"`:`no task list "{uid}"`),{uid:i}));return a}async function fetchObjects(e,t){let n=[];for(let r=0;r<t.length;r+=50)n.push(...await u.getObjects(e.url,`caldav`,t.slice(r,r+50)));return n}async function fetchData(e,t){return(await fetchObjects(e,t)).flatMap(e=>e.data?[e.data]:[])}let resourceUrl=(e,t)=>`${e.url.replace(/\/$/,``)}/${encodeURIComponent(t)}.ics`;async function locate(e,t,n){let holds=e=>e.data!==void 0&&uidOf(e.data)===n;return(await fetchObjects(e,[resourceUrl(e,n)])).find(holds)||((await fetchObjects(e,(await u.listObjects(e.url,`caldav`,{component:c[t],uid:n})).map(e=>e.url))).find(holds)??null)}return{id:`caldav`,listCalendars:e=>boundary(`listCalendars`,async()=>{let t=e?[e]:[`event`,`reminder`],n=new URL(l.url).host,r=[];for(let e of t)for(let t of await load())supports(t,e)&&r.push({uid:t.url,name:t.displayName??t.url,kind:e,backend:`caldav`,account:n});return r}),listItems:e=>boundary(`listItems`,async()=>{let t=e.kind===`event`&&e.from&&e.to?{start:icalUtc(e.from),end:icalUtc(e.to)}:void 0,n=[];for(let r of await load()){if(!supports(r,e.kind)||e.calendarUid&&r.url!==e.calendarUid)continue;let i=await u.listObjects(r.url,`caldav`,{component:c[e.kind],range:t});for(let e of await fetchData(r,i.map(e=>e.url)))n.push({calendarUid:r.url,ical:e})}return n}),getItem:(e,t,n)=>boundary(`getItem`,async()=>{let r=await locate(await collection(t,e),t,n);return r?.data===void 0?null:{ical:r.data,etag:r.etag}}),createItem:(t,i,a)=>boundary(`createItem`,async()=>{let s=await collection(i,t),c=uidOf(a);if(!c)throw new e(n(`createItem: the component has no UID`));try{await u.put(resourceUrl(s,c),wrap(a,d),{ifNoneMatch:!0})}catch(i){throw i instanceof o&&i.isPreconditionFailed?new e(r(n(`createItem: "{uid}" already exists in "{calendar}"`),{uid:c,calendar:t}),`http`,412):i instanceof o&&i.status===403?new e(r(n(`createItem: "{calendar}" refused the write (read-only?)`),{calendar:t}),`http`,403):i}return c}),updateItem:(i,a,s,c,l)=>boundary(`updateItem`,async()=>{let f=await locate(await collection(a,i),a,s);if(!f)throw new e(r(n(`updateItem: no "{uid}" in "{calendar}"`),{uid:s,calendar:i}));try{await u.put(f.url,wrap(c,d),l?{ifMatch:l}:{})}catch(a){throw a instanceof o&&a.isPreconditionFailed?new t(r(n(`updateItem: "{uid}" changed on the server since it was read`),{uid:s}),`http`,412):a instanceof o&&a.status===403?new e(r(n(`updateItem: "{calendar}" refused the write (read-only?)`),{calendar:i}),`http`,403):a}})}}export{createCaldavBackend};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{BackendError as e}from"../errors.js";import{_ as t,fmt as n}from"../i18n.js";import{davError as r}from"./errors.js";import{DavClient as i,DavSyncTokenError as a,basicAuth as o}from"@gjsify/dav";const s={event:`VEVENT`,reminder:`VTODO`},encodeMarker=e=>JSON.stringify({v:1,ctag:e.ctag,syncToken:e.syncToken});function decodeMarker(e){try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t;if(n.v!==1)return null;let text=e=>typeof e==`string`&&e!==``?e:null;return{ctag:text(n.ctag),syncToken:text(n.syncToken)}}catch{return null}}function same(e,t){return e.ctag===null&&e.syncToken===null?!1:e.ctag===t.ctag&&e.syncToken===t.syncToken}function createCaldavDeltaReader(c){let l=new i({auth:o(c.username,c.password),fetch:c.fetch}),u=c.homeUrl?Promise.resolve(c.homeUrl):null;function homeUrl(){return u||(u=l.discover(`caldav`,c.url).then(e=>e.homeUrl),u.catch(()=>u=null)),u}async function fetchItems(e,t){let n=[];for(let r=0;r<t.length;r+=50){let i=await l.getObjects(e,`caldav`,t.slice(r,r+50));for(let e of i)e.data!==void 0&&n.push({href:e.url,etag:e.etag,ical:e.data})}return n}async function full(e,t,n){let r=await l.listObjects(e.url,`caldav`,{component:s[t]}),i=await fetchItems(e.url,r.map(e=>e.url));return{kind:`changed`,marker:encodeMarker(n),items:i}}async function delta(e,t,n,r,i){let o;try{o=await l.sync(e.url,n.syncToken)}catch(n){if(n instanceof a)return full(e,t,i);throw n}let c=new Set(o.deleted),u=new Set(o.changed.map(e=>e.url)),d=r.filter(e=>!c.has(e.href)&&!u.has(e.href)),f=RegExp(`^BEGIN:${s[t]}\\r?$`,`m`),p=(await fetchItems(e.url,[...u])).filter(e=>f.test(e.ical));return{kind:`changed`,marker:encodeMarker({ctag:i.ctag,syncToken:o.syncToken??i.syncToken}),items:[...d,...p]}}return{read:async(i,a,o)=>{try{let r=(await l.listCollections(await homeUrl(),`caldav`)).find(e=>e.url===i);if(!r)throw new e(n(t(`no calendar "{uid}"`),{uid:i}));let s={ctag:r.ctag,syncToken:r.syncToken},c=o?decodeMarker(o.marker):null;if(o&&c){if(same(s,c))return{kind:`unchanged`,marker:o.marker};if(c.syncToken!==null&&s.syncToken!==null)return await delta(r,a,c,o.items,s)}return await full(r,a,s)}catch(e){throw r(`readCollection`,e)}}}}export{createCaldavDeltaReader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{BackendAuthError as e,BackendError as t,BackendHttpError as n,errorMessage as r}from"../errors.js";import{_ as i,fmt as a}from"../i18n.js";import{DavError as o}from"@gjsify/dav";function davError(s,c){return c instanceof t?c:c instanceof o?c.status===401?new e(a(i(`{label}: the server rejected the credentials (401)`),{label:s}),`http`,401):new n(a(i(`{label}: {method} failed with {status}`),{label:s,method:c.method,status:c.status}),c.status,c.retryAfterMs??void 0):new t(a(i(`{label}: {message}`),{label:s,message:r(c)}))}export{davError};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createCaldavBackend as e}from"./backend.js";import{createCaldavDeltaReader as t}from"./delta.js";export{e as createCaldavBackend,t as createCaldavDeltaReader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{BackendError as e}from"../errors.js";import{_ as t,fmt as n}from"../i18n.js";import{edsError as r,isBackendFailure as i,unwrapList as a,unwrapResult as o}from"./errors.js";import{cal as s,eds as c}from"./libs.gjs.js";function sexpString(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}async function boundary(e,t){try{return await t()}catch(t){throw i(t)?t:r(e,t)}}function createEdsBackend(){let i=null,l=new Map;async function getRegistry(){if(!i){let e=await c.get();try{i=e.SourceRegistry.new_sync(null)}catch(e){throw r(`EDS source registry`,e)}}return i}async function sources(e){let t=await c.get(),n=await getRegistry();try{return n.list_enabled(e===`event`?t.SOURCE_EXTENSION_CALENDAR:t.SOURCE_EXTENSION_TASK_LIST)}catch(t){throw r(`list ${e===`event`?`calendars`:`task lists`}`,t)}}async function source(r,i){let a=(await sources(r)).find(e=>e.get_uid()===i);if(!a)throw new e(n(t(r===`event`?`no enabled calendar "{uid}"`:`no enabled task list "{uid}"`),{uid:i}));return a}function connect(e,t){let n=`${t}:${e.get_uid()}`,r=l.get(n);return r||(r=s.get().then(({ECal:n})=>new Promise((r,i)=>{let a=t===`event`?n.ClientSourceType.EVENTS:n.ClientSourceType.TASKS;n.Client.connect(e,a,15,null,(e,t)=>{try{let e=n.Client.connect_finish(t);e?r(e):i(Error(`ECal.Client.connect_finish returned null`))}catch(e){i(e)}})})),r.catch(()=>l.delete(n)),l.set(n,r)),r}async function query(e,t){return a(await e.get_object_list_as_comps(t,null)).flatMap(e=>{let t=e.get_icalcomponent()?.as_ical_string();return t?[t]:[]})}return{id:`eds`,listCalendars:e=>boundary(`listCalendars`,async()=>{let t=await getRegistry(),n=e?[e]:[`event`,`reminder`],r=[];for(let e of n)for(let n of await sources(e)){let i=n.get_parent(),a=i?t.ref_source(i):null;r.push({uid:n.get_uid(),name:n.get_display_name(),kind:e,backend:`eds`,account:a?.get_display_name()??null})}return r}),listItems:e=>boundary(`listItems`,async()=>{let{ECal:t}=await s.get(),n=`#t`;e.kind===`event`&&e.from&&e.to&&(n=`(occur-in-time-range? (make-time "${t.isodate_from_time_t(Math.floor(Date.parse(e.from)/1e3))}") (make-time "${t.isodate_from_time_t(Math.floor(Date.parse(e.to)/1e3))}"))`);let i=await sources(e.kind);e.calendarUid&&(i=i.filter(t=>t.get_uid()===e.calendarUid));let a=[],o=0,c=null;for(let t of i){let i;try{i=await connect(t,e.kind),o++}catch(e){c=e;continue}try{for(let e of await query(i,n))a.push({calendarUid:t.get_uid(),ical:e})}catch(e){throw r(`get_object_list_as_comps(${t.get_display_name()})`,e)}}if(o===0&&i.length>0&&c)throw r(`connect calendar`,c);return a}),getItem:(e,t,n)=>boundary(`getItem`,async()=>{let r=await query(await connect(await source(t,e),t),`(uid? ${sexpString(n)})`);return r[0]===void 0?null:{ical:r[0],etag:null}}),createItem:(r,i,a)=>boundary(`createItem`,async()=>{let{ECal:c,ICalGLib:l}=await s.get(),u=await connect(await source(i,r),i);if(u.is_readonly())throw new e(n(t(`"{calendar}" is read-only`),{calendar:r}));let d=l.Component.new_from_string(a),f=o(await u.create_object(d,c.OperationFlags.NONE,null));return typeof f==`string`?f:``}),updateItem:(r,i,a,o)=>boundary(`updateItem`,async()=>{let{ECal:a,ICalGLib:c}=await s.get(),l=await connect(await source(i,r),i);if(l.is_readonly())throw new e(n(t(`"{calendar}" is read-only`),{calendar:r}));let u=c.Component.new_from_string(o);await l.modify_object(u,a.ObjModType.THIS,a.OperationFlags.NONE,null)})}}export{createEdsBackend};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{BackendError as e,BackendUnavailableError as t,errorMessage as n}from"../errors.js";import{_ as r,fmt as i}from"../i18n.js";function edsError(t,a){let o=a,s=typeof o?.domain==`string`?o.domain:void 0,c=typeof o?.code==`number`?o.code:void 0;return new e(a===void 0?t:i(r(`{message}: {cause}`),{message:t,cause:n(a)}),s,c)}function isBackendFailure(n){return n instanceof e||n instanceof t}function unwrapResult(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`boolean`?e[1]:Array.isArray(e)&&e.length===1?e[0]:e}function unwrapList(e){let t=unwrapResult(e);return Array.isArray(t)?t:[]}export{edsError,isBackendFailure,unwrapList,unwrapResult};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{edsError as e,unwrapList as t,unwrapResult as n}from"./errors.js";import{createEdsBackend as r}from"./driver.gjs.js";export{r as createEdsBackend,e as edsError,t as unwrapList,n as unwrapResult};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{optionalNamespace as e}from"../optional.js";const t=e(`EDataServer`,async()=>(await import(`gi://EDataServer?version=1.2`)).default),n=e(`ECal`,async()=>{let[{default:e},{default:t},{default:n}]=await Promise.all([import(`gi://Gio?version=2.0`),import(`gi://ECal?version=2.0`),import(`gi://ICalGLib?version=3.0`)]);for(let n of[`get_object_list_as_comps`,`create_object`])e._promisify(t.Client.prototype,n,`${n}_finish`);return{ECal:t,ICalGLib:n}});export{n as cal,t as eds};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";var PimError=class extends Error{constructor(e){super(e),this.name=new.target.name}},BackendUnavailableError=class extends PimError{},BackendError=class extends PimError{domain;code;constructor(e,t,n){super(e),this.domain=t,this.code=n}},BackendHttpError=class extends BackendError{retryAfterMs;constructor(e,t,n){super(e,`http`,t),this.retryAfterMs=n}},BackendAuthError=class extends BackendError{},ConflictError=class extends BackendError{};function errorMessage(e){return e instanceof Error||e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`?e.message:String(e)}export{BackendAuthError,BackendError,BackendHttpError,BackendUnavailableError,ConflictError,PimError,errorMessage};
|
package/lib/esm/i18n.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";const e={gettext:e=>e,ngettext:(e,t,n)=>n===1?e:t};let t=e;function setPimTranslator(n){t=n??e}function _(e){return t.gettext(e)}function _n(e,n,r){return t.ngettext(e,n,r)}function fmt(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):e)}export{_,_n,fmt,setPimTranslator};
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./backend.js";import{BackendAuthError as e,BackendError as t,BackendHttpError as n,BackendUnavailableError as r,ConflictError as i,PimError as a,errorMessage as o}from"./errors.js";import{setPimTranslator as s}from"./i18n.js";import{optionalNamespace as c}from"./optional.js";import"./types.js";export{e as BackendAuthError,t as BackendError,n as BackendHttpError,r as BackendUnavailableError,i as ConflictError,a as PimError,o as errorMessage,c as optionalNamespace,s as setPimTranslator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{BackendUnavailableError as e,errorMessage as t}from"./errors.js";import{_ as n,fmt as r}from"./i18n.js";function optionalNamespace(i,a){let o=null;return{get(){return o??=a().catch(a=>{throw new e(r(n(`{label} typelib not available: {message}`),{label:i,message:t(a)}))}),o}}}export{optionalNamespace};
|
package/lib/esm/types.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CalendarBackend port — the seam between what an app decides and where the data lives.
|
|
3
|
+
*
|
|
4
|
+
* A backend moves iCalendar TEXT and nothing else. Parsing, dedupe and any policy live with the
|
|
5
|
+
* consumer, so a second backend is a transport and not a second copy of those rules. CalDAV speaks
|
|
6
|
+
* iCalendar on the wire; EDS hands out the same text via `as_ical_string()`.
|
|
7
|
+
*/
|
|
8
|
+
import type { CalendarInfo, ItemKind, RawItem } from './types.js';
|
|
9
|
+
export interface ItemQuery {
|
|
10
|
+
kind: ItemKind;
|
|
11
|
+
/** Restrict to one calendar; otherwise every enabled calendar of that kind. */
|
|
12
|
+
calendarUid?: string;
|
|
13
|
+
/** Events only: the window, as UTC ISO instants. Ignored for reminders. */
|
|
14
|
+
from?: string;
|
|
15
|
+
to?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One stored component, with whatever the backend uses to detect a concurrent change.
|
|
19
|
+
*
|
|
20
|
+
* `etag` is CalDAV's; EDS has no equivalent and reports null. An update hands the value back so
|
|
21
|
+
* the backend can refuse a write whose base is stale — see `CalendarBackend.updateItem`.
|
|
22
|
+
*/
|
|
23
|
+
export interface StoredItem {
|
|
24
|
+
ical: string;
|
|
25
|
+
etag: string | null;
|
|
26
|
+
}
|
|
27
|
+
export interface CalendarBackend {
|
|
28
|
+
/** Short id, shown in `CalendarInfo.backend`. */
|
|
29
|
+
readonly id: string;
|
|
30
|
+
listCalendars(kind?: ItemKind): Promise<CalendarInfo[]>;
|
|
31
|
+
/** Components in the query's scope. Events: those with an occurrence in [from, to]. */
|
|
32
|
+
listItems(query: ItemQuery): Promise<RawItem[]>;
|
|
33
|
+
/** One component by UID, or null when the calendar has none with that UID. */
|
|
34
|
+
getItem(calendarUid: string, kind: ItemKind, uid: string): Promise<StoredItem | null>;
|
|
35
|
+
/** Store one VEVENT/VTODO; returns the UID the backend recorded. Refuses a read-only calendar. */
|
|
36
|
+
createItem(calendarUid: string, kind: ItemKind, ical: string): Promise<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Replace one stored component with `ical`, which must carry the same UID.
|
|
39
|
+
*
|
|
40
|
+
* `etag` is the one `getItem` returned for the text this update was computed from. A backend
|
|
41
|
+
* that has etags makes the write conditional on it and raises `ConflictError` when the stored
|
|
42
|
+
* copy moved on — a lost update is an error, never a silent overwrite. Refuses a read-only
|
|
43
|
+
* calendar.
|
|
44
|
+
*/
|
|
45
|
+
updateItem(calendarUid: string, kind: ItemKind, uid: string, ical: string, etag?: string | null): Promise<void>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CalDAV driver for the CalendarBackend port.
|
|
3
|
+
*
|
|
4
|
+
* A calendar's uid is its collection URL. Components cross the port as iCalendar text: reads hand
|
|
5
|
+
* back whatever the server stores (a VCALENDAR wrapper included — core's parser walks nested
|
|
6
|
+
* components), writes wrap the bare component core builds, because CalDAV stores whole VCALENDARs.
|
|
7
|
+
*
|
|
8
|
+
* Recurring items come back as their series definition, like EDS: the server filters by the
|
|
9
|
+
* window and nothing is expanded here.
|
|
10
|
+
*/
|
|
11
|
+
import { type FetchLike } from '@gjsify/dav';
|
|
12
|
+
import type { CalendarBackend } from '../backend.js';
|
|
13
|
+
export interface CaldavOptions {
|
|
14
|
+
/** Server root or any URL the user knows; RFC 6764 discovery finds the calendar home. */
|
|
15
|
+
url: string;
|
|
16
|
+
username: string;
|
|
17
|
+
password: string;
|
|
18
|
+
/** Injectable for tests and custom TLS setups; defaults to the runtime's fetch. */
|
|
19
|
+
fetch?: FetchLike;
|
|
20
|
+
/** PRODID of the VCALENDAR a bare component is wrapped in; name the app that wrote it. */
|
|
21
|
+
prodId?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function createCaldavBackend(options: CaldavOptions): CalendarBackend;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delta read of one CalDAV collection (docs/adr/0018).
|
|
3
|
+
*
|
|
4
|
+
* The caller remembers the last answer — an opaque marker and the items — and hands both back. An
|
|
5
|
+
* unchanged collection then costs ONE request (a PROPFIND on the calendar home); a changed one
|
|
6
|
+
* costs the sync-collection report plus a multiget of only the changed items; a server without
|
|
7
|
+
* (or with a rejected) sync token costs a full listing. The driver still moves iCalendar text only.
|
|
8
|
+
*
|
|
9
|
+
* Marker: JSON `{"v":1,"ctag":string|null,"syncToken":string|null}`. Callers treat it as opaque;
|
|
10
|
+
* one that does not parse is no marker, and the read is a full one.
|
|
11
|
+
*/
|
|
12
|
+
import { type FetchLike } from '@gjsify/dav';
|
|
13
|
+
import type { CollectionDelta, CollectionPrevious, ItemKind } from '../types.js';
|
|
14
|
+
export interface CaldavDeltaOptions {
|
|
15
|
+
/** Server root or any URL the user knows; RFC 6764 discovery finds the calendar home once. */
|
|
16
|
+
url: string;
|
|
17
|
+
username: string;
|
|
18
|
+
password: string;
|
|
19
|
+
fetch?: FetchLike;
|
|
20
|
+
/** The calendar home, when known: skips discovery, so even the first read is cheap. */
|
|
21
|
+
homeUrl?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface CaldavDeltaReader {
|
|
24
|
+
/** `collectionUrl` is a calendar uid as `listCalendars` reports it. `previous` null = full read. */
|
|
25
|
+
read(collectionUrl: string, kind: ItemKind, previous: CollectionPrevious | null): Promise<CollectionDelta>;
|
|
26
|
+
}
|
|
27
|
+
export declare function createCaldavDeltaReader(options: CaldavDeltaOptions): CaldavDeltaReader;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Maps what `@gjsify/dav` throws onto the port's errors; shared by the backend and the delta reader. */
|
|
2
|
+
/** Classify a failure; 401 is an auth error, everything else a BackendError naming the call. */
|
|
3
|
+
export declare function davError(label: string, err: unknown): Error;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@gjsify/pim/caldav` — the CalDAV backend. Plain `fetch` through `@gjsify/dav`, so one
|
|
3
|
+
* implementation serves GJS and Node. Basic auth only; other schemes are the consumer's to refuse.
|
|
4
|
+
*/
|
|
5
|
+
export { createCaldavBackend, type CaldavOptions } from './backend.js';
|
|
6
|
+
export { createCaldavDeltaReader, type CaldavDeltaOptions, type CaldavDeltaReader } from './delta.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Evolution Data Server driver for the CalendarBackend port.
|
|
3
|
+
*
|
|
4
|
+
* EDS keeps events (`Calendar` sources) and reminders (`Task List` sources) apart, so `kind`
|
|
5
|
+
* picks the source extension and the client type. Every component crosses the port as
|
|
6
|
+
* iCalendar text; parsing is the consumer's.
|
|
7
|
+
*
|
|
8
|
+
* Recurring items come back as their series definition (`occur-in-time-range?` selects series
|
|
9
|
+
* with an occurrence in the window); occurrences are not expanded.
|
|
10
|
+
*/
|
|
11
|
+
import type { CalendarBackend } from '../backend.js';
|
|
12
|
+
export declare function createEdsBackend(): CalendarBackend;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BackendError, BackendUnavailableError } from '../errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* Wrap a native failure as a BackendError naming the call. GJS reports a GError's domain as a
|
|
4
|
+
* quark NUMBER, node-gi as its name; only the name is kept, so the field means one thing.
|
|
5
|
+
*/
|
|
6
|
+
export declare function edsError(message: string, cause?: unknown): BackendError;
|
|
7
|
+
/** An error that already names its cause and passes a boundary unchanged. */
|
|
8
|
+
export declare function isBackendFailure(err: unknown): err is BackendError | BackendUnavailableError;
|
|
9
|
+
/**
|
|
10
|
+
* Normalise a promisified EDS result. GJS marshals `(gboolean, out T)` as `[success, value]`
|
|
11
|
+
* while the @girs types declare `Promise<T>`; node-gi and older GJS hand back the value alone.
|
|
12
|
+
*/
|
|
13
|
+
export declare function unwrapResult<T>(result: unknown): T;
|
|
14
|
+
export declare function unwrapList<T>(result: unknown): T[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@gjsify/pim/eds` — the Evolution Data Server backend. One implementation for every runtime:
|
|
3
|
+
* GJS resolves `gi://` natively, Node through `@gjsify/node-gi`. The typelibs load on first use,
|
|
4
|
+
* so importing this entry on a host without EDS is safe; the first call answers with
|
|
5
|
+
* `BackendUnavailableError`.
|
|
6
|
+
*/
|
|
7
|
+
export { createEdsBackend } from './driver.gjs.js';
|
|
8
|
+
export { edsError, unwrapList, unwrapResult } from './errors.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The EDS typelibs, loaded on first use (see optional.ts for why). `import()` of a `gi://` URL
|
|
3
|
+
* is a plain dynamic import the bundler leaves alone, so a missing typelib is a rejection.
|
|
4
|
+
*/
|
|
5
|
+
export declare const eds: import("../optional.js").OptionalNamespace<typeof import("@girs/edataserver-1.2/edataserver-1.2").EDataServer>;
|
|
6
|
+
/** ECal + ICalGLib, with the Promise overloads the driver uses installed. */
|
|
7
|
+
export declare const cal: import("../optional.js").OptionalNamespace<{
|
|
8
|
+
ECal: typeof import("@girs/ecal-2.0/ecal-2.0").ECal;
|
|
9
|
+
ICalGLib: typeof import("@girs/icalglib-3.0/icalglib-3.0").ICalGLib;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One failure, one type. Consumers branch on these, so a backend never lets a raw native error
|
|
3
|
+
* through: a GLib.Error under GJS is a boxed GObject that JSON-serialises to `{}`.
|
|
4
|
+
*/
|
|
5
|
+
export declare class PimError extends Error {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
/** The backend cannot load at all on this host (no EDS typelibs, for example). */
|
|
9
|
+
export declare class BackendUnavailableError extends PimError {
|
|
10
|
+
}
|
|
11
|
+
/** A backend call failed; `domain`/`code` carry the GError metadata when there was one. */
|
|
12
|
+
export declare class BackendError extends PimError {
|
|
13
|
+
readonly domain: string | undefined;
|
|
14
|
+
readonly code: number | undefined;
|
|
15
|
+
constructor(message: string, domain?: string, code?: number);
|
|
16
|
+
}
|
|
17
|
+
/** An HTTP answer that is not success; `retryAfterMs` is the server's Retry-After (429, 503) when it sent one. */
|
|
18
|
+
export declare class BackendHttpError extends BackendError {
|
|
19
|
+
readonly retryAfterMs: number | undefined;
|
|
20
|
+
constructor(message: string, status: number, retryAfterMs?: number);
|
|
21
|
+
}
|
|
22
|
+
/** The server rejected the credentials (HTTP 401). Retrying with the same credentials cannot help. */
|
|
23
|
+
export declare class BackendAuthError extends BackendError {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The stored copy changed since it was read, so the write was refused (HTTP 412).
|
|
27
|
+
*
|
|
28
|
+
* Retrying is only correct after re-reading: the edit was computed from text that no longer is
|
|
29
|
+
* what the server holds.
|
|
30
|
+
*/
|
|
31
|
+
export declare class ConflictError extends BackendError {
|
|
32
|
+
}
|
|
33
|
+
export declare function errorMessage(err: unknown): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An in-process CalDAV server on localhost: just enough PROPFIND / REPORT / PUT to drive the
|
|
3
|
+
* backend, answering fixture multistatus XML. Records every request so tests can assert on it.
|
|
4
|
+
*/
|
|
5
|
+
export interface RecordedRequest {
|
|
6
|
+
method: string;
|
|
7
|
+
path: string;
|
|
8
|
+
body: string;
|
|
9
|
+
ifNoneMatch: string | undefined;
|
|
10
|
+
ifMatch: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface FakeDav {
|
|
13
|
+
url: string;
|
|
14
|
+
requests: RecordedRequest[];
|
|
15
|
+
/** Resources by path, e.g. `/cal/events/a.ics`. */
|
|
16
|
+
resources: Map<string, string>;
|
|
17
|
+
/** Replace a resource as another client would: new content, new etag. */
|
|
18
|
+
tamper(path: string, data: string): void;
|
|
19
|
+
/** Delete a resource as another client would. */
|
|
20
|
+
remove(path: string): void;
|
|
21
|
+
/** From now on every sync token the server handed out is answered with 403 valid-sync-token. */
|
|
22
|
+
expireTokens(): void;
|
|
23
|
+
/** From now on every authenticated request is answered with this status and Retry-After header. */
|
|
24
|
+
throttle(status: number, retryAfter: string): void;
|
|
25
|
+
close(): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export declare function startFakeDav(options: {
|
|
28
|
+
user: string;
|
|
29
|
+
password: string;
|
|
30
|
+
resources: Record<string, string>;
|
|
31
|
+
/** `token` (default): ctag + RFC 6578 sync-collection. `ctag`: a ctag only, no sync-token. */
|
|
32
|
+
sync?: 'token' | 'ctag';
|
|
33
|
+
}): Promise<FakeDav>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translation for the messages a backend raises — without this package importing gettext.
|
|
3
|
+
*
|
|
4
|
+
* The package runs where GJS's `gettext` module does not exist (Node, the tests), so it cannot
|
|
5
|
+
* bind a catalogue itself. An app that has one registers its translator once at startup; until
|
|
6
|
+
* then `_` returns the msgid, which is the English source text — exactly what gettext returns for
|
|
7
|
+
* a missing catalogue. The msgids live in the app's catalogue: extract this package's sources
|
|
8
|
+
* with the keywords `_` and `_n`.
|
|
9
|
+
*
|
|
10
|
+
* Call `_` when the string is BUILT, not at module level: a module-level call runs before any app
|
|
11
|
+
* could register.
|
|
12
|
+
*/
|
|
13
|
+
export interface PimTranslator {
|
|
14
|
+
gettext: (msgid: string) => string;
|
|
15
|
+
/** Both English forms go in — the CATALOGUE decides which one a count needs. */
|
|
16
|
+
ngettext: (singular: string, plural: string, n: number) => string;
|
|
17
|
+
}
|
|
18
|
+
/** Register the app's translator (null restores the English source strings). */
|
|
19
|
+
export declare function setPimTranslator(translator: PimTranslator | null): void;
|
|
20
|
+
export declare function _(msgid: string): string;
|
|
21
|
+
/** A counted string; never replace with an `n === 1` check — the plural rule is the catalogue's. */
|
|
22
|
+
export declare function _n(singular: string, plural: string, n: number): string;
|
|
23
|
+
/** Fill `{name}` placeholders in an already translated string (named, so a translation may reorder). */
|
|
24
|
+
export declare function fmt(template: string, values: Record<string, string | number>): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@gjsify/pim` — calendars and tasks behind one port, whatever stores them.
|
|
3
|
+
*
|
|
4
|
+
* The root entry is pure: the port, its types, the errors and the translator hook. Drivers are
|
|
5
|
+
* subpath exports, so a consumer pulls in only the ones it uses: `@gjsify/pim/caldav` (plain
|
|
6
|
+
* fetch, every runtime) and `@gjsify/pim/eds` (Evolution Data Server, typelibs loaded on first
|
|
7
|
+
* use).
|
|
8
|
+
*/
|
|
9
|
+
export * from './types.js';
|
|
10
|
+
export * from './backend.js';
|
|
11
|
+
export * from './errors.js';
|
|
12
|
+
export { optionalNamespace, type OptionalNamespace } from './optional.js';
|
|
13
|
+
export { setPimTranslator, type PimTranslator } from './i18n.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lazy, cached access to OPTIONAL GObject-Introspection namespaces. Pure — the `gi://` import
|
|
3
|
+
* lives in the caller's loader thunk — so the degradation is testable on Node.
|
|
4
|
+
*
|
|
5
|
+
* A static `import 'gi://ECal'` throws at module load on a host without Evolution Data Server
|
|
6
|
+
* (macOS, a container) and takes the whole app with it, `--help` included. Loading on first use
|
|
7
|
+
* turns that into a `BackendUnavailableError` every consumer already knows how to report.
|
|
8
|
+
*/
|
|
9
|
+
export interface OptionalNamespace<T> {
|
|
10
|
+
get(): Promise<T>;
|
|
11
|
+
}
|
|
12
|
+
/** Run the loader at most once; a failure is cached too — a missing typelib stays missing. */
|
|
13
|
+
export declare function optionalNamespace<T>(label: string, load: () => Promise<T>): OptionalNamespace<T>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What crosses the PIM port. A backend hands out iCalendar text and the calendars it lives in;
|
|
3
|
+
* parsing into richer types is the consumer's job, so every backend stays a transport.
|
|
4
|
+
*/
|
|
5
|
+
/** What a calendar holds: VEVENTs or VTODOs. EDS keeps them in separate sources. */
|
|
6
|
+
export type ItemKind = 'event' | 'reminder';
|
|
7
|
+
export interface CalendarInfo {
|
|
8
|
+
/** Backend-specific id, stable across sessions: EDS's source uid, CalDAV's collection URL. */
|
|
9
|
+
uid: string;
|
|
10
|
+
name: string;
|
|
11
|
+
kind: ItemKind;
|
|
12
|
+
/** Which backend serves it, e.g. `eds`. */
|
|
13
|
+
backend: string;
|
|
14
|
+
/** Display name of the collection/account it belongs to, when the backend knows one. */
|
|
15
|
+
account: string | null;
|
|
16
|
+
/** The collection refuses writes (a subscribed or shared-read-only list). Absent: unknown, assume writable. */
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** One raw component as a backend returns it: iCalendar text plus where it came from. */
|
|
20
|
+
export interface RawItem {
|
|
21
|
+
calendarUid: string;
|
|
22
|
+
ical: string;
|
|
23
|
+
}
|
|
24
|
+
/** One stored component of a collection, as a delta read keeps it between runs. */
|
|
25
|
+
export interface CollectionItem {
|
|
26
|
+
/** Absolute resource URL: the key a later delta merges on. */
|
|
27
|
+
href: string;
|
|
28
|
+
etag: string | null;
|
|
29
|
+
ical: string;
|
|
30
|
+
}
|
|
31
|
+
/** What a caller remembers about one collection: the marker of its last read and the items it got. */
|
|
32
|
+
export interface CollectionPrevious {
|
|
33
|
+
marker: string;
|
|
34
|
+
items: CollectionItem[];
|
|
35
|
+
}
|
|
36
|
+
/** Outcome of a delta read; `unchanged` carries no items because the caller already holds them. */
|
|
37
|
+
export type CollectionDelta = {
|
|
38
|
+
kind: 'unchanged';
|
|
39
|
+
marker: string;
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'changed';
|
|
42
|
+
marker: string;
|
|
43
|
+
items: CollectionItem[];
|
|
44
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,103 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@gjsify/pim",
|
|
3
|
+
"version": "0.64.54",
|
|
4
|
+
"description": "Calendars and tasks behind one port: the CalendarBackend interface moves iCalendar text, drivers move it to CalDAV (plain fetch, every runtime) or Evolution Data Server (typelibs loaded on first use).",
|
|
5
|
+
"module": "lib/esm/index.js",
|
|
6
|
+
"types": "lib/types/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./lib/types/index.d.ts",
|
|
12
|
+
"default": "./lib/esm/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./caldav": {
|
|
15
|
+
"types": "./lib/types/caldav/index.d.ts",
|
|
16
|
+
"default": "./lib/esm/caldav/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./eds": {
|
|
19
|
+
"types": "./lib/types/eds/index.d.ts",
|
|
20
|
+
"default": "./lib/esm/eds/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"lib",
|
|
25
|
+
"!lib/types/**/*.spec.d.ts",
|
|
26
|
+
"!lib/types/fake-dav-server.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"clear": "gjsify clear lib tmp tsconfig.tsbuildinfo test.gjs.mjs test.node.mjs",
|
|
30
|
+
"check": "gjsify tsc --noEmit",
|
|
31
|
+
"build": "gjsify run build:gjsify && gjsify run build:types",
|
|
32
|
+
"build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}' 'src/test.gjs.mts' 'src/fake-dav-server.ts'",
|
|
33
|
+
"build:types": "gjsify tsc",
|
|
34
|
+
"build:test": "gjsify run build:test:gjs && gjsify run build:test:node",
|
|
35
|
+
"build:test:gjs": "gjsify build src/test.gjs.mts --app gjs --outfile test.gjs.mjs",
|
|
36
|
+
"build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
|
|
37
|
+
"test": "gjsify run build:gjsify && gjsify run build:test && gjsify run test:node && gjsify run test:gjs",
|
|
38
|
+
"test:gjs": "gjsify env DBUS_SESSION_BUS_ADDRESS=unix:path=/nonexistent XDG_RUNTIME_DIR=/nonexistent gjsify run test.gjs.mjs",
|
|
39
|
+
"test:node": "node test.node.mjs"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"calendar",
|
|
43
|
+
"tasks",
|
|
44
|
+
"reminders",
|
|
45
|
+
"icalendar",
|
|
46
|
+
"caldav",
|
|
47
|
+
"evolution-data-server",
|
|
48
|
+
"eds"
|
|
49
|
+
],
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@girs/ecal-2.0": "5.4.0",
|
|
52
|
+
"@girs/edataserver-1.2": "5.4.0",
|
|
53
|
+
"@girs/icalglib-3.0": "5.4.0",
|
|
54
|
+
"@gjsify/dav": "0.64.54"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@girs/gio-2.0": "5.4.0",
|
|
58
|
+
"@girs/gjs": "5.4.0",
|
|
59
|
+
"@girs/glib-2.0": "5.4.0",
|
|
60
|
+
"@girs/gobject-2.0": "5.4.0",
|
|
61
|
+
"@gjsify/cli": "0.64.54",
|
|
62
|
+
"@gjsify/fetch": "0.64.54",
|
|
63
|
+
"@gjsify/http": "0.64.54",
|
|
64
|
+
"@gjsify/unit": "0.64.54",
|
|
65
|
+
"@types/node": "^25.9.2",
|
|
66
|
+
"typescript": "^6.0.3"
|
|
67
|
+
},
|
|
68
|
+
"license": "MIT",
|
|
69
|
+
"repository": {
|
|
70
|
+
"type": "git",
|
|
71
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
72
|
+
"directory": "packages/gjs/pim"
|
|
73
|
+
},
|
|
74
|
+
"bugs": {
|
|
75
|
+
"url": "https://github.com/gjsify/gjsify/issues"
|
|
76
|
+
},
|
|
77
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/gjs/pim#readme",
|
|
78
|
+
"gjsify": {
|
|
79
|
+
"tier": 3,
|
|
80
|
+
"runtimes": {
|
|
81
|
+
"gjs": "native",
|
|
82
|
+
"node": "none",
|
|
83
|
+
"browser": "none",
|
|
84
|
+
"nativescript": "none"
|
|
85
|
+
},
|
|
86
|
+
"headless": [
|
|
87
|
+
"Gdk",
|
|
88
|
+
"GdkPixbuf",
|
|
89
|
+
"Gsk",
|
|
90
|
+
"Gtk",
|
|
91
|
+
"Adw"
|
|
92
|
+
],
|
|
93
|
+
"os": {
|
|
94
|
+
"linux": "supported",
|
|
95
|
+
"darwin": "none",
|
|
96
|
+
"win32": "none"
|
|
97
|
+
},
|
|
98
|
+
"osNotes": {
|
|
99
|
+
"darwin": "The CalDAV driver is plain fetch and works; the EDS driver answers BackendUnavailableError because Evolution Data Server is not there.",
|
|
100
|
+
"win32": "The CalDAV driver is plain fetch and works; the EDS driver answers BackendUnavailableError because Evolution Data Server is not there."
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|