@procedures/ics 0.27.8 → 0.28.1
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/CHANGELOG.md +31 -0
- package/README.md +17 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/module.d.ts +11 -0
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +15 -1
- package/dist/module.js.map +1 -1
- package/dist/procedures.d.ts +18 -0
- package/dist/procedures.d.ts.map +1 -1
- package/dist/procedures.js +37 -15
- package/dist/procedures.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -1
- package/dist/types.js.map +1 -1
- package/dist/write.d.ts +9 -1
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +31 -4
- package/dist/write.js.map +1 -1
- package/package.json +2 -2
- package/src/module.ts +15 -1
- package/src/procedures.ts +47 -15
- package/src/types.ts +3 -1
- package/src/write.ts +38 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @procedures/ics
|
|
2
2
|
|
|
3
|
+
## 0.28.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 345c740: `writeIcs` writes the EXDATE of an event with a `tzid` in that zone, with the TZID and the local start time. The parser reads the EXDATE dates in the zone of the event, so a parse, a write and a parse skip the same occurrence. Before, an evening EXDATE moved to the wrong day. `IcsWriteEvent` and the input of `ics.write` get the optional field `tzid` (roadmap O57).
|
|
8
|
+
- 21dc858: Fixes for the security findings of the second code audit (roadmap O55).
|
|
9
|
+
|
|
10
|
+
PATCH: bug fixes and additive options. Each fix refuses only an input that the documentation does not give. A caller that uses the documented behavior sees no change. A request to a loopback, private or link-local host still works, with a deprecation notice. Version 0.29.0 refuses it (decision D35).
|
|
11
|
+
|
|
12
|
+
- `procedure.delete` and `procedure.define` of `@procedures/client` obey the expose rule of the host, as `procedure.get` does (R17). `procedure.delete` does not find a hidden procedure, and `procedure.define` refuses to replace one with `NOT_EXPOSED`. A new procedure at a free path stays possible, as before. Before, a caller could remove or replace a hidden procedure that the host defined.
|
|
13
|
+
- The task store of `@procedures/mcp-server` keeps a task without a session (stdio, an SDK transport) apart from the HTTP sessions, both ways. Before, each HTTP session could list, read and cancel such a task.
|
|
14
|
+
- `restic.run` of `@procedures/restic` refuses each input that lets the caller choose a program for restic to start: `--from-password-command`, `--password-command2`, an extended option that sets `sftp.command`, `sftp.args`, `rclone.program` or `rclone.args` (each spelling), an sftp or rclone repository whose host or remote starts with `-`, and a positional argument that starts with `-` after a last flag without a value. Before, only `--password-command` was refused.
|
|
15
|
+
- `@procedures/http` exports `createHostFetch(options)`: a `fetch` for GET requests through the host policy, with the options of `createHttpModule()`. It also exports `httpSettings(options)`. The deprecated option `warnOnRefusal` keeps a refused host working: the process gets one `DeprecationWarning`, and the request goes through the global `fetch`.
|
|
16
|
+
- `weather.forecast` of `@procedures/weather` sends its request through `createHostFetch()` with `warnOnRefusal`. A `baseUrl` on a loopback, private or link-local address still works, with the warning `PROCEDURES_WEATHER_PRIVATE_HOST`. `createWeatherModule({ fetch })` gives another `fetch`, for a server of the host on such an address.
|
|
17
|
+
- `@procedures/geo` and `@procedures/ics` add `createGeoModule({ fetch })` and `createIcsModule({ fetch })`. Their default stays the global `fetch`, because their roots run in a browser. A refusal of the host policy keeps its code and its reason. The refusal of `ics.fetch` does not name the feed address.
|
|
18
|
+
- `@procedures/bundle-assistant` exports `mcpHostModules`: the modules of `geo` and `ics` with `createHostFetch()` and `warnOnRefusal`. A refused host gets the warning `PROCEDURES_GEO_PRIVATE_HOST` or `PROCEDURES_ICS_PRIVATE_HOST`. The bundle keeps the default modules, so `mark` and the site load it next to `geo` and `ics` as before.
|
|
19
|
+
- The dev-tools server of `@procedures/mcp-dev-tools` gives the `mcpHostModules` of each bundle to `createRegistry()` before the bundles. In one call, the first module of a name counts. Thus `geo.geocode`, `geo.route`, `weather.forecast` and `ics.fetch` of the dev-tools server go through the default host policy.
|
|
20
|
+
|
|
21
|
+
A host that sends `weather.forecast`, or the bundle's `geo` tools, to a server on a private address can remove the warning now. It gives a `fetch` that allows the server: `createWeatherModule({ fetch: createHostFetch({ allow: ["10.0.0.5:8080"] }) })`. This `fetch` refuses each other private host now, as 0.29.0 does by default.
|
|
22
|
+
- Updated dependencies [345c740]
|
|
23
|
+
- Updated dependencies [984c13b]
|
|
24
|
+
- Updated dependencies [21dc858]
|
|
25
|
+
- @procedures/client@0.28.1
|
|
26
|
+
|
|
27
|
+
## 0.28.0
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [06694d7]
|
|
32
|
+
- @procedures/client@0.28.0
|
|
33
|
+
|
|
3
34
|
## 0.27.8
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -48,8 +48,9 @@ const text = writeIcs(
|
|
|
48
48
|
);
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
- An event has `uid` and `start`. The other fields are optional: `end`, `allDay`, `summary`, `location`, `description`, `url`, `sequence`, `status`, `rrule` and `
|
|
51
|
+
- An event has `uid` and `start`. The other fields are optional: `end`, `allDay`, `summary`, `location`, `description`, `url`, `sequence`, `status`, `rrule`, `exdates` and `tzid`.
|
|
52
52
|
- The writer writes each time in UTC (`20261101T230000Z`). An all-day event gets `VALUE=DATE`, and its end date is exclusive.
|
|
53
|
+
- An event with `tzid` gets each `EXDATE` in that zone: `EXDATE;TZID=America/Los_Angeles:20261110T200000`. Each date of `exdates` is a date in that zone.
|
|
53
54
|
- The writer escapes `\`, `;`, `,` and each line break in a text value. It removes the other control characters.
|
|
54
55
|
- The writer folds each line at 75 octets of UTF-8. A fold does not divide a character. Each line ends with CRLF.
|
|
55
56
|
- The options set the calendar properties: `prodId`, `method`, `calscale` and `calendarName` (`X-WR-CALNAME`). `VERSION` is always `2.0`.
|
|
@@ -108,3 +109,18 @@ daysBetween("2026-10-31", "2026-11-02"); // 2
|
|
|
108
109
|
The address of a private calendar feed is a secret. `ics.fetch` does not put the address in an error message.
|
|
109
110
|
|
|
110
111
|
The function `fetchCalendar(url, timeoutMs, signal, { fetch })` gets the text of a feed. It refuses an HTTP error and a page that is not a calendar. The option `fetch` replaces the global `fetch`, for a test or a host with its own client.
|
|
112
|
+
|
|
113
|
+
## The host policy
|
|
114
|
+
|
|
115
|
+
`ics.fetch` sends its request with the `fetch` of the module. The default is the global `fetch`, so the root stays safe for a browser.
|
|
116
|
+
|
|
117
|
+
A Node host that serves other callers gives `createHostFetch()` of `@procedures/http` to `createIcsModule()`. Then the host policy examines the feed address and each redirect. It refuses a loopback, private or link-local address, unless the `allow` list of the host has it:
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import { createHostFetch } from "@procedures/http";
|
|
121
|
+
import { createIcsModule } from "@procedures/ics/module";
|
|
122
|
+
|
|
123
|
+
const registry = createRegistry(createIcsModule({ fetch: createHostFetch() }));
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
A refusal is `FORBIDDEN` with the reason `host-not-allowed`. Its message does not contain the address of the feed. `mcpHostModules` of `@procedures/bundle-assistant` has a module of `ics` with this policy. The dev-tools server uses it. In 0.28, that module still sends a refused request, with a `DeprecationWarning`. Version 0.29.0 refuses it.
|