@cayde-6/icalendar 0.1.3 → 0.1.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/dist/{chunk-MSLA47CB.js → chunk-6UA5RRIF.js} +9 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +2 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/cli.ts
|
|
2
|
+
import { readFileSync } from "fs";
|
|
2
3
|
import { cac } from "cac";
|
|
3
4
|
|
|
4
5
|
// src/infra/config/env-config.reader.ts
|
|
@@ -470,6 +471,13 @@ var runCommand = async ({ gateway, config, args }) => {
|
|
|
470
471
|
};
|
|
471
472
|
|
|
472
473
|
// src/cli.ts
|
|
474
|
+
var packageVersion = (() => {
|
|
475
|
+
try {
|
|
476
|
+
return JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
477
|
+
} catch {
|
|
478
|
+
return "0.0.0";
|
|
479
|
+
}
|
|
480
|
+
})();
|
|
473
481
|
var cli = cac("icalendar");
|
|
474
482
|
cli.command("calendars list", "list available calendars");
|
|
475
483
|
cli.command("events list", "list events for selected calendar/time range");
|
|
@@ -477,7 +485,7 @@ cli.command("events create", "create calendar event");
|
|
|
477
485
|
cli.command("events update", "update calendar event");
|
|
478
486
|
cli.command("events delete [url]", "delete calendar event");
|
|
479
487
|
cli.help();
|
|
480
|
-
cli.version(
|
|
488
|
+
cli.version(packageVersion);
|
|
481
489
|
var runCli = async (args = process.argv.slice(2)) => {
|
|
482
490
|
if (args.includes("--help") || args.includes("-h") || args.includes("--version") || args.includes("-v")) {
|
|
483
491
|
cli.parse();
|
package/dist/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED