@hebcal/icalendar 5.1.0 → 5.1.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/README.md +1 -1
- package/dist/icalendar.d.ts +1 -0
- package/dist/index.cjs +16 -2
- package/dist/index.mjs +16 -2
- package/dist/pkgVersion.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/icalendar.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/icalendar v5.1.
|
|
1
|
+
/*! @hebcal/icalendar v5.1.1 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var core = require('@hebcal/core');
|
|
@@ -7,7 +7,7 @@ var restApi = require('@hebcal/rest-api');
|
|
|
7
7
|
var fs = require('fs');
|
|
8
8
|
|
|
9
9
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10
|
-
const version = '5.1.
|
|
10
|
+
const version = '5.1.1';
|
|
11
11
|
|
|
12
12
|
const vtimezoneCache = new Map();
|
|
13
13
|
const CATEGORY = {
|
|
@@ -220,6 +220,14 @@ class IcalEvent {
|
|
|
220
220
|
if (this.timed && loc) {
|
|
221
221
|
arr.push('GEO:' + loc.getLatitude() + ';' + loc.getLongitude());
|
|
222
222
|
}
|
|
223
|
+
// In addition to the URL being part of the DESCRIPTION field,
|
|
224
|
+
// should we also generate an RFC 5545 URL property?
|
|
225
|
+
if (options.url) {
|
|
226
|
+
const url = ev.url();
|
|
227
|
+
if (url) {
|
|
228
|
+
arr.push('URL:' + appendTrackingToUrl(url, options));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
223
231
|
const trigger = this.getAlarm();
|
|
224
232
|
if (trigger) {
|
|
225
233
|
arr.push('BEGIN:VALARM', 'ACTION:DISPLAY', 'DESCRIPTION:Event reminder', `${trigger}`, 'END:VALARM');
|
|
@@ -400,6 +408,8 @@ function createMemo(ev, options) {
|
|
|
400
408
|
* Generates an RFC 2445 iCalendar string from an array of events
|
|
401
409
|
*/
|
|
402
410
|
async function eventsToIcalendar(events, options) {
|
|
411
|
+
if (!events.length)
|
|
412
|
+
throw new RangeError('Events can not be empty');
|
|
403
413
|
if (!options)
|
|
404
414
|
throw new TypeError('Invalid options object');
|
|
405
415
|
const opts = Object.assign({}, options);
|
|
@@ -414,6 +424,10 @@ async function eventsToIcalendar(events, options) {
|
|
|
414
424
|
* Generates an RFC 2445 iCalendar string from an array of IcalEvents
|
|
415
425
|
*/
|
|
416
426
|
async function icalEventsToString(icals, options) {
|
|
427
|
+
if (!icals.length)
|
|
428
|
+
throw new RangeError('Events can not be empty');
|
|
429
|
+
if (!options)
|
|
430
|
+
throw new TypeError('Invalid options object');
|
|
417
431
|
const stream = [];
|
|
418
432
|
const locale = options.locale || core.Locale.getLocaleName();
|
|
419
433
|
const uclang = locale.toUpperCase();
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @hebcal/icalendar v5.1.
|
|
1
|
+
/*! @hebcal/icalendar v5.1.1 */
|
|
2
2
|
import { flags, Locale, greg } from '@hebcal/core';
|
|
3
3
|
import { murmur32HexSync } from 'murmurhash3';
|
|
4
4
|
import { shouldRenderBrief, pad2, getEventCategories, makeAnchor, pad4, getHolidayDescription, getCalendarTitle, appendIsraelAndTracking, makeTorahMemoText } from '@hebcal/rest-api';
|
|
5
5
|
import { promises } from 'fs';
|
|
6
6
|
|
|
7
7
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
8
|
-
const version = '5.1.
|
|
8
|
+
const version = '5.1.1';
|
|
9
9
|
|
|
10
10
|
const vtimezoneCache = new Map();
|
|
11
11
|
const CATEGORY = {
|
|
@@ -218,6 +218,14 @@ class IcalEvent {
|
|
|
218
218
|
if (this.timed && loc) {
|
|
219
219
|
arr.push('GEO:' + loc.getLatitude() + ';' + loc.getLongitude());
|
|
220
220
|
}
|
|
221
|
+
// In addition to the URL being part of the DESCRIPTION field,
|
|
222
|
+
// should we also generate an RFC 5545 URL property?
|
|
223
|
+
if (options.url) {
|
|
224
|
+
const url = ev.url();
|
|
225
|
+
if (url) {
|
|
226
|
+
arr.push('URL:' + appendTrackingToUrl(url, options));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
221
229
|
const trigger = this.getAlarm();
|
|
222
230
|
if (trigger) {
|
|
223
231
|
arr.push('BEGIN:VALARM', 'ACTION:DISPLAY', 'DESCRIPTION:Event reminder', `${trigger}`, 'END:VALARM');
|
|
@@ -398,6 +406,8 @@ function createMemo(ev, options) {
|
|
|
398
406
|
* Generates an RFC 2445 iCalendar string from an array of events
|
|
399
407
|
*/
|
|
400
408
|
async function eventsToIcalendar(events, options) {
|
|
409
|
+
if (!events.length)
|
|
410
|
+
throw new RangeError('Events can not be empty');
|
|
401
411
|
if (!options)
|
|
402
412
|
throw new TypeError('Invalid options object');
|
|
403
413
|
const opts = Object.assign({}, options);
|
|
@@ -412,6 +422,10 @@ async function eventsToIcalendar(events, options) {
|
|
|
412
422
|
* Generates an RFC 2445 iCalendar string from an array of IcalEvents
|
|
413
423
|
*/
|
|
414
424
|
async function icalEventsToString(icals, options) {
|
|
425
|
+
if (!icals.length)
|
|
426
|
+
throw new RangeError('Events can not be empty');
|
|
427
|
+
if (!options)
|
|
428
|
+
throw new TypeError('Invalid options object');
|
|
415
429
|
const stream = [];
|
|
416
430
|
const locale = options.locale || Locale.getLocaleName();
|
|
417
431
|
const uclang = locale.toUpperCase();
|
package/dist/pkgVersion.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.1.
|
|
1
|
+
export declare const version = "5.1.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/icalendar",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ical",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"url": "https://github.com/hebcal/hebcal-icalendar/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@hebcal/core": "^5.4.
|
|
32
|
+
"@hebcal/core": "^5.4.6",
|
|
33
33
|
"@hebcal/rest-api": "^5.0.5",
|
|
34
34
|
"murmurhash3": "^0.5.0",
|
|
35
35
|
"tslib": "^2.6.3"
|
|
@@ -61,6 +61,6 @@
|
|
|
61
61
|
"jsdoc-to-markdown": "^8.0.1",
|
|
62
62
|
"rollup": "^4.18.0",
|
|
63
63
|
"ts-jest": "^29.1.5",
|
|
64
|
-
"typescript": "^5.5.
|
|
64
|
+
"typescript": "^5.5.3"
|
|
65
65
|
}
|
|
66
66
|
}
|