ical-generator 7.2.1-develop.2 → 7.2.1-develop.4
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 +4 -1
- package/dist/index.cjs +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/src/alarm.ts +7 -5
- package/src/attendee.ts +2 -2
- package/src/calendar.ts +2 -2
- package/src/event.ts +15 -14
- package/src/index.ts +45 -45
- package/src/tools.ts +8 -7
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"description": "ical-generator is a small piece of code which generates ical calendar files",
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@eslint/js": "^9.9.0",
|
|
12
|
+
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
12
13
|
"@qiwi/semantic-release-gh-pages-plugin": "^5.2.12",
|
|
13
14
|
"@sebbo2002/semantic-release-jsr": "^1.1.0",
|
|
14
15
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
"semantic-release": "^24.0.0",
|
|
37
38
|
"semantic-release-license": "^1.0.2",
|
|
38
39
|
"source-map-support": "^0.5.21",
|
|
39
|
-
"ts-node": "^10.9.2",
|
|
40
40
|
"tsup": "^8.2.4",
|
|
41
|
+
"tsx": "^4.16.2",
|
|
41
42
|
"typedoc": "^0.26.3",
|
|
42
43
|
"typescript": "^5.5.4",
|
|
43
44
|
"typescript-eslint": "^8.0.0-alpha.62"
|
|
@@ -120,7 +121,7 @@
|
|
|
120
121
|
"build": "tsup && cp ./dist/index.d.ts ./dist/index.d.cts",
|
|
121
122
|
"build-all": "./.github/workflows/build.sh",
|
|
122
123
|
"coverage": "c8 mocha",
|
|
123
|
-
"develop": "
|
|
124
|
+
"develop": "tsx src/bin/start.ts",
|
|
124
125
|
"example": "node ./dist/examples/push.js",
|
|
125
126
|
"license-check": "license-checker --production --summary",
|
|
126
127
|
"lint": "eslint .",
|
|
@@ -128,5 +129,5 @@
|
|
|
128
129
|
"test": "mocha"
|
|
129
130
|
},
|
|
130
131
|
"type": "module",
|
|
131
|
-
"version": "7.2.1-develop.
|
|
132
|
+
"version": "7.2.1-develop.4"
|
|
132
133
|
}
|
package/src/alarm.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import ICalEvent from './event.ts';
|
|
3
|
+
import type ICalEvent from './event.ts';
|
|
4
4
|
import {
|
|
5
5
|
addOrGetCustomAttributes,
|
|
6
6
|
formatDate,
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
toJSON,
|
|
12
12
|
checkNameAndMail
|
|
13
13
|
} from './tools.ts';
|
|
14
|
-
import {ICalDateTimeValue} from './types.ts';
|
|
15
|
-
import ICalAttendee, { ICalAttendeeData } from './attendee.ts';
|
|
14
|
+
import { type ICalDateTimeValue } from './types.ts';
|
|
15
|
+
import ICalAttendee, { type ICalAttendeeData } from './attendee.ts';
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
export enum ICalAlarmType {
|
|
@@ -324,7 +324,8 @@ export default class ICalAlarm {
|
|
|
324
324
|
* alarm is triggered after the event started.
|
|
325
325
|
*
|
|
326
326
|
* @since 0.2.1
|
|
327
|
-
* @
|
|
327
|
+
* @see {@link trigger}
|
|
328
|
+
* @see {@link triggerAfter}
|
|
328
329
|
*/
|
|
329
330
|
triggerBefore (trigger: number | ICalDateTimeValue): this;
|
|
330
331
|
|
|
@@ -345,7 +346,8 @@ export default class ICalAlarm {
|
|
|
345
346
|
* for details about supported values and timezone handling.
|
|
346
347
|
*
|
|
347
348
|
* @since 0.2.1
|
|
348
|
-
* @
|
|
349
|
+
* @see {@link trigger}
|
|
350
|
+
* @see {@link triggerAfter}
|
|
349
351
|
*/
|
|
350
352
|
triggerBefore (): number | ICalDateTimeValue;
|
|
351
353
|
triggerBefore (trigger?: number | ICalDateTimeValue): this | number | ICalDateTimeValue {
|
package/src/attendee.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
import {addOrGetCustomAttributes, checkEnum, checkNameAndMail, escape} from './tools.ts';
|
|
5
|
-
import ICalEvent from './event.ts';
|
|
6
|
-
import ICalAlarm from './alarm.ts';
|
|
5
|
+
import type ICalEvent from './event.ts';
|
|
6
|
+
import type ICalAlarm from './alarm.ts';
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
interface ICalInternalAttendeeData {
|
package/src/calendar.ts
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
isMomentDuration,
|
|
9
9
|
toDurationString
|
|
10
10
|
} from './tools.ts';
|
|
11
|
-
import ICalEvent, {ICalEventData, ICalEventJSONData} from './event.ts';
|
|
12
|
-
import { ICalMomentDurationStub, ICalTimezone } from './types.ts';
|
|
11
|
+
import ICalEvent, { type ICalEventData, type ICalEventJSONData } from './event.ts';
|
|
12
|
+
import { type ICalMomentDurationStub, type ICalTimezone } from './types.ts';
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
export interface ICalCalendarData {
|
package/src/event.ts
CHANGED
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
toDate,
|
|
15
15
|
toJSON
|
|
16
16
|
} from './tools.ts';
|
|
17
|
-
import ICalAttendee, {ICalAttendeeData} from './attendee.ts';
|
|
18
|
-
import ICalAlarm, {ICalAlarmData} from './alarm.ts';
|
|
19
|
-
import ICalCategory, {ICalCategoryData} from './category.ts';
|
|
17
|
+
import ICalAttendee, { type ICalAttendeeData } from './attendee.ts';
|
|
18
|
+
import ICalAlarm, { type ICalAlarmData } from './alarm.ts';
|
|
19
|
+
import ICalCategory, { type ICalCategoryData } from './category.ts';
|
|
20
20
|
import ICalCalendar from './calendar.ts';
|
|
21
21
|
import {
|
|
22
|
-
ICalDateTimeValue,
|
|
23
|
-
ICalDescription,
|
|
24
22
|
ICalEventRepeatingFreq,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
ICalWeekday,
|
|
24
|
+
type ICalDateTimeValue,
|
|
25
|
+
type ICalDescription,
|
|
26
|
+
type ICalLocation,
|
|
27
|
+
type ICalOrganizer,
|
|
28
|
+
type ICalRRuleStub,
|
|
29
|
+
type ICalRepeatingOptions
|
|
30
30
|
} from './types.ts';
|
|
31
31
|
|
|
32
32
|
|
|
@@ -266,7 +266,7 @@ export default class ICalEvent {
|
|
|
266
266
|
/**
|
|
267
267
|
* Get the event's ID
|
|
268
268
|
* @since 0.2.0
|
|
269
|
-
* @
|
|
269
|
+
* @see {@link id}
|
|
270
270
|
*/
|
|
271
271
|
uid(): string;
|
|
272
272
|
|
|
@@ -275,7 +275,6 @@ export default class ICalEvent {
|
|
|
275
275
|
* If not set, a UUID will be generated randomly.
|
|
276
276
|
*
|
|
277
277
|
* @param id Event ID you want to set
|
|
278
|
-
* @alias id
|
|
279
278
|
*/
|
|
280
279
|
uid(id: string | number): this;
|
|
281
280
|
uid(id?: string | number): this | string {
|
|
@@ -487,6 +486,7 @@ export default class ICalEvent {
|
|
|
487
486
|
/**
|
|
488
487
|
* Get the event's timestamp
|
|
489
488
|
* @since 0.2.0
|
|
489
|
+
* @see {@link timestamp}
|
|
490
490
|
*/
|
|
491
491
|
stamp(): ICalDateTimeValue;
|
|
492
492
|
|
|
@@ -496,6 +496,7 @@ export default class ICalEvent {
|
|
|
496
496
|
* for details about supported values and timezone handling.
|
|
497
497
|
*
|
|
498
498
|
* @since 0.2.0
|
|
499
|
+
* @see {@link timestamp}
|
|
499
500
|
*/
|
|
500
501
|
stamp(stamp: ICalDateTimeValue): this;
|
|
501
502
|
stamp(stamp?: ICalDateTimeValue): this | ICalDateTimeValue {
|
|
@@ -510,7 +511,7 @@ export default class ICalEvent {
|
|
|
510
511
|
/**
|
|
511
512
|
* Get the event's timestamp
|
|
512
513
|
* @since 0.2.0
|
|
513
|
-
* @
|
|
514
|
+
* @see {@link stamp}
|
|
514
515
|
*/
|
|
515
516
|
timestamp(): ICalDateTimeValue;
|
|
516
517
|
|
|
@@ -520,7 +521,7 @@ export default class ICalEvent {
|
|
|
520
521
|
* for details about supported values and timezone handling.
|
|
521
522
|
*
|
|
522
523
|
* @since 0.2.0
|
|
523
|
-
* @
|
|
524
|
+
* @see {@link stamp}
|
|
524
525
|
*/
|
|
525
526
|
timestamp(stamp: ICalDateTimeValue): this;
|
|
526
527
|
timestamp(stamp?: ICalDateTimeValue): this | ICalDateTimeValue {
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
'use strict';
|
|
6
6
|
|
|
7
|
-
import ICalCalendar, {ICalCalendarData} from './calendar.ts';
|
|
7
|
+
import ICalCalendar, { type ICalCalendarData } from './calendar.ts';
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -47,77 +47,77 @@ function ical(data?: ICalCalendarData): ICalCalendar {
|
|
|
47
47
|
export default ical;
|
|
48
48
|
|
|
49
49
|
export {
|
|
50
|
-
default as ICalAlarm,
|
|
51
|
-
ICalAlarmData,
|
|
52
|
-
ICalAlarmBaseData,
|
|
53
|
-
ICalAlarmJSONData,
|
|
54
50
|
ICalAlarmRelatesTo,
|
|
55
|
-
ICalAlarmRepeatData,
|
|
56
|
-
ICalAlarmTriggerData,
|
|
57
|
-
ICalAlarmTriggerAfterData,
|
|
58
|
-
ICalAlarmTriggerBeforeData,
|
|
59
51
|
ICalAlarmType,
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
default as ICalAlarm,
|
|
53
|
+
type ICalAlarmBaseData,
|
|
54
|
+
type ICalAlarmData,
|
|
55
|
+
type ICalAlarmJSONData,
|
|
56
|
+
type ICalAlarmRepeatData,
|
|
57
|
+
type ICalAlarmTriggerAfterData,
|
|
58
|
+
type ICalAlarmTriggerBeforeData,
|
|
59
|
+
type ICalAlarmTriggerData,
|
|
60
|
+
type ICalAlarmTypeValue,
|
|
61
|
+
type ICalAttachment
|
|
62
62
|
} from './alarm.ts';
|
|
63
63
|
|
|
64
64
|
export {
|
|
65
|
-
default as ICalAttendee,
|
|
66
|
-
ICalAttendeeData,
|
|
67
|
-
ICalAttendeeType,
|
|
68
65
|
ICalAttendeeRole,
|
|
69
66
|
ICalAttendeeStatus,
|
|
70
|
-
|
|
67
|
+
ICalAttendeeType,
|
|
68
|
+
default as ICalAttendee,
|
|
69
|
+
type ICalAttendeeData,
|
|
70
|
+
type ICalAttendeeJSONData
|
|
71
71
|
} from './attendee.ts';
|
|
72
72
|
|
|
73
73
|
export {
|
|
74
|
-
default as ICalCalendar,
|
|
75
|
-
ICalCalendarData,
|
|
76
|
-
ICalCalendarProdIdData,
|
|
77
74
|
ICalCalendarMethod,
|
|
78
|
-
|
|
75
|
+
default as ICalCalendar,
|
|
76
|
+
type ICalCalendarData,
|
|
77
|
+
type ICalCalendarJSONData,
|
|
78
|
+
type ICalCalendarProdIdData
|
|
79
79
|
} from './calendar.ts';
|
|
80
80
|
|
|
81
81
|
export {
|
|
82
82
|
default as ICalCategory,
|
|
83
|
-
ICalCategoryData,
|
|
84
|
-
ICalCategoryJSONData
|
|
83
|
+
type ICalCategoryData,
|
|
84
|
+
type ICalCategoryJSONData
|
|
85
85
|
} from './category.ts';
|
|
86
86
|
|
|
87
87
|
export {
|
|
88
|
-
default as ICalEvent,
|
|
89
|
-
ICalEventStatus,
|
|
90
88
|
ICalEventBusyStatus,
|
|
91
|
-
ICalEventTransparency,
|
|
92
|
-
ICalEventData,
|
|
93
|
-
ICalEventJSONData,
|
|
94
|
-
ICalEventJSONRepeatingData,
|
|
95
89
|
ICalEventClass,
|
|
90
|
+
ICalEventStatus,
|
|
91
|
+
ICalEventTransparency,
|
|
92
|
+
default as ICalEvent,
|
|
93
|
+
type ICalEventData,
|
|
94
|
+
type ICalEventJSONData,
|
|
95
|
+
type ICalEventJSONRepeatingData
|
|
96
96
|
} from './event.ts';
|
|
97
97
|
|
|
98
98
|
export {
|
|
99
|
-
ICalDateTimeValue,
|
|
100
|
-
ICalRepeatingOptions,
|
|
101
|
-
ICalLocation,
|
|
102
|
-
ICalLocationWithTitle,
|
|
103
|
-
ICalLocationWithoutTitle,
|
|
104
|
-
ICalGeo,
|
|
105
|
-
ICalOrganizer,
|
|
106
|
-
ICalDescription,
|
|
107
99
|
ICalEventRepeatingFreq,
|
|
108
100
|
ICalWeekday,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
101
|
+
type ICalDateTimeValue,
|
|
102
|
+
type ICalDayJsStub,
|
|
103
|
+
type ICalDescription,
|
|
104
|
+
type ICalGeo,
|
|
105
|
+
type ICalLocation,
|
|
106
|
+
type ICalLocationWithTitle,
|
|
107
|
+
type ICalLocationWithoutTitle,
|
|
108
|
+
type ICalLuxonDateTimeStub,
|
|
109
|
+
type ICalMomentDurationStub,
|
|
110
|
+
type ICalMomentStub,
|
|
111
|
+
type ICalMomentTimezoneStub,
|
|
112
|
+
type ICalOrganizer,
|
|
113
|
+
type ICalRRuleStub,
|
|
114
|
+
type ICalRepeatingOptions,
|
|
115
|
+
type ICalTimezone,
|
|
116
116
|
} from './types.ts';
|
|
117
117
|
|
|
118
118
|
export {
|
|
119
|
-
formatDate,
|
|
120
|
-
formatDateTZ,
|
|
121
119
|
escape,
|
|
122
|
-
foldLines
|
|
120
|
+
foldLines,
|
|
121
|
+
formatDate,
|
|
122
|
+
formatDateTZ
|
|
123
123
|
} from './tools.ts';
|
package/src/tools.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
ICalDateTimeValue,
|
|
5
|
-
ICalDayJsStub,
|
|
6
|
-
ICalLuxonDateTimeStub,
|
|
7
|
-
ICalMomentDurationStub,
|
|
8
|
-
ICalMomentStub,
|
|
9
|
-
ICalMomentTimezoneStub,
|
|
10
|
-
ICalOrganizer,
|
|
4
|
+
type ICalDateTimeValue,
|
|
5
|
+
type ICalDayJsStub,
|
|
6
|
+
type ICalLuxonDateTimeStub,
|
|
7
|
+
type ICalMomentDurationStub,
|
|
8
|
+
type ICalMomentStub,
|
|
9
|
+
type ICalMomentTimezoneStub,
|
|
10
|
+
type ICalOrganizer,
|
|
11
|
+
type ICalRRuleStub
|
|
11
12
|
} from './types.ts';
|
|
12
13
|
|
|
13
14
|
/**
|