@cayde-6/icalendar 0.1.2 → 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.
@@ -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("0.1.0");
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
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  declare const runCli: (args?: string[]) => Promise<void>;
2
3
 
3
4
  export { runCli };
package/dist/cli.js CHANGED
@@ -1,6 +1,7 @@
1
+ #!/usr/bin/env node
1
2
  import {
2
3
  runCli
3
- } from "./chunk-MSLA47CB.js";
4
+ } from "./chunk-6UA5RRIF.js";
4
5
  export {
5
6
  runCli
6
7
  };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runCli
3
- } from "./chunk-MSLA47CB.js";
3
+ } from "./chunk-6UA5RRIF.js";
4
4
  export {
5
5
  runCli
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cayde-6/icalendar",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Production-ready TypeScript CLI for CalDAV calendars, iCalendar events, and agent automation",
5
5
  "type": "module",
6
6
  "private": false,