kalvium-worklog 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/dist/cli.js +8 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7,13 +7,19 @@ import { setupScheduler, removeScheduler } from "./scheduler.js";
7
7
  import { generateWebapp } from "./generate-webapp.js";
8
8
  import { loadToken, saveConfig, getPositionIdFromToken } from "./config.js";
9
9
  import { existsSync } from "fs";
10
- import { join } from "path";
10
+ import { join, dirname } from "path";
11
11
  import { homedir } from "os";
12
+ import { fileURLToPath } from "url";
13
+ import { readFileSync } from "fs";
14
+ // Read version from package.json
15
+ const __dirname = dirname(fileURLToPath(import.meta.url));
16
+ const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8"));
17
+ const VERSION = pkg.version;
12
18
  const program = new Command();
13
19
  program
14
20
  .name("kalvium-worklog")
15
21
  .description("Auto-submit your daily Kalvium worklog")
16
- .version("1.0.0");
22
+ .version(VERSION);
17
23
  // ─── login ─────────────────────────────────────────────────────────────────
18
24
  program
19
25
  .command("login")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kalvium-worklog",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Auto-submit your daily Kalvium worklog without opening the website",
5
5
  "keywords": [
6
6
  "kalvium",