adamgibbons / ics Goto Github PK
View Code? Open in Web Editor NEWiCalendar (ics) file generator for node.js
License: ISC License
iCalendar (ics) file generator for node.js
License: ISC License
New lines need to be converted in the description. I used this hack to get a valid multiline description:
ics.buildEvent({
// ...
description: myDescriptionString.replace(/(?:\r\n|\r|\n)/g, '\\n'),
// ...
}
Hi
Thank you for your module
Please add typescript support.
Add the support for passing direct property params to an event or calendar. For add more possibilities of the standard: https://tools.ietf.org/html/rfc5545
For example:
var events = [
{
uid: '-UnitID-123456',
title: 'Event 123456',
created: '',// Not implemented yet
start: [2018, 1, 15, 2, 30],
end: [2018, 1, 17, 2, 30],
description: 'Event description',
additionals: [
// For add in VEVENT: 'CREATED:20171019T171332Z'
{
attribute: 'CREATED',
value: '20171019T171332Z'
}
}
];
var properties = {
productId: `-//Product//Unique-ID-1//EN`
};
ics.createCalendar(events, properties, callback);
This lib can't be used in a browser since there is a dependance with fs
https://github.com/adamgibbons/ics/blob/master/lib/ics.js#L2 .
@adamgibbons can you make this requirement optionnal ?
When event is being added to iCal, the TZ is GMT by default. How to work with Timezones?
{ ValidationError: child "start" fails because ["start" at position 2 fails because ["2" must be larger than or equal to 1]]
my json is :-
{
title: element.id.name,
start: [year, day, hour, minutes, seconds],
duration: { minutes: minutes }
}
Similar to #31, newlines in location need to be handled. Otherwise, only the first line ends up in the actual calendar entry.
Sometimes, I get the following error:
{ ValidationError: child "start" fails because ["start" at position 4 fails because ["4" must be a safe number]]
at Object.exports.process (c:\NodeInvitation\node_modules\joi\lib\errors.js:203:19)
at _validateWithOptions (c:\NodeInvitation\node_modules\joi\lib\types\any\index.js:764:31)
at internals.root.root.validate (c:\NodeInvitation\node_modules\joi\lib\index.js:147:23)
at validateEvent (c:\NodeInvitation\node_modules\ics\dist\schema\index.js:76:37)
at validateAndBuildEvent (c:\NodeInvitation\node_modules\ics\dist\index.js:22:38)
at Object.createEvent (c:\NodeInvitation\node_modules\ics\dist\index.js:102:32)
at c:\NodeInvitation\Routes\fleetinvite.js:1580:37
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:446:3)
isJoi: true,
name: 'ValidationError',
details:
[ { message: '"4" must be a safe number',
path: [Object],
type: 'number.unsafe',
context: [Object] } ],
_object:
{ title: 'Tyre appointment',
productId: 'adamgibbons/ics',
method: 'PUBLISH',
uid: 'd65705ff-2236-4321-8a48-76621f378ba0',
timestamp: '20190404T114200Z',
start: [ '2019', '04', '20', '08', '00' ],
description: 'Test',
startType: 'local',
duration: { minutes: 60 } },
annotate: [Function] }
I initialize an event with the following parameters:
{
title: 'Tyre appointment',
description: appfunctions.attemptToStringify(data[0].FIS_Description),
startType: 'local',
start: [appointmentMoment.format('YYYY'), appointmentMoment.format('MM'), appointmentMoment.format('DD'), appointmentMoment.format('HH'),appointmentMoment.format('mm')],
duration: { minutes: 60 }
}
I have solved this by adding parseInt() in front of every moment value.
I thought it was curious why the error is only thrown sometimes.
Hey @adamgibbons thanks for the nice library!
I have a data structure with many people and many events for each people. My use case is to generate a .ics file for each person containing the events under them. Looking at your documentation I don't see a way to do that. What I want:
ics.createEvent
)But as of today's API, after each file write on step 4, it would only be appending to the same global ics
variable, hence each file write would contain the events for all previous persons instead of only theirs.
Would it be possible to add another api to reset the ics
var? Or make it possible to make ics
an instance (var ics = new ICS()
)?
Thanks!!
It took me quite a while to realize that i have to set the attribute startType
to local
in order to keep my UTC dates without conversion. It would be nice if the README would mention this feature
Hey just wanted to understand if the library is IE11 compatible?
I get this error when i try to use role
for attendee.
I believe this is due to the missing role property in schema
Am I correct that this library forces you to write the data out to an ics file? I'm looking for something that just returns me a string or something and I can just stream it back to the user without having to write to a file.
Just a quickie for a tiny documentation problem:
In your fourth example, 4. Create iCalendar events with Audio (Mac) you provide this code
let start = moment().format('YYYY-M-D').split("-")
let end = moment().add({'hours':2, "minutes":30}).format("YYYY-M-D").split("-")
You format the date using only year, month and date, but the duration is in hours and minutes. The ICS validator refuses this, for obvious reasons. :-)
Being more precise in the formatting solves the problem:
let start = moment().format('YYYY-M-D-H-m').split("-")
let end = moment().add({'hours':2, "minutes":30}).format("YYYY-M-D-H-m").split("-")
TENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE;
is there any way to do the reverse?
uuid => nanoid
moment => date-fns
lodash (isEqual) => ===
or https://www.npmjs.com/package/lodash.isequal
lodash (isArray) => typeof === 'Array'
or Array.isArray
lodash (pickBy) => default selector or https://www.npmjs.com/package/lodash.pickby
I'm having problems getting safari to name the file and not save as "unknown". it does go to the downloads however when opened it's in text/edit. On download i do get an error of 'Failed to load resource: Frame load interrupted' in the browser console.
Nothing seems to be done to limit the line length, especially for description field
When i try to validate the result I have this error, so any ical clients could refuse the generated calendar
Line length should not be longer than 75 characters near line #11
Reference: RFC 5545 3.1. Content Lines
http://icalendar.org/iCalendar-RFC-5545/3-1-content-lines.html
Hello,
any chance to update 'join' dependency to @hapi/joi?
Since:
This module has moved and is now available at @hapi/joi.
Thanks a lot
Ognian
It would be great if the lib cherry picks the lodash methods used to reduce bundle size.
Like:
// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
const at = require('lodash/at');
const curryN = require('lodash/fp/curryN');
// OR
import at form 'lodash/at';
import curryN from 'lodash/fp/curryN';
instead of:
import _ from 'lodash';
Alarms (alerts) are addable via the VALARM entry.
Line 5 in 2480d25
Thanks for making this module.
Kind of new to Node.js. I'm trying to understand why the uuid's generated with uuid/v1 is the same for ICS files created around the same time. I'm wondering if this has something to do with how defaults
is loaded?
For the life cycle of a node.js app, when is the uid
in defaults
actually generated? Seems the way defaults
is using the uuid generator causes the uuid to be fixed for each time it is imported
into buildEvent
. An example quote from here:
> const before = { myProperty: uuid.v4() }
undefined
> before.myProperty
'bdf9794f-0897-48dd-8fed-da380dac6e74'
> const after = { myProperty: () => uuid.v4() }
undefined
> after.myProperty
[Function: myProperty]
> after.myProperty()
'40848bdb-7c04-40e2-8694-5513db705732'
> after.myProperty()
'd1edd511-6ce9-4a12-b196-4fafb6b3b16f'
> after.myProperty()
'1258559b-c082-436c-8ecb-f74679954ffd'
> // Etc ...
How to use input time in particular timezone?
I can convert time to local timezone, but best way for me is to leave it in original timezone and use this for calendar
Line 5 in 2480d25
Should this event creation and logging be removed?
When I provide this library a start time in ISO format, the resulting iCal string has the start time as local time (Form #1 in the RFC, https://icalendar.org/iCalendar-RFC-5545/3-3-5-date-time.html). I would expect an absolute time to remain absolute in the resulting iCal string (Form #2). Specifically, what is the purpose of line 83 in lib/ics.js? How can I specify that the iCal string use form #2 when providing the start time in an absolute format?
I think it's clear.
Just wondering if this project is still being developed.
I'm planning to create some kind of event calendar, with several events coming from a api. Is it planned to implement some option to create multiple VEVENT's?
@adamgibbons thanks for the work so far!
Hi,
I've started using this lib and it works great for Gmail. Email with ics attachment is recognized as meeting invite by Gmail, and special template for displaying meeting information is applied by Gmail.
Unfortunately, this does not happen when the same email with sam ics file is sent to [email protected] / iOS device. It's displayed as an ordinary email with an attachment. Polish popular email service poczta.wp.pl has the same problem.
What about MS Outlook? Will it recognize it or have same problem as Apple?
The organizer field was added in ade14c6, but doesn't seem to work anymore.
e.g., ran ex/app.js
to create ics file by accessing /create
endpoint. options
for the new event includes:
organizer: {
'name': 'greenpioneersolutions',
email: '[email protected]'
},
but outputted file does not contain the organizer:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Adam Gibbons//agibbons.com//ICS: iCalendar Generator
BEGIN:VEVENT
UID:9427cc00-1335-11e7-bee7-5b486358a7d2
DTSTAMP:20170327T213729Z
DTSTART:20170327
DTEND:20170328
DESCRIPTION:Meet Down at the index.js
LOCATION:Fort Worth, Texas
ATTENDEE;CN=Support greenpioneersolutions:mailto:[email protected]
ATTENDEE;CN=no RSVP greenpioneersolutions:mailto:[email protected]
END:VEVENT
END:VCALENDAR
Getting following error when we try to set recurrenceRule
field value
error: ValidationError: "recurrenceRule" is not allowed
It is said that files are saved in the "operating system's temporary directory". Was curious to know if you would recommend people to store these files elsewhere and how?
Thanks
Please correct me if I'm wrong, but when you are doing this in set-date-with-utc-time.js
const formattedDate = moment([
year,
month - 1,
date,
hours,
minutes,
seconds
]).utc().format('YYYYMMDDTHHmm00') + 'Z'
you are calling moment([...])
which will interpret the inputs as local. i.e., hours is the time on my watch in new york, not utc.
shouldn't it be moment.utc([...])...
?
This is more of a question actually.
I noticed it's not possible to pass a "sequence" attribute. However it seems this is necessary if you want to update an event: https://tools.ietf.org/html/rfc5546#section-4.2.3
Any reason this has not been added? Is there another way to send updated events using this package?
When installing the package from npm, the dist
folder doesn't contain the latest changes. For example, in version 2.7.1 the change which let us customize the request
attribute doesn't appear.
Hello,
I am trying to use this library (many thanks by the way)
But as soon as I use the function ics.createEvent() I get a transpile error (see below)
Could you please help me overcome this.
Best regards.
ERROR in ./node_modules/isemail/lib/index.js
Module not found: Error: Can't resolve 'dns' in 'C:_dev\nsi\colibri\client\node_modules\isemail\lib'
resolve 'dns' in 'C:_dev\nsi\colibri\client\node_modules\isemail\lib'
Parsed request is a module
using description file: C:_dev\nsi\colibri\client\node_modules\isemail\package.json (relative path: ./lib)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\node_modules\isemail\package.json (relative path: ./lib)
resolve as module
C:_dev\nsi\colibri\client\node_modules\isemail\lib\node_modules doesn't exist or is not a directory
C:_dev\nsi\colibri\client\node_modules\isemail\node_modules doesn't exist or is not a directory
C:_dev\nsi\colibri\client\node_modules\node_modules doesn't exist or is not a directory
C:_dev\nsi\node_modules doesn't exist or is not a directory
C:_dev\node_modules doesn't exist or is not a directory
C:\node_modules doesn't exist or is not a directory
looking for modules in C:_dev\nsi\colibri\client\node_modules
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./node_modules)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./node_modules/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\node_modules\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\node_modules\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\node_modules\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\node_modules\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\node_modules
using description file: C:_dev\nsi\colibri\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\package.json (relative path: ./node_modules)
using description file: C:_dev\nsi\colibri\package.json (relative path: ./node_modules/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\node_modules\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\node_modules\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\node_modules\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\node_modules\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\node_modules
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./node_modules)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./node_modules/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\node_modules\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\node_modules\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\node_modules\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\node_modules\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
looking for modules in C:_dev\nsi\colibri\client\src
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src)
using description file: C:_dev\nsi\colibri\client\package.json (relative path: ./src/dns)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:_dev\nsi\colibri\client\src\dns.js doesn't exist
as directory
C:_dev\nsi\colibri\client\src\dns doesn't exist
[C:_dev\nsi\colibri\client\node_modules\isemail\lib\node_modules]
[C:_dev\nsi\colibri\client\node_modules\isemail\node_modules]
[C:_dev\nsi\colibri\client\node_modules\node_modules]
[C:_dev\nsi\node_modules]
[C:_dev\node_modules]
[C:\node_modules]
[C:_dev\nsi\colibri\client\node_modules\dns]
[C:_dev\nsi\colibri\node_modules\dns]
[C:_dev\nsi\colibri\client\node_modules\dns.ts]
[C:_dev\nsi\colibri\node_modules\dns.ts]
[C:_dev\nsi\colibri\client\node_modules\dns.js]
[C:_dev\nsi\colibri\node_modules\dns.js]
[C:_dev\nsi\colibri\client\node_modules\dns]
[C:_dev\nsi\colibri\node_modules\dns]
[C:_dev\nsi\colibri\client\node_modules\dns]
[C:_dev\nsi\colibri\client\node_modules\dns.ts]
[C:_dev\nsi\colibri\client\node_modules\dns.js]
[C:_dev\nsi\colibri\client\node_modules\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns]
[C:_dev\nsi\colibri\client\src\dns.ts]
[C:_dev\nsi\colibri\client\src\dns.js]
[C:_dev\nsi\colibri\client\src\dns]
@ ./node_modules/isemail/lib/index.js 5:12-26
@ ./node_modules/joi/lib/types/string/index.js
@ ./node_modules/joi/lib/index.js
@ ./node_modules/ics/dist/schema/index.js
@ ./node_modules/ics/dist/pipeline/validate.js
@ ./node_modules/ics/dist/pipeline/index.js
@ ./node_modules/ics/dist/index.js
@ ./node_modules/ics/index.js
@ ./src/app/shared/service/tools.service.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi ./src/main.ts
Is possible to create an array of events with this library?
When upgrading from version 2.12.1 to 2.13.0, all my events that are created in local time now jumps ahead two hours when are viewed in Apple Calendar og on Google Calendar. I'm currently in the GMT+2 time zone, so an event that was supposed to begin 9.15 now starts at 11.15.
Great library. I noticed the \
was showing up in my descriptions in Calendar.app, so I did a little digging and found this in the RFC. I'll try to get a PR in this week, but I wanted to document it just in case I can't.
From the RFC:
However, a COLON character in a "TEXT" property value SHALL NOT be escaped with a BACKSLASH character.
Offending line: last .replace()
in https://github.com/adamgibbons/ics/blob/master/src/utils/set-description.js#L2
If you want others to be able to use this package you should add a licence.
FYI
Code published on Github without an explicit license is protected by copyright and is by default All Rights Reserved.
http://stackoverflow.com/questions/4007674/whats-the-default-license-of-code-published-at-github
It's needed change the method for add start and end day for support all day events.
This is generating a DTSTART
and DTEND
in format YYYYMMDD
without T000000Z
, that is if the hour and second are no passed as param.
According to the spec, both organizer
and attendee
support DIR. Also, some calendar apps insert custom attributes (starting with X-
).
However, ics fails when adding dir
or any x-xxxx
attribute. Example:
const ics = require('ics')
const event =
{
start : [ 2018, 5, 30, 6, 30 ],
duration : { hours: 6, minutes: 30 },
title : 'Bolder Boulder',
description : 'Annual 10-kilometer run in Boulder, Colorado',
location : 'Bilbao',
url : 'https://meet.sync.work/qwe/asd?qwe=1234',
organizer :
{
name : 'Manolo Foo',
email : '[email protected]',
dir : '1234-qwer-asdf',
'x-id' : '1234-qwer-asdf'
},
attendees:
[
{
name : 'Adam Gibbons',
email : '[email protected]',
dir : '5678-rtty-dfgh',
'x-id' : '5678-rtty-dfgh',
rsvp : true
},
{
name : 'Brittany Seaton',
email : '[email protected]',
dir : '9999-66666-tasd',
'x-id' : '9999-66666-tasd'
}
]
};
ics.createEvent(event, (error, value) =>
{
if (error)
{
console.error('ERROR:', error);
return;
}
console.log(value);
});
It produces:
ERROR: { ValidationError: child "organizer" fails because ["dir" is not allowed, "x-id" is not allowed]
at Object.exports.process (/private/tmp/node_modules/joi/lib/errors.js:181:19)
at internals.Object._validateWithOptions (/private/tmp/node_modules/joi/lib/types/any/index.js:651:31)
at module.exports.internals.Any.root.validate (/private/tmp/node_modules/joi/lib/index.js:121:23)
at validateEvent (/private/tmp/node_modules/ics/dist/schema/index.js:72:37)
at Object.createEvent (/private/tmp/node_modules/ics/dist/index.js:97:53)
at Object.<anonymous> (/private/tmp/kk.js:36:5)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
END:VCALENDAR is missing from output when providing only one event in an array.
possible patch :
if (value.indexOf('END:VCALENDAR') == -1)
value += 'END:VCALENDAR';
const ics = require('ics')
const { error, value } = ics.createEvents([
{
title: 'Lunch',
start: [2018, 1, 15, 12, 15],
end: [2018, 1, 15, 13, 15],
}
])
// BEGIN:VCALENDAR
// VERSION:2.0
// CALSCALE:GREGORIAN
// PRODID:adamgibbons/ics
// METHOD:PUBLISH
// X-PUBLISHED-TTL:PT1H
// BEGIN:VEVENT
// UID:016344bc-a3f4-4cbe-ab97-e1847d232b39
// SUMMARY:Lunch
// DTSTAMP:20180530T180600Z
// DTSTART:20180115T111500Z
// DTEND:20180115T121500Z
// END:VEVENT
Can you please tell me if it is possible to change the name of .ics filename and how.
Thanks for your work.
This looks nice, but I'd like to use it to generate events for classes. Any support for recurring events likely?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.